Three fixes for compatibility with GHC 7.8

Two of the fixes were in the custom version of the binary package. We
should get rid of it at some point, to reduce the maintenance burden.

The third fix was to add new version constraints for happy and alex in
gf.cabal. New versions of them are needed because of the ugly, low-level,
GHC-specific code they produce need to be different for GHC 7.8.

More fixes might be needed for -server mode, but the cgi package is not
compatible with GHC 7.8 at the moment, so it will have to wait.
This commit is contained in:
hallgren
2014-03-04 14:13:41 +00:00
parent 534973ac49
commit 73221769c2
3 changed files with 10 additions and 1 deletions

View File

@@ -159,7 +159,12 @@ Executable gf
--if flag(new-comp)
-- cpp-options: -DNEW_COMP
build-tools: happy, alex>=3
build-tools: happy
if impl(ghc>=7.8)
build-tools: happy>=1.19, alex>=3.1
else
build-tools: happy, alex>=3
if os(windows)
build-depends: Win32

View File

@@ -55,6 +55,7 @@ module Data.Binary.Builder (
) where
import Foreign
import System.IO.Unsafe(unsafePerformIO)
import Data.Monoid
--import Data.Word
import qualified Data.ByteString as S

View File

@@ -89,6 +89,9 @@ import Control.Applicative (Applicative(..))
import Foreign
-- used by splitAtST
#if MIN_VERSION_base(4,6,0)
import Control.Monad.ST.Unsafe(unsafeInterleaveST)
#endif
import Control.Monad.ST
import Data.STRef