Rodrigo Mesquita pushed to branch wip/romes/edsko-exceptions-2 at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
    ... ... @@ -208,12 +208,10 @@ Caught MismatchedParentheses
    208 208
     
    
    209 209
     -}
    
    210 210
     class (Typeable e, Show e) => Exception e where
    
    211
    -    -- | @toException@ should produce a 'SomeException' with no attached 'ExceptionContext'.
    
    212 211
         toException   :: e -> SomeException
    
    213 212
         fromException :: SomeException -> Maybe e
    
    214 213
     
    
    215
    -    toException e = SomeException e
    
    216
    -      where ?exceptionContext = emptyExceptionContext
    
    214
    +    toException e = e
    
    217 215
         fromException (SomeException e) = cast e
    
    218 216
     
    
    219 217
         -- | Render this exception value in a human-friendly manner.