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/CompileOne.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/CompileOne.hs')
| -rw-r--r-- | src/compiler/GF/CompileOne.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/GF/CompileOne.hs b/src/compiler/GF/CompileOne.hs index 17ef93935..3851b1f79 100644 --- a/src/compiler/GF/CompileOne.hs +++ b/src/compiler/GF/CompileOne.hs @@ -29,14 +29,14 @@ import GF.Text.Pretty(render,(<+>),($$)) --Doc, import Control.Monad((<=<)) type OneOutput = (Maybe FullPath,CompiledModule) -type CompiledModule = SourceModule +type CompiledModule = Module compileOne, reuseGFO, useTheSource :: (Output m,ErrorMonad m,MonadIO m) => - Options -> SourceGrammar -> FullPath -> m OneOutput + Options -> Grammar -> FullPath -> m OneOutput -- | Compile a given source file (or just load a .gfo file), --- given a 'SourceGrammar' containing everything it depends on. +-- given a 'Grammar' containing everything it depends on. -- Calls 'reuseGFO' or 'useTheSource'. compileOne opts srcgr file = if isGFO file @@ -66,7 +66,7 @@ reuseGFO opts srcgr file = return (Just file,sm) ---useTheSource :: Options -> SourceGrammar -> FullPath -> IOE OneOutput +--useTheSource :: Options -> Grammar -> FullPath -> IOE OneOutput -- | Compile GF module from source. It both returns the result and -- stores it in a @.gfo@ file -- (or a tags file, if running with the @-tags@ option) @@ -83,7 +83,7 @@ useTheSource opts srcgr file = | verbAtLeast opts Normal = putStrE m >> act | otherwise = putPointE Verbose opts v act -type CompileSource = SourceGrammar -> SourceModule -> IOE OneOutput +type CompileSource = Grammar -> Module -> IOE OneOutput --compileSourceModule :: Options -> FilePath -> Maybe FilePath -> CompileSource compileSourceModule opts cwd mb_gfFile gr = |
