summaryrefslogtreecommitdiff
path: root/src/GFI.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-09-11 13:45:34 +0000
committerkrasimir <krasimir@chalmers.se>2009-09-11 13:45:34 +0000
commit1cdf171251a56baf0867b65a95c9bd59801ff912 (patch)
tree837e65fa23f3041c3bbf4b7f1dbfcf63990e09a1 /src/GFI.hs
parent28a7c4b5c7659dc18166e06e914fb0a81c1c43bc (diff)
polish the PGF API and make Expr and Type abstract types. Tree is a type synonym of Expr
Diffstat (limited to 'src/GFI.hs')
-rw-r--r--src/GFI.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GFI.hs b/src/GFI.hs
index 654022c72..170e4be34 100644
--- a/src/GFI.hs
+++ b/src/GFI.hs
@@ -184,7 +184,7 @@ importInEnv gfenv opts files
pgf0 = multigrammar (commandenv gfenv)
pgf1 <- importGrammar pgf0 opts' files
if (verbAtLeast opts Normal)
- then putStrLnFlush $ unwords $ "\nLanguages:" : map prCId (languages pgf1)
+ then putStrLnFlush $ unwords $ "\nLanguages:" : map showCId (languages pgf1)
else return ()
return $ gfenv { commandenv = mkCommandEnv (coding gfenv) pgf1 }
@@ -215,7 +215,7 @@ welcome = unlines [
prompt env
| abs == wildCId = "> "
- | otherwise = prCId abs ++ "> "
+ | otherwise = showCId abs ++ "> "
where
abs = abstractName (multigrammar env)
@@ -265,7 +265,7 @@ wordCompletion gfenv line0 prefix0 p =
CmplIdent _ pref
-> do mb_abs <- try (evaluate (abstract pgf))
case mb_abs of
- Right abs -> ret ' ' [name | cid <- Map.keys (funs abs), let name = prCId cid, isPrefixOf pref name]
+ Right abs -> ret ' ' [name | cid <- Map.keys (funs abs), let name = showCId cid, isPrefixOf pref name]
Left (_ :: SomeException) -> ret ' ' []
_ -> ret ' ' []
where
@@ -276,7 +276,7 @@ wordCompletion gfenv line0 prefix0 p =
cmdEnv = commandenv gfenv
optLang opts = valCIdOpts "lang" (head (languages pgf)) opts
optType opts =
- let str = valStrOpts "cat" (prCId $ lookStartCat pgf) opts
+ let str = valStrOpts "cat" (showCId $ lookStartCat pgf) opts
in case readType str of
Just ty -> ty
Nothing -> error ("Can't parse '"++str++"' as type")