packages feed

rawstring-qm 0.2.1 → 0.2.2

raw patch · 2 files changed

+9/−7 lines, 2 files

Files

rawstring-qm.cabal view
@@ -1,5 +1,5 @@ name:                rawstring-qm-version:             0.2.1+version:             0.2.2 cabal-version:       >=1.10 synopsis:            Simple raw string quotation and dictionary interpolation description:         Supply a couple of usefull QuasiQuotes so we can use functions to lookup values
src/Data/String/QM.hs view
@@ -81,23 +81,25 @@ unQM a (x:xs)      = unQM (x:a) xs  makeExpr [] = ls ""-makeExpr (Literal a:xs)   = TH.appE [| (<>) a |]+makeExpr (Literal a:xs)   = TH.appE [| (++) a |]                             $ makeExpr xs-makeExpr (AntiQuote a:xs) = TH.appE [| (<>) (reify $ mkName  a) |]+makeExpr (AntiQuote a:xs) = TH.appE [| (++) $(varE (mkName a)) |]                             $ makeExpr xs  makeExprT [] = ls "" makeExprT (Literal a:xs)   = TH.appE [| (<>) a |]                             $ makeExprT xs-makeExprT (AntiQuote a:xs) = TH.appE [| (<>) (toText (reify $ mkName a)) |]+makeExprT (AntiQuote a:xs) = TH.appE [| (<>) (toText $(varE (mkName a))) |]                             $ makeExprT xs  makeExprTL [] = ls "" makeExprTL (Literal a:xs)   = TH.appE [| (<>) a |]-                            $ makeExprT xs-makeExprTL (AntiQuote a:xs) = TH.appE [| (<>) (toLazyText (reify $ mkName a)) |]-                            $ makeExprT xs+                            $ makeExprTL xs+makeExprTL (AntiQuote a:xs) = TH.appE [| (<>) (toLazyText $(varE (mkName a))) |]+                            $ makeExprTL xs +-- reify' = varE . mkName+-- reify  ls = return . TH.LitE . TH.StringL