Interpolated Text strings in Haskell.
Haskell
Switch branches/tags
Nothing to show
Latest commit b6b3f23 Jun 5, 2016 @mikeplus64 mikeplus64 Merge pull request #4 from nh2/ghc-8
GHC 8 compatibility, and compatibility with newer build-depends

README.md

Interpolated string QuasiQuoter for Text values.

For example:

{-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
import qualified Data.Text.IO as T
import Text.QuasiText

main :: IO ()
main = do
    user  <- T.getLine
    email <- T.getLine
    airSpeedVelocityOfAnUnladenSwallow <- fmap read getLine :: IO Int
    T.putStrLn [embed|
The air speed velocity of an unladen swallow is $airSpeedVelocityOfAnUnladenSwallow.
Your username is $user.
Your email is $email.
1 + 1 = $(1 + 1). |]