haskell-exp-parser 0.1.3 → 0.1.4
raw patch · 2 files changed
+11/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
haskell-exp-parser.cabal view
@@ -1,5 +1,5 @@ name: haskell-exp-parser-version: 0.1.3+version: 0.1.4 synopsis: Simple parser parser from Haskell to TemplateHaskell expressions description: This package defines a simple parser for a subset of Haskell expressions and patterns to the TemplateHaskell AST. .
src/Language/Haskell/ParseExp.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+ -- | Simple parser for a subset of Haskell expressions and patterns to the -- TemplateHaskell AST --@@ -26,6 +28,13 @@ +mk_tupE :: [Exp] -> Exp+#if MIN_VERSION_template_haskell(2,16,0)+mk_tupE = TupE . map Just+#else+mk_tupE = TupE+#endif+ -- | Skip any amount of whitespace skipSpace :: ReadP () skipSpace = void $ munch isSpace@@ -89,7 +98,7 @@ case es of [] -> return $ ConE $ mkName "()" [e] -> return e- _ -> return $ TupE es+ _ -> return $ mk_tupE es -- | Parse an expression that is not an application expPart :: Bool -> ReadP Exp