Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7083151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:08:33+00:00 2026-05-28T07:08:33+00:00

There are many different libraries on Hackage dealing with interpolated strings. Some have poor

  • 0

There are many different libraries on Hackage dealing with interpolated strings. Some have poor quality while other vary with number of features they support.

Which ones are worth using?

Examples of libraries (in no particular order): shakespeare, interpolatedstring-qq, Interpolation

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:08:34+00:00Added an answer on May 28, 2026 at 7:08 am

    I took a look at all the interpolation quasiquoter libraries I could find on Hackage.

    Interpolation libraries worth using:

    • interpolatedstring-perl6: Supports interpolating arbitrary Haskell code with reasonable syntax, but requires haskell-src-exts. If you just want a general string interpolation syntax, I’d use this.

    • shakespeare-text: Based on the Shakespeare family of templates, and has minimal dependencies; most other interpolated string packages depend on haskell-src-exts, which is quite a heavy package and can take a lot of time and resources to compile. If you use any other Shakespeare templates, I’d suggest going with this one.

      However, it doesn’t support interpolating arbitrary Haskell code, although it supports more than simple variable expansion; it also does function application, operators, etc. I think it also uses Text rather than String; I’m not sure whether it can be used with Strings looking from the source code, though there is support code to suggest it can be.

    • Interpolation: Supports arbitrary expressions (again with haskell-src-exts), and also has built-in looping facilities. If you want more “template”-like features than just plain interpolation, it’s worth considering, although I personally find the syntax quite ugly.

    Interpolation libraries probably not worth using:

    • interpolatedstring-qq: Seems to be based on interpolatedstring-perl6; it hasn’t been updated for over a year, and seems to have less functionality than interpolatedstring-perl6. Unless you’re really attached to the #{expr} syntax, I wouldn’t consider this one.

    • interpol: Implemented as a preprocessor, gives {foo} special meaning in strings; IMO too heavyweight a solution, and with such lightweight syntax, likely to break existing code.

    In summary, I’d suggest interpolatedstring-perl6 if you don’t mind the haskell-src-exts dependency, and shakespeare-text if you do (or are already using Shakespeare templates).

    Another option might be to use the string-qq package with a more general template engine; it supports String, Text and ByteString, which should cover every use. However, this obviously doesn’t support embedding Haskell code, and you’ll need to specify the variables separately, so it’s probably only useful in certain situations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are many different monad transformers libraries on Hackage. A few seem to get
I have an application with many different parts, it runs on OSGi, so there's
I have to include many header files, which are in different sub-directories. Is there
There are many different styles of variable names that I've come across over the
There are so many different options coming out of microsoft for data access. Which
Problem: There are a lot of different databases, which is populated by many different
I am now debugging a program that utilizes many different threads. There is an
There are many ASP.MVC blog post bits and pieces scattered over different web sites,
Given that there are many sizes and color depths for different phones (even for
As documented by MSDN , there are several providers for many of the different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.