[commit: ghc] master: Generalizes the type of asProxyTypeOf (#12805) (3eebd1f)

git at git.haskell.org git at git.haskell.org
Thu Jan 26 17:48:51 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3eebd1f5fd56689baa63fcc63b7f4bde0ae70d0b/ghc

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

commit 3eebd1f5fd56689baa63fcc63b7f4bde0ae70d0b
Author: Dave Laing <dave.laing.80 at gmail.com>
Date:   Thu Jan 26 12:32:24 2017 -0500

    Generalizes the type of asProxyTypeOf (#12805)
    
    Test Plan: validate
    
    Reviewers: austin, hvr, bgamari, RyanGlScott, simonpj
    
    Reviewed By: RyanGlScott, simonpj
    
    Subscribers: simonpj, RyanGlScott, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3017
    
    GHC Trac Issues: #12805


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

3eebd1f5fd56689baa63fcc63b7f4bde0ae70d0b
 libraries/base/Data/Proxy.hs | 2 +-
 libraries/base/changelog.md  | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libraries/base/Data/Proxy.hs b/libraries/base/Data/Proxy.hs
index 2f619b2..d6f0354 100644
--- a/libraries/base/Data/Proxy.hs
+++ b/libraries/base/Data/Proxy.hs
@@ -113,6 +113,6 @@ instance MonadPlus Proxy
 -- It is usually used as an infix operator, and its typing forces its first
 -- argument (which is usually overloaded) to have the same type as the tag
 -- of the second.
-asProxyTypeOf :: a -> Proxy a -> a
+asProxyTypeOf :: a -> proxy a -> a
 asProxyTypeOf = const
 {-# INLINE asProxyTypeOf #-}
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index 608830a..40e18ff 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -43,6 +43,8 @@
   * Add `type family AppendSymbol (m :: Symbol) (n :: Symbol) :: Symbol` to `GHC.TypeLits`
     (#12162)
 
+  * The type of `asProxyTypeOf` in `Data.Proxy` has been generalized (#12805)
+
 ## 4.9.0.0  *May 2016*
 
   * Bundled with GHC 8.0



More information about the ghc-commits mailing list