[GHC] #9674: Foldable doesn't have any laws

GHC ghc-devs at haskell.org
Fri Oct 10 17:53:52 UTC 2014


#9674: Foldable doesn't have any laws
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:  ekmett
                  Type:  task        |           Status:  new
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Core        |          Version:  7.8.3
  Libraries                          |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:
  Documentation bug                  |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Two other obvious laws are `foldMap f . fmap g = foldMap (f . g)` and
 `fold = foldMap id`. These together imply `foldMap f = fold . fmap f`.

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


More information about the ghc-tickets mailing list