{-# LANGUAGE QuasiQuotes #-}

module Try.TypeFamilies.StringInterpolate where

import Data.ByteString
import Data.String.Interpolate (i)
import Data.Text

string-interpolate

Implementation explanation feat. Type families, Tagged Classes

b :: Integer
b = 3

d :: Text
d = [i|comm|]

s :: ByteString
s = [i|A #{b} -c #{d}|]

-- >>> s
-- "A 3 -c comm"