diff options
| author | bjorn <bjorn@bringert.net> | 2008-10-15 11:38:34 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-10-15 11:38:34 +0000 |
| commit | 1ecb4f63e9765962aab570bf043cb65c22df1e45 (patch) | |
| tree | c12112454cbd1bb41d2a83864dd795347fa4df81 /src/GF/Infra/Modules.hs | |
| parent | 60ba93cfbb043ecf0831f182b2044c5e94508d47 (diff) | |
Added OPTIONS class to make options handling somewhat nicer. Next, I will merge Flags and ModuleFlags.
Diffstat (limited to 'src/GF/Infra/Modules.hs')
| -rw-r--r-- | src/GF/Infra/Modules.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GF/Infra/Modules.hs b/src/GF/Infra/Modules.hs index 913afc89e..6c40944da 100644 --- a/src/GF/Infra/Modules.hs +++ b/src/GF/Infra/Modules.hs @@ -129,15 +129,15 @@ addOpenQualif i j (Module mt ms fs me ops js ps) = Module mt ms fs me (oQualif i j : ops) js ps addFlag :: ModuleOptions -> Module i t -> Module i t -addFlag f mo = mo {flags = addModuleOptions (flags mo) f} +addFlag f mo = mo {flags = flags mo `addOptions` f} flagsModule :: (i,ModInfo i a) -> ModuleOptions flagsModule (_,mi) = case mi of ModMod m -> flags m - _ -> noModuleOptions + _ -> noOptions allFlags :: MGrammar i a -> ModuleOptions -allFlags gr = concatModuleOptions $ map flags $ [m | (_, ModMod m) <- modules gr] +allFlags gr = concatOptions $ map flags $ [m | (_, ModMod m) <- modules gr] mapModules :: (Module i a -> Module i a) -> MGrammar i a -> MGrammar i a @@ -270,7 +270,7 @@ emptyModInfo = ModMod emptyModule emptyModule :: Module i a emptyModule = Module - MTResource MSComplete noModuleOptions [] [] emptyBinTree emptyBinTree + MTResource MSComplete noOptions [] [] emptyBinTree emptyBinTree -- | we store the module type with the identifier data IdentM i = IdentM { |
