summaryrefslogtreecommitdiff
path: root/src/PGF
diff options
context:
space:
mode:
Diffstat (limited to 'src/PGF')
-rw-r--r--src/PGF/Expr.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/PGF/Expr.hs b/src/PGF/Expr.hs
index bddbc84d4..cf0cb79aa 100644
--- a/src/PGF/Expr.hs
+++ b/src/PGF/Expr.hs
@@ -5,6 +5,7 @@ module PGF.Expr(Tree, BindType(..), Expr(..), Literal(..), Patt(..), Equation(..
mkStr, unStr,
mkInt, unInt,
mkDouble, unDouble,
+ mkMeta, isMeta,
normalForm,
@@ -132,6 +133,15 @@ unDouble :: Expr -> Maybe Double
unDouble (ELit (LFlt f)) = Just f
unDouble _ = Nothing
+-- | Constructs an expression which is meta variable
+mkMeta :: Expr
+mkMeta = EMeta 0
+
+-- | Checks whether an expression is a meta variable
+isMeta :: Expr -> Bool
+isMeta (EMeta _) = True
+isMeta _ = False
+
-----------------------------------------------------
-- Parsing
-----------------------------------------------------