diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-01-06 10:14:13 +0100 |
---|---|---|
committer | Sylvain Henry <sylvain@haskus.fr> | 2021-01-20 11:31:02 +0100 |
commit | f307ed226f50c07a65fb5247ceae6756937a01ce (patch) | |
tree | 8d4710f76496bcde8969801ee590cc6133853b56 /libraries | |
parent | 753fecd27378c65acb09442c0e64373e59e6f76b (diff) | |
download | haskell-f307ed226f50c07a65fb5247ceae6756937a01ce.tar.gz |
Revert "Remove SpecConstrAnnotation (#13681)" (#19168)
This reverts commit 7bc3a65b467c4286377b9bded277d5a2f69160b3.
NoSpecConstr is used in the wild (see #19168)
Cherry-picked from 84dcb8440e94fab5aaba66e613de27d89264f076
Diffstat (limited to 'libraries')
-rwxr-xr-x | libraries/base/GHC/Exts.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libraries/base/GHC/Exts.hs b/libraries/base/GHC/Exts.hs index 9f9d9d9939..061ecf6afb 100755 --- a/libraries/base/GHC/Exts.hs +++ b/libraries/base/GHC/Exts.hs @@ -94,6 +94,9 @@ module GHC.Exts -- * Event logging traceEvent, + -- * SpecConstr annotations + SpecConstrAnnotation(..), + -- * The call stack currentCallStack, @@ -119,6 +122,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 @@ -168,6 +172,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 * * * ********************************************************************** -} |