From 3bfcfa157dc291e03bfb4db3baed8b0098d76f50 Mon Sep 17 00:00:00 2001 From: hallgren Date: Tue, 21 Oct 2014 14:42:31 +0000 Subject: 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) --- src/compiler/GF/Grammar/Binary.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler/GF/Grammar/Binary.hs') 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) -- cgit v1.2.3