the embedded grammars now work with both the pure Haskell and the Haskell binding API

This commit is contained in:
Krasimir Angelov
2017-08-29 18:44:50 +02:00
parent 62e5852669
commit b7b7a7c91c
5 changed files with 13 additions and 5 deletions

View File

@@ -51,6 +51,7 @@ module PGF(
mkStr, unStr,
mkInt, unInt,
mkDouble, unDouble,
mkFloat, unFloat,
mkMeta, unMeta,
-- extra
pExpr,

View File

@@ -6,6 +6,7 @@ module PGF.Expr(Tree, BindType(..), Expr(..), Literal(..), Patt(..), Equation(..
mkStr, unStr,
mkInt, unInt,
mkDouble, unDouble,
mkFloat, unFloat,
mkMeta, unMeta,
normalForm,
@@ -154,6 +155,9 @@ unDouble (ETyped e ty) = unDouble e
unDouble (EImplArg e) = unDouble e
unDouble _ = Nothing
mkFloat = mkDouble
unFloat = unDouble
-- | Constructs an expression which is meta variable
mkMeta :: Int -> Expr
mkMeta i = EMeta i