summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar/Binary.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-10-21 14:42:31 +0000
committerhallgren <hallgren@chalmers.se>2014-10-21 14:42:31 +0000
commit3bfcfa157dc291e03bfb4db3baed8b0098d76f50 (patch)
tree8e71873156f297219ff79803990c7c22ffe7c198 /src/compiler/GF/Grammar/Binary.hs
parentf6441b22921c6ae24840d60b80672d499ddaef33 (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.hs4
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)