summaryrefslogtreecommitdiff
path: root/src/GF/Infra/Modules.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Infra/Modules.hs')
-rw-r--r--src/GF/Infra/Modules.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/GF/Infra/Modules.hs b/src/GF/Infra/Modules.hs
index 3da4bca9f..2f14095a9 100644
--- a/src/GF/Infra/Modules.hs
+++ b/src/GF/Infra/Modules.hs
@@ -9,7 +9,7 @@
-- > CVS $Author $
-- > CVS $Revision $
--
--- (Description of the module)
+-- Datastructures and functions for modules, common to GF and GFC.
-----------------------------------------------------------------------------
module Modules where
@@ -91,6 +91,11 @@ addOpenQualif :: i -> i -> Module i f t -> Module i f t
addOpenQualif i j (Module mt ms fs me ops js) =
Module mt ms fs me (oQualif i j : ops) js
+flagsModule :: (i,ModInfo i f a) -> [f]
+flagsModule (_,mi) = case mi of
+ ModMod m -> flags m
+ _ -> []
+
allFlags :: MGrammar i f a -> [f]
allFlags gr = concat $ map flags $ reverse [m | (_, ModMod m) <- modules gr]