diff options
author | Ben Gamari <ben@smart-cactus.org> | 2016-09-12 14:54:30 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-09-15 09:19:50 -0400 |
commit | 626db8f82e734e48eef5ce7676a5233f98fe7145 (patch) | |
tree | ddbb493a24e2565b4f756c6c8ef97a832c4e0bee /compiler/utils/Maybes.hs | |
parent | 912384535d2ac7452d3bcda34cdee238e30600c9 (diff) | |
download | haskell-626db8f82e734e48eef5ce7676a5233f98fe7145.tar.gz |
Unify CallStack handling in ghc
Here we introduce compatibility wrappers for HasCallStack constraints.
This is necessary as we must support GHC 7.10.1 which lacks sane call
stack support. We also introduce another constraint synonym,
HasDebugCallStack, which only provides a call stack when DEBUG is set.
Diffstat (limited to 'compiler/utils/Maybes.hs')
-rw-r--r-- | compiler/utils/Maybes.hs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/utils/Maybes.hs b/compiler/utils/Maybes.hs index b400fa6b32..89dd5b4fae 100644 --- a/compiler/utils/Maybes.hs +++ b/compiler/utils/Maybes.hs @@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE KindSignatures #-} +{-# LANGUAGE FlexibleContexts #-} {- (c) The University of Glasgow 2006 @@ -26,12 +27,7 @@ import Control.Monad import Control.Monad.Trans.Maybe import Control.Exception (catch, SomeException(..)) import Data.Maybe -#if __GLASGOW_HASKELL__ >= 800 -import GHC.Stack -#else -import GHC.Exts (Constraint) -type HasCallStack = (() :: Constraint) -#endif +import Util (HasCallStack) infixr 4 `orElse` |