diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-08 11:09:48 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-08 11:09:53 +0100 |
commit | 9f4ca5afaccc8a397d8ee91b5423a9c2fcd151ce (patch) | |
tree | 862135235e1b09e0c9cb22164de25ba7878af8e0 | |
parent | 2f6e87a494330837c425dab67ba26ee36bd9eacf (diff) | |
download | haskell-9f4ca5afaccc8a397d8ee91b5423a9c2fcd151ce.tar.gz |
Associate ErrorCall pattern with ErrorCall type
This way,
import Control.Exception (ErrorCall(ErrorCall))
or
import Control.Exception (ErrorCall(..))
work as expected, and import the `ErrorCall` compatibility pattern as well.
When #5273 was implemented, it wasn't possible yet to associated
patterns with their types (see #10653).
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D1588
-rw-r--r-- | libraries/base/Control/Exception.hs | 3 | ||||
-rw-r--r-- | libraries/base/Control/Exception/Base.hs | 3 | ||||
-rw-r--r-- | libraries/base/GHC/Exception.hs | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/libraries/base/Control/Exception.hs b/libraries/base/Control/Exception.hs index 1383972c7a..9c388f4450 100644 --- a/libraries/base/Control/Exception.hs +++ b/libraries/base/Control/Exception.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE NoImplicitPrelude, ExistentialQuantification, PatternSynonyms #-} +{-# LANGUAGE NoImplicitPrelude, ExistentialQuantification #-} ----------------------------------------------------------------------------- -- | @@ -56,7 +56,6 @@ module Control.Exception ( RecSelError(..), RecUpdError(..), ErrorCall(..), - pattern ErrorCall, TypeError(..), -- * Throwing exceptions diff --git a/libraries/base/Control/Exception/Base.hs b/libraries/base/Control/Exception/Base.hs index ba2502f379..ece5c69dd5 100644 --- a/libraries/base/Control/Exception/Base.hs +++ b/libraries/base/Control/Exception/Base.hs @@ -1,6 +1,5 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash #-} -{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE StandaloneDeriving #-} ----------------------------------------------------------------------------- @@ -39,7 +38,7 @@ module Control.Exception.Base ( RecConError(..), RecSelError(..), RecUpdError(..), - ErrorCall(..), pattern ErrorCall, + ErrorCall(..), TypeError(..), -- #10284, custom error type for deferred type errors -- * Throwing exceptions diff --git a/libraries/base/GHC/Exception.hs b/libraries/base/GHC/Exception.hs index c31a203f9b..e4925c782b 100644 --- a/libraries/base/GHC/Exception.hs +++ b/libraries/base/GHC/Exception.hs @@ -24,7 +24,7 @@ module GHC.Exception ( Exception(..) -- Class , throw - , SomeException(..), ErrorCall(..), pattern ErrorCall, ArithException(..) + , SomeException(..), ErrorCall(..,ErrorCall), ArithException(..) , divZeroException, overflowException, ratioZeroDenomException , errorCallException, errorCallWithCallStackException , showCallStack, popCallStack, showSrcLoc |