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/Infra/Modules.hs | 8 ++++++++ src/GF/Infra/ReadFiles.hs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/GF/Infra') diff --git a/src/GF/Infra/Modules.hs b/src/GF/Infra/Modules.hs index 01b789f8f..bae22219f 100644 --- a/src/GF/Infra/Modules.hs +++ b/src/GF/Infra/Modules.hs @@ -66,6 +66,10 @@ openedModule o = case o of OSimple m -> m OQualif _ m -> m +allOpens m = case mtype m of + MTTransfer a b -> a : b : opens m + _ -> opens m + -- initial dependency list depPathModule :: Ord i => Module i f a -> [OpenSpec i] depPathModule m = fors m ++ exts m ++ opens m where @@ -176,6 +180,10 @@ isModCnc m = case mtype m of MTConcrete _ -> True _ -> False +isModTrans m = case mtype m of + MTTransfer _ _ -> True + _ -> False + sameMType m n = case (m,n) of (MTConcrete _, MTConcrete _) -> True _ -> m == n diff --git a/src/GF/Infra/ReadFiles.hs b/src/GF/Infra/ReadFiles.hs index f755397f2..5e4d2b165 100644 --- a/src/GF/Infra/ReadFiles.hs +++ b/src/GF/Infra/ReadFiles.hs @@ -99,7 +99,7 @@ importsOfFile = unComm -- ignore comments before the headed line where term = flip elem ["{",";"] - spec = flip elem ["of", "open","in", "reuse", "=", "(", ")",",","**"] + spec = flip elem ["of", "open","in", ":", "->", "reuse", "=", "(", ")",",","**"] unqual ws = case ws of "(":q:ws' -> unqual ws' w:ws' -> w:unqual ws' -- cgit v1.2.3