From 3814841d7d3b77b3f033cb98c1c0a04ac39435d7 Mon Sep 17 00:00:00 2001 From: hallgren Date: Tue, 5 Nov 2013 13:11:10 +0000 Subject: 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%. --- src/binary/Data/Binary/Builder.hs | 4 ++-- src/binary/Data/Binary/Get.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/binary/Data') diff --git a/src/binary/Data/Binary/Builder.hs b/src/binary/Data/Binary/Builder.hs index 20e287237..183483945 100644 --- a/src/binary/Data/Binary/Builder.hs +++ b/src/binary/Data/Binary/Builder.hs @@ -56,7 +56,7 @@ module Data.Binary.Builder ( import Foreign import Data.Monoid -import Data.Word +--import Data.Word import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L @@ -66,7 +66,7 @@ import qualified Data.ByteString.Base as S #else import Data.ByteString.Internal (inlinePerformIO) import qualified Data.ByteString.Internal as S -import qualified Data.ByteString.Lazy.Internal as L +--import qualified Data.ByteString.Lazy.Internal as L #endif #if defined(__GLASGOW_HASKELL__) && !defined(__HADDOCK__) diff --git a/src/binary/Data/Binary/Get.hs b/src/binary/Data/Binary/Get.hs index 728720b3e..c2c43b691 100644 --- a/src/binary/Data/Binary/Get.hs +++ b/src/binary/Data/Binary/Get.hs @@ -68,7 +68,7 @@ module Data.Binary.Get ( ) where -import Control.Monad (when,liftM,ap) +import Control.Monad (when,liftM) -- ap import Control.Monad.Fix import Data.Maybe (isNothing) @@ -95,7 +95,7 @@ import Data.STRef #if defined(__GLASGOW_HASKELL__) && !defined(__HADDOCK__) import GHC.Base import GHC.Word -import GHC.Int +--import GHC.Int #endif -- | The parse state -- cgit v1.2.3