diff --git a/gf.cabal b/gf.cabal index 5142294f6..fb4acef69 100644 --- a/gf.cabal +++ b/gf.cabal @@ -189,7 +189,7 @@ Library GF.Compile.PGFtoJava GF.Haskell GF.Compile.ConcreteToHaskell - GF.Compile.ConcreteToCanonical + GF.Compile.GrammarToCanonical GF.Grammar.Canonical GF.Grammar.CanonicalJSON GF.Compile.PGFtoJS diff --git a/src/compiler/GF/Compile/ConcreteToHaskell.hs b/src/compiler/GF/Compile/ConcreteToHaskell.hs index 51ed5242e..804db9d50 100644 --- a/src/compiler/GF/Compile/ConcreteToHaskell.hs +++ b/src/compiler/GF/Compile/ConcreteToHaskell.hs @@ -11,7 +11,7 @@ import GF.Infra.Ident(Ident,identS,identW,prefixIdent) import GF.Infra.Option import GF.Haskell as H import GF.Grammar.Canonical as C -import GF.Compile.ConcreteToCanonical +import GF.Compile.GrammarToCanonical import Debug.Trace(trace) -- | Generate Haskell code for the all concrete syntaxes associated with diff --git a/src/compiler/GF/Compile/ConcreteToCanonical.hs b/src/compiler/GF/Compile/GrammarToCanonical.hs similarity index 97% rename from src/compiler/GF/Compile/ConcreteToCanonical.hs rename to src/compiler/GF/Compile/GrammarToCanonical.hs index 34c7bee73..4bd9130b2 100644 --- a/src/compiler/GF/Compile/ConcreteToCanonical.hs +++ b/src/compiler/GF/Compile/GrammarToCanonical.hs @@ -1,6 +1,6 @@ -- | Translate grammars to Canonical form -- (a common intermediate representation to simplify export to other formats) -module GF.Compile.ConcreteToCanonical(grammar2canonical,abstract2canonical,concretes2canonical) where +module GF.Compile.GrammarToCanonical(grammar2canonical,abstract2canonical,concretes2canonical) where import Data.List(nub,partition) import qualified Data.Map as M import qualified Data.Set as S @@ -55,7 +55,7 @@ abstract2canonical absname gr = -- | Generate Canonical code for the all concrete syntaxes associated with -- the named abstract syntax in given the grammar. concretes2canonical opts absname gr = - [(cncname,concrete2canonical opts gr cenv absname cnc cncmod) + [(cncname,concrete2canonical gr cenv absname cnc cncmod) | let cenv = resourceValues opts gr, cnc<-allConcretes gr absname, let cncname = "canonical/"++render cnc ++ ".gf" :: FilePath @@ -63,9 +63,7 @@ concretes2canonical opts absname gr = ] -- | Generate Canonical GF for the given concrete module. --- The only options that make a difference are --- @-haskell=noprefix@ and @-haskell=variants@. -concrete2canonical opts gr cenv absname cnc modinfo = +concrete2canonical gr cenv absname cnc modinfo = Concrete (modId cnc) (modId absname) (convFlags gr cnc) (neededParamTypes S.empty (params defs)) [lincat|(_,Left lincat)<-defs] diff --git a/src/compiler/GF/Compiler.hs b/src/compiler/GF/Compiler.hs index efb1ae70f..4003285b8 100644 --- a/src/compiler/GF/Compiler.hs +++ b/src/compiler/GF/Compiler.hs @@ -7,7 +7,7 @@ import GF.Compile as S(batchCompile,link,srcAbsName) import GF.CompileInParallel as P(parallelBatchCompile) import GF.Compile.Export import GF.Compile.ConcreteToHaskell(concretes2haskell) -import GF.Compile.ConcreteToCanonical--(concretes2canonical) +import GF.Compile.GrammarToCanonical--(concretes2canonical) import GF.Compile.CFGtoPGF import GF.Compile.GetGrammar import GF.Grammar.BNFC