[commit: ghc] master: Comments only (instances for Proxy are lazy) (582217f)
git at git.haskell.org
git at git.haskell.org
Fri Oct 3 13:26:00 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/582217fc25167afa0111c398aca65727a9dd9b6e/ghc
>---------------------------------------------------------------
commit 582217fc25167afa0111c398aca65727a9dd9b6e
Author: Reid Barton <rwbarton at gmail.com>
Date: Fri Oct 3 09:02:45 2014 -0400
Comments only (instances for Proxy are lazy)
>---------------------------------------------------------------
582217fc25167afa0111c398aca65727a9dd9b6e
libraries/base/Data/Proxy.hs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libraries/base/Data/Proxy.hs b/libraries/base/Data/Proxy.hs
index 38a43b0..3ead549 100644
--- a/libraries/base/Data/Proxy.hs
+++ b/libraries/base/Data/Proxy.hs
@@ -34,6 +34,10 @@ data Proxy t = Proxy
-- There are no instances for this because it is intended at the kind level only
data KProxy (t :: *) = KProxy
+-- It's common to use (undefined :: Proxy t) and (Proxy :: Proxy t)
+-- interchangeably, so all of these instances are hand-written to be
+-- lazy in Proxy arguments.
+
instance Eq (Proxy s) where
_ == _ = True
More information about the ghc-commits
mailing list