[GHC] #15182: Lazier Semigroup instance for Maybe

GHC ghc-devs at haskell.org
Sat May 26 06:59:02 UTC 2018


#15182: Lazier Semigroup instance for Maybe
-------------------------------------+-------------------------------------
        Reporter:  andrewthad        |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by oerjan):

 * cc: oerjan (added)


Comment:

 The last version is ''not'' equivalent - it doesn't produce `Just` until
 the right argument has been evaluated. For example, with the former, I
 think `foldMap (Just . (:[])) [1..] = Just [1..]`, but with the latter
 (and with the current one) it diverges.

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


More information about the ghc-tickets mailing list