summaryrefslogtreecommitdiff
path: root/src/GF/Canon
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Canon')
-rw-r--r--src/GF/Canon/GFCC/DataGFCC.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/GF/Canon/GFCC/DataGFCC.hs b/src/GF/Canon/GFCC/DataGFCC.hs
index 389afc5a7..43ce04166 100644
--- a/src/GF/Canon/GFCC/DataGFCC.hs
+++ b/src/GF/Canon/GFCC/DataGFCC.hs
@@ -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