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 (
nodeValue,
) where
-- For bootstrapping GHC
#ifdef MIN_VERSION_containers
#if MIN_VERSION_containers(0,5,0)
#define HAVE_containers_050
#endif
#endif
import Prelude ()
import qualified Distribution.Compat.Prelude as Prelude
import Distribution.Compat.Prelude hiding (lookup, null, empty)
import Data.Graph (SCC(..))
import qualified Data.Graph as G
#if MIN_VERSION_containers(0,5,0)
#ifdef HAVE_containers_050
import qualified Data.Map.Strict as Map
#else
import qualified Data.Map as Map
......
{-# 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 X
#if MIN_VERSION_containers(0,5,0)
#ifdef HAVE_containers_050
#else
, insertWith
#endif
) where
#if MIN_VERSION_containers(0,5,0)
#ifdef HAVE_containers_050
import Data.Map.Strict as X
#else
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