Wolfgang Jeltsch pushed to branch wip/jeltsch/stm-exception-improvements at Glasgow Haskell Compiler / GHC

WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.

Deleted commits:

2 changed files:

Changes:

  • libraries/base/src/GHC/Stack.hs
    ... ... @@ -51,3 +51,20 @@ module GHC.Stack
    51 51
          ) where
    
    52 52
     
    
    53 53
     import GHC.Internal.Stack
    
    54
    +
    
    55
    +-- | Explicitly bring the empty call stack into scope.
    
    56
    +--
    
    57
    +-- Mostly useful for silencing warnings generated by @-Wdefaulted-callstack@ in
    
    58
    +-- places such as:
    
    59
    +--
    
    60
    +-- - The body of a class method in an instance of an externally defined type
    
    61
    +--   class whose type signature doesn't contain a 'HasCallStack' constraint.
    
    62
    +--
    
    63
    +-- - The body of the @main@ function.
    
    64
    +--
    
    65
    +-- @since 4.24.0.0
    
    66
    +withEmptyCallStack :: (HasCallStack => a) -> a
    
    67
    +withEmptyCallStack do_this =
    
    68
    +  -- See Note [Warn about defaulted CallStacks]
    
    69
    +  let ?callStack = emptyCallStack
    
    70
    +  in do_this

  • libraries/ghc-internal/src/GHC/Internal/Stack.hs
    ... ... @@ -29,7 +29,7 @@ module GHC.Internal.Stack (
    29 29
         -- * HasCallStack call stacks
    
    30 30
         CallStack, HasCallStack, callStack, emptyCallStack, freezeCallStack,
    
    31 31
         fromCallSiteList, getCallStack, popCallStack,
    
    32
    -    pushCallStack, withFrozenCallStack, withEmptyCallStack,
    
    32
    +    pushCallStack, withFrozenCallStack,
    
    33 33
         prettyCallStackLines, prettyCallStack,
    
    34 34
     
    
    35 35
         -- * Source locations
    
    ... ... @@ -105,23 +105,6 @@ withFrozenCallStack do_this =
    105 105
       let ?callStack = freezeCallStack (popCallStack callStack)
    
    106 106
       in do_this
    
    107 107
     
    
    108
    --- | Explicitly bring the empty call stack into scope.
    
    109
    ---
    
    110
    --- Mostly useful for silencing warnings generated by @-Wdefaulted-callstack@ in
    
    111
    --- places such as:
    
    112
    ---
    
    113
    --- - The body of a class method in an instance of an externally defined type
    
    114
    ---   class whose type signature doesn't contain a 'HasCallStack' constraint.
    
    115
    ---
    
    116
    --- - The body of the @main@ function.
    
    117
    ---
    
    118
    --- @since 4.24.0.0
    
    119
    -withEmptyCallStack :: (HasCallStack => a) -> a
    
    120
    -withEmptyCallStack do_this =
    
    121
    -  -- See Note [Warn about defaulted CallStacks]
    
    122
    -  let ?callStack = emptyCallStack
    
    123
    -  in do_this
    
    124
    -
    
    125 108
     -- prettySrcLoc and prettyCallStack are defined here to avoid hs-boot
    
    126 109
     -- files. See Note [Definition of CallStack]
    
    127 110