Commit 54884220 authored by Ben Gamari's avatar Ben Gamari 🐢

Fix bootstrapping with GHC 7.10.1

Relying on CallStack being in GLASGOW_HASKELL >= 710 breaks
bootstrappability with 7.10.1

7.10.2 added the CallStack mechanism, and GHC already relies on this
while being built. Unfortunately, it is enabled with "GLASGOW_HASKELL
>= 710", which also applies to GHC 7.10.1, which does not have
CallStack, and fails building the stage-1 compiler because the symbol
is not found.

This patch makes the CPP directive more strict, requiring **more than**
7.10 instead of **at least**.

Reviewers: jstolarek, austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1472

GHC Trac Issues: #11085
parent 3353f62a
...@@ -111,8 +111,10 @@ import Data.Graph (SCC(..)) ...@@ -111,8 +111,10 @@ import Data.Graph (SCC(..))
import GHC.Fingerprint import GHC.Fingerprint
import GHC.Show ( showMultiLineString ) import GHC.Show ( showMultiLineString )
#if __GLASGOW_HASKELL__ > 710
import GHC.Stack import GHC.Stack
import GHC.Exception import GHC.Exception
#endif
{- {-
************************************************************************ ************************************************************************
...@@ -1042,7 +1044,7 @@ pprTrace str doc x ...@@ -1042,7 +1044,7 @@ pprTrace str doc x
-- | If debug output is on, show some 'SDoc' on the screen along -- | If debug output is on, show some 'SDoc' on the screen along
-- with a call stack when available. -- with a call stack when available.
#if __GLASGOW_HASKELL__ >= 710 #if __GLASGOW_HASKELL__ > 710
pprSTrace :: (?location :: CallStack) => SDoc -> a -> a pprSTrace :: (?location :: CallStack) => SDoc -> a -> a
pprSTrace = pprTrace (showCallStack ?location) pprSTrace = pprTrace (showCallStack ?location)
#else #else
......
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