From 2ee936c7e23bd690b05b8362179911a2d176f150 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 9 Oct 2003 15:23:32 +0000 Subject: Added treatment of transfer modules. Aggregation is an example. --- src/GF/Source/GrammarToSource.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/GF/Source/GrammarToSource.hs') diff --git a/src/GF/Source/GrammarToSource.hs b/src/GF/Source/GrammarToSource.hs index a211605fc..73f65c85c 100644 --- a/src/GF/Source/GrammarToSource.hs +++ b/src/GF/Source/GrammarToSource.hs @@ -20,10 +20,11 @@ trModule (i,mo) = case mo of (map trFlag (flags m)))) where i' = tri i - mkModule = case typeOfModule mo of - MTResource -> P.MResource - MTAbstract -> P.MAbstract - MTConcrete a -> P.MConcrete (tri a) + mkModule m = case typeOfModule mo of + MTResource -> P.MResource m + MTAbstract -> P.MAbstract m + MTConcrete a -> P.MConcrete m (tri a) + MTTransfer a b -> P.MTransfer m (trOpen a) (trOpen b) trExtend :: Maybe Ident -> P.Extend trExtend i = maybe P.NoExt (P.Ext . tri) i @@ -50,6 +51,7 @@ trAnyDef (i,info) = let i' = tri i in case info of _ -> [] AbsFun (May b) _ -> [P.DefFun [P.FunDef [i'] (P.EIndir (tri b))]] ---- don't destroy definitions! + AbsTrans f -> [P.DefTrans [P.DDef [i'] (trt f)]] ResOper pty ptr -> [P.DefOper [trDef i' pty ptr]] ResParam pp -> [P.DefPar [case pp of -- cgit v1.2.3