[commit: ghc] master: base: Fix map/coerce comment (413c747)

git at git.haskell.org git at git.haskell.org
Thu Nov 13 07:43:58 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/413c747ab1daaf489b6ef4106739df280323525b/ghc

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

commit 413c747ab1daaf489b6ef4106739df280323525b
Author: David Feuer <David.Feuer at gmail.com>
Date:   Thu Nov 13 08:43:33 2014 +0100

    base: Fix map/coerce comment
    
    Make the comment on the map/coerce rule refer to the right section in
    the paper; give the full name of the papers, and name its authors.
    
    [skip ci]
    
    Differential Revision: https://phabricator.haskell.org/D472


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

413c747ab1daaf489b6ef4106739df280323525b
 libraries/base/GHC/Base.hs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index 0d20e34..397e2b7 100644
--- a/libraries/base/GHC/Base.hs
+++ b/libraries/base/GHC/Base.hs
@@ -864,9 +864,8 @@ mapFB c f = \x ys -> c (f x) ys
 "mapFB"     forall c f g.       mapFB (mapFB c f) g     = mapFB c (f.g)
   #-}
 
--- There's also a rule for Map and Data.Coerce. See "Safe Coercions",
--- section 6.4:
---
+-- See Breitner, Eisenberg, Peyton Jones, and Weirich, "Safe Zero-cost
+-- Coercions for Haskell", section 6.5:
 --   http://research.microsoft.com/en-us/um/people/simonpj/papers/ext-f/coercible.pdf
 
 {-# RULES "map/coerce" [1] map coerce = coerce #-}



More information about the ghc-commits mailing list