Commit b0f257b1 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

Fix GHC bootstrapping

GHC's stage0 build doesn't provide MIN_VERSION_* macros. We need to take care to
provide appropriate version check macros by hand in GHC's build system.
parent 6fead251
...@@ -83,13 +83,21 @@ module Distribution.Compat.Graph ( ...@@ -83,13 +83,21 @@ module Distribution.Compat.Graph (
nodeValue, nodeValue,
) where ) where
-- For bootstrapping GHC
#ifdef MIN_VERSION_containers
#if MIN_VERSION_containers(0,5,0)
#define HAVE_containers_050
#endif
#endif
import Prelude () import Prelude ()
import qualified Distribution.Compat.Prelude as Prelude import qualified Distribution.Compat.Prelude as Prelude
import Distribution.Compat.Prelude hiding (lookup, null, empty) import Distribution.Compat.Prelude hiding (lookup, null, empty)
import Data.Graph (SCC(..)) import Data.Graph (SCC(..))
import qualified Data.Graph as G import qualified Data.Graph as G
#if MIN_VERSION_containers(0,5,0)
#ifdef HAVE_containers_050
import qualified Data.Map.Strict as Map import qualified Data.Map.Strict as Map
#else #else
import qualified Data.Map as Map import qualified Data.Map as Map
......
{-# LANGUAGE CPP #-} {-# LANGUAGE CPP #-}
-- For bootstrapping GHC
#ifdef MIN_VERSION_containers
#if MIN_VERSION_containers(0,5,0)
#define HAVE_containers_050
#endif
#endif
module Distribution.Compat.Map.Strict module Distribution.Compat.Map.Strict
( module X ( module X
#if MIN_VERSION_containers(0,5,0) #ifdef HAVE_containers_050
#else #else
, insertWith , insertWith
#endif #endif
) where ) where
#if MIN_VERSION_containers(0,5,0) #ifdef HAVE_containers_050
import Data.Map.Strict as X import Data.Map.Strict as X
#else #else
import Data.Map as X hiding (insertWith, insertWith') import Data.Map as X hiding (insertWith, insertWith')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment