1
0
forked from GitHub/gf-core

SISR code now type annotates meta variables directly in grammar, to avoid a separate type annotation step.

This commit is contained in:
bringert
2007-01-05 17:34:44 +00:00
parent 36a1998ba3
commit efb806f226
3 changed files with 23 additions and 9 deletions

View File

@@ -35,6 +35,10 @@ lookLin :: GFCC -> CId -> CId -> Term
lookLin mcfg lang fun =
lookMap TM fun $ lookMap undefined lang $ concretes mcfg
-- | Look up the type of a function.
lookType :: GFCC -> CId -> Type
lookType gfcc f = lookMap (error $ "lookType " ++ show f) f (funs (abstract gfcc))
linearize :: GFCC -> CId -> Exp -> String
linearize mcfg lang = realize . linExp mcfg lang