diff options
| author | hallgren <hallgren@chalmers.se> | 2014-10-21 14:42:31 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-10-21 14:42:31 +0000 |
| commit | 3bfcfa157dc291e03bfb4db3baed8b0098d76f50 (patch) | |
| tree | 8e71873156f297219ff79803990c7c22ffe7c198 /src/compiler/GF/Interactive.hs | |
| parent | f6441b22921c6ae24840d60b80672d499ddaef33 (diff) | |
Renaming SourceGrammar to Grammar and similarly for some related types
Included renamings:
SourceGrammar -> Grammar
SourceModule -> Module
SourceModInfo -> ModuleInfo
emptySourceGrammar -> emptyGrammar
Also introduces a type synonym (which might be good to turn into a newtype):
type ModuleName = Ident
The reason is to make types like the following more self documenting:
type Module = (ModuleName,ModuleInfo)
type QIdent = (ModuleName,Ident)
Diffstat (limited to 'src/compiler/GF/Interactive.hs')
| -rw-r--r-- | src/compiler/GF/Interactive.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/GF/Interactive.hs b/src/compiler/GF/Interactive.hs index 2af5b092b..bcef32294 100644 --- a/src/compiler/GF/Interactive.hs +++ b/src/compiler/GF/Interactive.hs @@ -153,7 +153,7 @@ execute1 opts gfenv0 s0 = continue = return . Just stop = return Nothing env = commandenv gfenv0 - sgr = sourcegrammar gfenv0 + sgr = grammar gfenv0 gfenv = gfenv0 {history = s0 : history gfenv0} pwords s = case words s of w:ws -> getCommandOp w :ws @@ -280,7 +280,7 @@ execute1 opts gfenv0 s0 = continue gfenv' empty = continue $ gfenv { - commandenv=emptyCommandEnv, sourcegrammar = emptySourceGrammar + commandenv=emptyCommandEnv, grammar = emptyGrammar } define_command (f:ws) = @@ -355,8 +355,8 @@ fetchCommand gfenv = do importInEnv :: GFEnv -> Options -> [FilePath] -> SIO GFEnv importInEnv gfenv opts files | flag optRetainResource opts = - do src <- importSource (sourcegrammar gfenv) opts files - return $ gfenv {sourcegrammar = src} + do src <- importSource (grammar gfenv) opts files + return $ gfenv {grammar = src} | otherwise = do let opts' = addOptions (setOptimization OptCSE False) opts pgf0 = multigrammar (commandenv gfenv) @@ -398,14 +398,14 @@ prompt env abs = abstractName (multigrammar env) data GFEnv = GFEnv { - sourcegrammar :: SourceGrammar, -- gfo grammar -retain + grammar :: Grammar, -- gfo grammar -retain commandenv :: CommandEnv, history :: [String] } emptyGFEnv :: GFEnv emptyGFEnv = - GFEnv emptySourceGrammar (mkCommandEnv emptyPGF) [] {-0-} + GFEnv emptyGrammar (mkCommandEnv emptyPGF) [] {-0-} wordCompletion gfenv (left,right) = do case wc_type (reverse left) of |
