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/Infra | |
| 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/Infra')
| -rw-r--r-- | src/compiler/GF/Infra/CheckM.hs | 4 | ||||
| -rw-r--r-- | src/compiler/GF/Infra/GetOpt.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Infra/Option.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Infra/SIO.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Infra/UseIO.hs | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/GF/Infra/CheckM.hs b/src/compiler/GF/Infra/CheckM.hs index b998f7508..2f8a842e5 100644 --- a/src/compiler/GF/Infra/CheckM.hs +++ b/src/compiler/GF/Infra/CheckM.hs @@ -20,9 +20,9 @@ module GF.Infra.CheckM ) where import GF.Data.Operations -import GF.Infra.Ident +--import GF.Infra.Ident --import GF.Grammar.Grammar(Context) -import GF.Grammar.Printer +--import GF.Grammar.Printer import qualified Data.Map as Map import Text.PrettyPrint diff --git a/src/compiler/GF/Infra/GetOpt.hs b/src/compiler/GF/Infra/GetOpt.hs index ede561c90..648d51919 100644 --- a/src/compiler/GF/Infra/GetOpt.hs +++ b/src/compiler/GF/Infra/GetOpt.hs @@ -69,7 +69,7 @@ module GF.Infra.GetOpt ( import Prelude -- necessary to get dependencies right -import Data.List ( isPrefixOf, find ) +--import Data.List ( isPrefixOf, find ) -- |What to do with options following non-options data ArgOrder a diff --git a/src/compiler/GF/Infra/Option.hs b/src/compiler/GF/Infra/Option.hs index 554468783..e0cba05e4 100644 --- a/src/compiler/GF/Infra/Option.hs +++ b/src/compiler/GF/Infra/Option.hs @@ -36,7 +36,7 @@ import GF.Infra.GetOpt import GF.Grammar.Predef --import System.Console.GetOpt import System.FilePath -import System.IO +--import System.IO import GF.Data.ErrM diff --git a/src/compiler/GF/Infra/SIO.hs b/src/compiler/GF/Infra/SIO.hs index 1011b8df4..ff2072987 100644 --- a/src/compiler/GF/Infra/SIO.hs +++ b/src/compiler/GF/Infra/SIO.hs @@ -20,7 +20,7 @@ module GF.Infra.SIO( ) where import Prelude hiding (putStrLn,print) import Control.Monad(liftM) -import System.IO(Handle,hPutStrLn,hFlush,stdout) +import System.IO(hPutStrLn,hFlush,stdout) import GF.System.Catch(try) import System.Cmd(system) import System.Environment(getEnv) diff --git a/src/compiler/GF/Infra/UseIO.hs b/src/compiler/GF/Infra/UseIO.hs index 140c2623f..d16440372 100644 --- a/src/compiler/GF/Infra/UseIO.hs +++ b/src/compiler/GF/Infra/UseIO.hs @@ -29,7 +29,7 @@ import System.IO.Error(isUserError,ioeGetErrorString) import System.Environment import System.Exit import System.CPUTime -import System.Cmd +--import System.Cmd import Text.Printf import Control.Monad import Control.Monad.Trans(MonadIO(..)) |
