1
0
forked from GitHub/gf-core

a first version of PGF.AbsCompute

This commit is contained in:
aarne
2008-10-10 15:53:17 +00:00
parent 76e9964d98
commit 8555c65c36
5 changed files with 123 additions and 15 deletions

View File

@@ -38,6 +38,11 @@ lookDef :: PGF -> CId -> Expr
lookDef pgf f =
snd $ lookMap (error $ "lookDef " ++ show f) f (funs (abstract pgf))
isData :: PGF -> CId -> Bool
isData pgf f = case Map.lookup f (funs (abstract pgf)) of
Just (_,EMeta 0) -> True ---- the encoding of data constrs
_ -> False
lookValCat :: PGF -> CId -> CId
lookValCat pgf = valCat . lookType pgf