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/Grammar/Binary.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/Grammar/Binary.hs')
| -rw-r--r-- | src/compiler/GF/Grammar/Binary.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Grammar/Binary.hs b/src/compiler/GF/Grammar/Binary.hs index 1bdadabd6..76c3796bc 100644 --- a/src/compiler/GF/Grammar/Binary.hs +++ b/src/compiler/GF/Grammar/Binary.hs @@ -37,11 +37,11 @@ instance Binary Ident where then return identW
else return (identC (rawIdentC bs))
-instance Binary SourceGrammar where
+instance Binary Grammar where
put = put . modules
get = fmap mGrammar get
-instance Binary SourceModInfo where
+instance Binary ModuleInfo where
put mi = do put (mtype mi,mstatus mi,mflags mi,mextend mi,mwith mi,mopens mi,mexdeps mi,msrc mi,mseqs mi,jments mi)
get = do (mtype,mstatus,mflags,mextend,mwith,mopens,med,msrc,mseqs,jments) <- get
return (ModInfo mtype mstatus mflags mextend mwith mopens med msrc mseqs jments)
|
