[GHC] #10457: Revise/remove custom mapM implementation for lists

GHC ghc-devs at haskell.org
Mon Jun 1 20:04:40 UTC 2015


#10457: Revise/remove custom mapM implementation for lists
-------------------------------------+-------------------------------------
        Reporter:  dolio             |                   Owner:
            Type:  task              |                  Status:  new
        Priority:  normal            |               Milestone:  7.10.2
       Component:  libraries/base    |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:  Phab:D924
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I'm a bit lost.  The only change seems to be this:
 {{{
 instance Traversable [] where
 instance Traversable [] where
     traverse f = List.foldr cons_f (pure [])
       where cons_f x ys = (:) <$> f x <*> ys

     mapM = Monad.mapM   --   <========= DELETE THIS LINE
 }}}
 That means using the default method, `traverse`, rather than `mapM`.  Why
 is that a big deal?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10457#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list