diff options
| author | peb <unknown> | 2005-02-17 09:12:32 +0000 |
|---|---|---|
| committer | peb <unknown> | 2005-02-17 09:12:32 +0000 |
| commit | 359f1b8ea2032fbf5b8ad7ad6c88e922fa83470b (patch) | |
| tree | 17d52866d7f97c1817832eefb741e07a0b54cffb /src/GF/Canon | |
| parent | 55f889eda88d847ace5cdae00b175434006be287 (diff) | |
"Committed_by_peb"
Diffstat (limited to 'src/GF/Canon')
| -rw-r--r-- | src/GF/Canon/MkGFC.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/GF/Canon/MkGFC.hs b/src/GF/Canon/MkGFC.hs index a1dfdbe2f..d1cf29e93 100644 --- a/src/GF/Canon/MkGFC.hs +++ b/src/GF/Canon/MkGFC.hs @@ -58,6 +58,7 @@ canon2grammar (Gr modules) = M.MGrammar $ map mod2info modules where grammar2canon :: CanonGrammar -> Canon grammar2canon (M.MGrammar modules) = Gr $ map info2mod modules +info2mod :: (Ident, M.ModInfo Ident Flag Info) -> Module info2mod m = case m of (a, M.ModMod (M.Module mt _ flags me os defs)) -> let defs' = map info2def $ tree2list defs @@ -93,6 +94,7 @@ trCont cont = [(x,trExp t) | Decl x t <- cont] trFs = map trQIdent +trExp :: Exp -> A.Term trExp t = case t of EProd x a b -> A.Prod x (trExp a) (trExp b) EAbs x b -> A.Abs x (trExp b) @@ -136,6 +138,7 @@ rtCont cont = [Decl (rtIdent x) (rtExp t) | (x,t) <- cont] rtFs = map rtQIdent +rtExp :: A.Term -> Exp rtExp t = case t of A.Prod x a b -> EProd (rtIdent x) (rtExp a) (rtExp b) A.Abs x b -> EAbs (rtIdent x) (rtExp b) @@ -162,6 +165,7 @@ rtExp t = case t of _ -> error $ "MkGFC.rt not defined for" +++ show p +rtQIdent :: (Ident, Ident) -> CIdent rtQIdent (m,c) = CIQ (rtIdent m) (rtIdent c) rtIdent x | isWildIdent x = identC "h_" --- needed in declarations |
