diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-01-06 10:14:13 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-17 05:52:26 -0500 |
commit | 84dcb8440e94fab5aaba66e613de27d89264f076 (patch) | |
tree | 5b04cd3e7ba11352b61c3b042d23d8d8f2f47f52 /libraries/base | |
parent | 55a8f86024098ae62d6a2aa00ae850de0e2bc79d (diff) | |
download | haskell-84dcb8440e94fab5aaba66e613de27d89264f076.tar.gz |
Revert "Remove SpecConstrAnnotation (#13681)" (#19168)
This reverts commit 7bc3a65b467c4286377b9bded277d5a2f69160b3.
NoSpecConstr is used in the wild (see #19168)
Diffstat (limited to 'libraries/base')
-rwxr-xr-x | libraries/base/GHC/Exts.hs | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/libraries/base/GHC/Exts.hs b/libraries/base/GHC/Exts.hs index 31788c24c0..d1ca1cfff8 100755 --- a/libraries/base/GHC/Exts.hs +++ b/libraries/base/GHC/Exts.hs @@ -5,8 +5,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE Unsafe #-} - -{-# OPTIONS_HADDOCK not-home #-} +{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | @@ -99,6 +98,9 @@ module GHC.Exts -- * Event logging traceEvent, + -- * SpecConstr annotations + SpecConstrAnnotation(..), + -- * The call stack currentCallStack, @@ -124,6 +126,7 @@ import GHC.Stack import qualified Data.Coerce import Data.String import Data.OldList +import Data.Data import Data.Ord import Data.Version ( Version(..), makeVersion ) import qualified Debug.Trace @@ -173,6 +176,25 @@ traceEvent = Debug.Trace.traceEventIO {- ********************************************************************** * * +* SpecConstr annotation * +* * +********************************************************************** -} + +-- Annotating a type with NoSpecConstr will make SpecConstr +-- not specialise for arguments of that type. + +-- This data type is defined here, rather than in the SpecConstr module +-- itself, so that importing it doesn't force stupidly linking the +-- entire ghc package at runtime + +data SpecConstrAnnotation = NoSpecConstr | ForceSpecConstr + deriving ( Data -- ^ @since 4.3.0.0 + , Eq -- ^ @since 4.3.0.0 + ) + + +{- ********************************************************************** +* * * The IsList class * * * ********************************************************************** -} |