[commit: ghc] master: Associate ErrorCall pattern with ErrorCall type (9f4ca5a)

git at git.haskell.org git at git.haskell.org
Tue Dec 8 10:10:00 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9f4ca5afaccc8a397d8ee91b5423a9c2fcd151ce/ghc

>---------------------------------------------------------------

commit 9f4ca5afaccc8a397d8ee91b5423a9c2fcd151ce
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Tue Dec 8 11:09:48 2015 +0100

    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


>---------------------------------------------------------------

9f4ca5afaccc8a397d8ee91b5423a9c2fcd151ce
 libraries/base/Control/Exception.hs      | 3 +--
 libraries/base/Control/Exception/Base.hs | 3 +--
 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 1383972..9c388f4 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 ba2502f..ece5c69 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 c31a203..e4925c7 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



More information about the ghc-commits mailing list