Commit 08040f9b authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Tweak the GHC-8 / binary-0.8 version CPP hackery

Try and pick the right default for ghc-8.
parent ccd618ef
......@@ -5,19 +5,22 @@
-- Hack approach to support bootstrapping.
-- Assume binary <0.8 when MIN_VERSION_binary macro is not available.
-- Starting with GHC>=8.0, the compiler will hopefully provide this macros too.
-- Otherwise, one can specify -DMIN_VERSION_binary_0_8_0=1, when bootstrapping
-- with binary >=
-- When MIN_VERSION_binary macro is available, use it. But it's not available
-- during bootstrapping (or anyone else building Setup.hs directly). If the
-- builder specifies -DMIN_VERSION_binary_0_8_0=1 or =0 then we respect that.
-- Otherwise we pick a default based on GHC version: assume binary <0.8 when
-- GHC < 8.0, and binary >=0.8 when GHC >= 8.0.
#ifdef MIN_VERSION_binary
#define MIN_VERSION_binary_0_8_0 MIN_VERSION_binary(0,8,0)
#ifndef MIN_VERSION_binary_0_8_0
#if __GLASGOW_HASKELL__ >= 800
#define MIN_VERSION_binary_0_8_0 1
#define MIN_VERSION_binary_0_8_0 0
#if !MIN_VERSION_binary_0_8_0
{-# OPTIONS_GHC -fno-warn-orphans #-}
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