diff options
| author | aarne <unknown> | 2005-02-04 19:17:57 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2005-02-04 19:17:57 +0000 |
| commit | bc05653e825e082b70eebf2f420eb5a97610f56c (patch) | |
| tree | 66ddf9b72422f08f09f1b5a86a1bcd838d92baee /src/GF/Infra | |
| parent | b8b5139a8a8f8b0451061bacefc033b0bc768886 (diff) | |
resources and new instantiation syntax
Diffstat (limited to 'src/GF/Infra')
| -rw-r--r-- | src/GF/Infra/Modules.hs | 2 | ||||
| -rw-r--r-- | src/GF/Infra/ReadFiles.hs | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/GF/Infra/Modules.hs b/src/GF/Infra/Modules.hs index 533ba75c8..3da4bca9f 100644 --- a/src/GF/Infra/Modules.hs +++ b/src/GF/Infra/Modules.hs @@ -33,7 +33,7 @@ data MGrammar i f a = MGrammar {modules :: [(i,ModInfo i f a)]} data ModInfo i f a = ModMainGrammar (MainGrammar i) | ModMod (Module i f a) - | ModWith (ModuleType i) ModuleStatus i [OpenSpec i] + | ModWith (ModuleType i) ModuleStatus i [i] [OpenSpec i] deriving Show data Module i f a = Module { diff --git a/src/GF/Infra/ReadFiles.hs b/src/GF/Infra/ReadFiles.hs index c9572d75b..65b52e602 100644 --- a/src/GF/Infra/ReadFiles.hs +++ b/src/GF/Infra/ReadFiles.hs @@ -254,10 +254,18 @@ getModuleHeader ws = case ws of ((MTyResource,name),(m,MUInstance):(n,MUComplete):[(n,MUOther) | n <- ms]) ms -> ((MTyResource,name),(m,MUInstance):[(n,MUOther) | n <- ms]) + "concrete":name:a:ws2 -> case span (/= "with") ws2 of + + (es,_:ms) -> ((MTyOther,name), + [(m,MUOther) | m <- es] ++ + [(n,MUComplete) | n <- ms]) + --- m:"with":ms -> ((MTyOther,name),(m,MUOther):[(n,MUComplete) | n <- ms]) + (ms,[]) -> ((MTyOther,name),[(n,MUOther) | n <- a:ms]) + _:name:ws2 -> case ws2 of "reuse":m:_ -> ((MTyOther,name),[(m,MUReuse)]) - m:n:"with":ms -> - ((MTyOther,name),(m,MUInstance):(n,MUOther):[(n,MUComplete) | n <- ms]) + ---- m:n:"with":ms -> + ---- ((MTyOther,name),(m,MUInstance):(n,MUOther):[(n,MUComplete) | n <- ms]) m:"with":ms -> ((MTyOther,name),(m,MUOther):[(n,MUComplete) | n <- ms]) ms -> ((MTyOther,name),[(n,MUOther) | n <- ms]) |
