diff options
| author | hallgren <hallgren@chalmers.se> | 2013-11-05 13:11:10 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2013-11-05 13:11:10 +0000 |
| commit | 3814841d7d3b77b3f033cb98c1c0a04ac39435d7 (patch) | |
| tree | 1ad913a0a7ca870b7ec62db86afbc422cab97df1 /src/compiler/GF/Compile/GeneratePMCFG.hs | |
| parent | 74357cdedf90178253d5d812931cb78a9bdf54aa (diff) | |
Eliminate mutual dependencies between the GF compiler and the PGF library
+ References to modules under src/compiler have been eliminated from the PGF
library (under src/runtime/haskell). Only two functions had to be moved (from
GF.Data.Utilities to PGF.Utilities) to make this possible, other apparent
dependencies turned out to be vacuous.
+ In gf.cabal, the GF executable no longer directly depends on the PGF library
source directory, but only on the exposed library modules. This means that
there is less duplication in gf.cabal and that the 30 modules in the
PGF library will no longer be compiled twice while building GF.
To make this possible, additional PGF library modules have been exposed, even
though they should probably be considered for internal use only. They could
be collected in a PGF.Internal module, or marked as "unstable", to make
this explicit.
+ Also, by using the -fwarn-unused-imports flag, ~220 redundant imports were
found and removed, reducing the total number of imports by ~15%.
Diffstat (limited to 'src/compiler/GF/Compile/GeneratePMCFG.hs')
| -rw-r--r-- | src/compiler/GF/Compile/GeneratePMCFG.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index bf4bebdec..99df9af3e 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -13,7 +13,7 @@ module GF.Compile.GeneratePMCFG (generatePMCFG, pgfCncCat, addPMCFG, resourceValues ) where -import PGF.CId +--import PGF.CId import PGF.Data(CncCat(..),Symbol(..),fidVar) import GF.Infra.Option @@ -24,23 +24,23 @@ import GF.Grammar.Lockfield (isLockLabel) import GF.Data.BacktrackM import GF.Data.Operations import GF.Infra.UseIO (IOE) -import GF.Data.Utilities (updateNthM, updateNth) +import GF.Data.Utilities (updateNthM) --updateNth import GF.Compile.Compute.ConcreteNew(GlobalEnv,normalForm,resourceValues,ppL) import System.IO(hPutStr,hPutStrLn,stderr) import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.List as List -import qualified Data.IntMap as IntMap +--import qualified Data.IntMap as IntMap import qualified Data.IntSet as IntSet import Text.PrettyPrint hiding (Str) import Data.Array.IArray import Data.Array.Unboxed -import Data.Maybe -import Data.Char (isDigit) +--import Data.Maybe +--import Data.Char (isDigit) import Control.Monad import Control.Monad.Identity import Control.Monad.Trans (liftIO) -import Control.Exception +--import Control.Exception ---------------------------------------------------------------------- -- main conversion function |
