summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar/Macros.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-10-21 19:20:31 +0000
committerhallgren <hallgren@chalmers.se>2014-10-21 19:20:31 +0000
commit391b301881bee7de9580f2c6d819144161e6a51d (patch)
tree11e61e5252bfe6939eee9ef14d19bd7ca6c8bb40 /src/compiler/GF/Grammar/Macros.hs
parent3bfcfa157dc291e03bfb4db3baed8b0098d76f50 (diff)
ModuleName and Ident are now distinct types
This makes the documentation clearer, and can potentially catch more programming mistakes.
Diffstat (limited to 'src/compiler/GF/Grammar/Macros.hs')
-rw-r--r--src/compiler/GF/Grammar/Macros.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Grammar/Macros.hs b/src/compiler/GF/Grammar/Macros.hs
index 66ef50ce9..95181cfbd 100644
--- a/src/compiler/GF/Grammar/Macros.hs
+++ b/src/compiler/GF/Grammar/Macros.hs
@@ -46,7 +46,7 @@ typeForm t =
in ([],cat,args ++ [a])
Q c -> ([],c,[])
QC c -> ([],c,[])
- Sort c -> ([],(identW, c),[])
+ Sort c -> ([],(MN identW, c),[])
_ -> error (render ("no normal form of type" <+> ppTerm Unqualified 0 t))
typeFormCnc :: Type -> (Context, Type)
@@ -416,7 +416,7 @@ patt2term pt = case pt of
PNeg a -> appCons cNeg [(patt2term a)] --- an encoding
-redirectTerm :: Ident -> Term -> Term
+redirectTerm :: ModuleName -> Term -> Term
redirectTerm n t = case t of
QC (_,f) -> QC (n,f)
Q (_,f) -> Q (n,f)
@@ -588,7 +588,7 @@ sortRec = sortBy ordLabel where
-- | dependency check, detecting circularities and returning topo-sorted list
-allDependencies :: (Ident -> Bool) -> BinTree Ident Info -> [(Ident,[Ident])]
+allDependencies :: (ModuleName -> Bool) -> BinTree Ident Info -> [(Ident,[Ident])]
allDependencies ism b =
[(f, nub (concatMap opty (pts i))) | (f,i) <- tree2list b]
where