packages feed

Interpolation 0.2.3 → 0.2.4

raw patch · 2 files changed

+6/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/String/Interpolation.hs view
@@ -100,7 +100,7 @@ runEither s (Left e)  = error $ s ++" : "++ e  appM :: (Monad m) => String -> m Exp-appM expr = runEither "Parse error in antiquote" (parseExp expr)+appM expr = runEither ("Parse error in antiquote <"++expr++">") (parseExp expr) sbitToExp :: StringBits -> ExpQ sbitToExp (Str x) =  TH.stringE x  sbitToExp (Var x)  =  appM x --(TH.varE (TH.mkName x))@@ -112,9 +112,9 @@     where      sepr = psToStringE (fromMaybe [Str ""] sep)      lam  = TH.lamE [varN] (psToStringE rep)-     varN = runEither "Parse error in repetition pattern"+     varN = runEither ("Parse error in repetition pattern <"++varName++">")              (parsePat varName)--TH.varP $ TH.mkName varName-     lstN = runEither "Parse error in repetition binding"+     lstN = runEither ("Parse error in repetition binding <"++lstName++">")              (parseExp lstName) -- TH.varE $ TH.mkName lstName  @@ -143,11 +143,11 @@                                        ("Repetition <"++s++"> missing body")                                          $ s                        (hasSep,expr,sepS) = takeRep -                                             ("Repetition <"++s++"> missing #")$ drop 1 exprS+                                             ("Repetition <"++s++"> missing #")$ exprS                        (sep,restS) = escapingBreak ('#')                                        ("Repetition <"++s++"> missing #")                                          $ sepS-                       rest = drop 1 restS+                       rest = restS                        (varNameS,listNameS) = break (=="in") . words                                             $ bind                        listName = unwords . drop 1 $ listNameS
Interpolation.cabal view
@@ -1,5 +1,5 @@ Name:                  Interpolation-Version:             0.2.3+Version:             0.2.4 Description:         This package adds quasiquoter for multiline                       strings, interpolation and simple templating.                      It can handle repetition templates which makes it