summaryrefslogtreecommitdiff
path: root/src/runtime/haskell/PGF/Macros.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-01-29 21:10:14 +0000
committerkrasimir <krasimir@chalmers.se>2010-01-29 21:10:14 +0000
commit3b7e39fa4ab2dcfc6ec9591be6476b4240baf671 (patch)
tree4a82a254abbf1e801c98964d6e25e20dd132f0f3 /src/runtime/haskell/PGF/Macros.hs
parente5de8ea9fe981a11ffd2672dd047d107e65b63a0 (diff)
bugfix in the PGF typechecker and more test cases
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