summaryrefslogtreecommitdiff
path: root/src/runtime/haskell/PGF/Macros.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/haskell/PGF/Macros.hs')
-rw-r--r--src/runtime/haskell/PGF/Macros.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/haskell/PGF/Macros.hs b/src/runtime/haskell/PGF/Macros.hs
index 03c5d0fe4..34f32c386 100644
--- a/src/runtime/haskell/PGF/Macros.hs
+++ b/src/runtime/haskell/PGF/Macros.hs
@@ -22,7 +22,7 @@ lookType pgf f =
case lookMap (error $ "lookType " ++ show f) f (funs (abstract pgf)) of
(ty,_,_) -> ty
-lookDef :: PGF -> CId -> [Equation]
+lookDef :: PGF -> CId -> Maybe [Equation]
lookDef pgf f =
case lookMap (error $ "lookDef " ++ show f) f (funs (abstract pgf)) of
(_,a,eqs) -> eqs
@@ -30,8 +30,8 @@ lookDef pgf f =
isData :: PGF -> CId -> Bool
isData pgf f =
case Map.lookup f (funs (abstract pgf)) of
- Just (_,_,[]) -> True -- the encoding of data constrs
- _ -> False
+ Just (_,_,Nothing) -> True -- the encoding of data constrs
+ _ -> False
lookValCat :: PGF -> CId -> CId
lookValCat pgf = valCat . lookType pgf