mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-30 23:02:50 -06:00
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)
This commit is contained in:
@@ -14,7 +14,7 @@ import GF.CompileOne(reuseGFO,useTheSource)
|
||||
import GF.Infra.Option
|
||||
import GF.Infra.UseIO
|
||||
import GF.Data.Operations
|
||||
import GF.Grammar.Grammar(emptySourceGrammar,prependModule)
|
||||
import GF.Grammar.Grammar(emptyGrammar,prependModule)
|
||||
import GF.Infra.Ident(identS)
|
||||
import GF.Text.Pretty
|
||||
import qualified Data.ByteString.Lazy as BS
|
||||
@@ -85,7 +85,7 @@ batchCompile1 lib_dir (opts,filepaths) =
|
||||
good (o,r) = do toLog o; return r
|
||||
bad e = do toLog (redPutStrLn e); fail "failed"
|
||||
redPutStrLn s = do ePutStr "\ESC[31m";ePutStr s;ePutStrLn "\ESC[m"
|
||||
sgr <- liftIO $ newMVar emptySourceGrammar
|
||||
sgr <- liftIO $ newMVar emptyGrammar
|
||||
let extendSgr sgr m =
|
||||
modifyMVar_ sgr $ \ gr ->
|
||||
do let gr' = prependModule gr m
|
||||
|
||||
Reference in New Issue
Block a user