summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Interactive.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/Interactive.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/Interactive.hs')
-rw-r--r--src/compiler/GF/Interactive.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Interactive.hs b/src/compiler/GF/Interactive.hs
index bcef32294..b4a04658f 100644
--- a/src/compiler/GF/Interactive.hs
+++ b/src/compiler/GF/Interactive.hs
@@ -238,7 +238,7 @@ execute1 opts gfenv0 s0 =
let (os,ts) = partition (isPrefixOf "-") ws
let strip = if elem "-strip" os then stripSourceGrammar else id
let mygr = strip $ case ts of
- _:_ -> mGrammar [(i,m) | (i,m) <- modules sgr, elem (showIdent i) ts]
+ _:_ -> mGrammar [(i,m) | (i,m) <- modules sgr, elem (render i) ts]
[] -> sgr
case 0 of
_ | elem "-detailedsize" os -> putStrLn (printSizesGrammar mygr)
@@ -246,9 +246,9 @@ execute1 opts gfenv0 s0 =
let sz = sizesGrammar mygr
putStrLn $ unlines $
("total\t" ++ show (fst sz)):
- [showIdent j ++ "\t" ++ show (fst k) | (j,k) <- snd sz]
+ [render j ++ "\t" ++ show (fst k) | (j,k) <- snd sz]
_ | elem "-save" os -> mapM_
- (\ m@(i,_) -> let file = (showIdent i ++ ".gfh") in
+ (\ m@(i,_) -> let file = (render i ++ ".gfh") in
restricted $ writeFile file (render (ppModule Qualified m)) >> P.putStrLn ("wrote " ++ file))
(modules mygr)
_ -> putStrLn $ render mygr