From 3b7e39fa4ab2dcfc6ec9591be6476b4240baf671 Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 29 Jan 2010 21:10:14 +0000 Subject: bugfix in the PGF typechecker and more test cases --- src/runtime/haskell/PGF/Macros.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/runtime/haskell/PGF/Macros.hs') 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 -- cgit v1.2.3