mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-11 04:02:52 -06:00
a first version of PGF.AbsCompute
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user