summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-01-31 15:54:25 +0000
committerkrasimir <krasimir@chalmers.se>2010-01-31 15:54:25 +0000
commitbe6465a2ebb1aba43433cff29bf5bad6e2065e26 (patch)
tree8702aca1395dbf3f91379eb73378badf1742db5c /src/compiler/GF/Compile
parentacd927f87bfcc9b1a3b9f38371239adf27a3bf6b (diff)
refactor GF.Infra.Modules for better error messages
Diffstat (limited to 'src/compiler/GF/Compile')
-rw-r--r--src/compiler/GF/Compile/GrammarToPGF.hs2
-rw-r--r--src/compiler/GF/Compile/Rename.hs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/GF/Compile/GrammarToPGF.hs b/src/compiler/GF/Compile/GrammarToPGF.hs
index 364b54bd3..76b16260d 100644
--- a/src/compiler/GF/Compile/GrammarToPGF.hs
+++ b/src/compiler/GF/Compile/GrammarToPGF.hs
@@ -570,7 +570,7 @@ prTrace tr n = trace (render (text "-- OBSERVE" <+> A.ppTerm Unqualified 0 tr <
-- | this function finds out what modules are really needed in the canonical gr.
-- its argument is typically a concrete module name
-requiredCanModules :: (Ord i, Show i) => Bool -> M.MGrammar i a -> i -> [i]
+requiredCanModules :: Bool -> M.MGrammar a -> Ident -> [Ident]
requiredCanModules isSingle gr c = nub $ filter notReuse ops ++ exts where
exts = M.allExtends gr c
ops = if isSingle
diff --git a/src/compiler/GF/Compile/Rename.hs b/src/compiler/GF/Compile/Rename.hs
index 30616b4cb..b3f3426da 100644
--- a/src/compiler/GF/Compile/Rename.hs
+++ b/src/compiler/GF/Compile/Rename.hs
@@ -57,7 +57,7 @@ renameModule ms (name,mo) = checkIn (text "renaming module" <+> ppIdent name) $
js2 <- checkMap (renameInfo mo status) js1
return (name, mo {opens = map forceQualif (opens mo), jments = js2})
-type Status = (StatusTree, [(OpenSpec Ident, StatusTree)])
+type Status = (StatusTree, [(OpenSpec, StatusTree)])
type StatusTree = BinTree Ident StatusInfo
@@ -112,7 +112,7 @@ info2status mq (c,i) = case i of
AnyInd False m -> maybe Cn (const (Q m)) mq
_ -> maybe Cn Q mq
-tree2status :: OpenSpec Ident -> BinTree Ident Info -> BinTree Ident StatusInfo
+tree2status :: OpenSpec -> BinTree Ident Info -> BinTree Ident StatusInfo
tree2status o = case o of
OSimple i -> mapTree (info2status (Just i))
OQualif i j -> mapTree (info2status (Just j))
@@ -127,7 +127,7 @@ buildStatus gr c mo = let mo' = self2status c mo in do
then (emptyBinTree, reverse sts) -- the module itself does not define any names
else (mo',reverse sts) -- so the empty ident is not needed
-modInfo2status :: (OpenSpec Ident,SourceModInfo) -> (OpenSpec Ident, StatusTree)
+modInfo2status :: (OpenSpec,SourceModInfo) -> (OpenSpec, StatusTree)
modInfo2status (o,mo) = (o,tree2status o (jments mo))
self2status :: Ident -> SourceModInfo -> StatusTree