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

GHC ghc-devs at haskell.org
Fri Oct 10 17:27:40 UTC 2014


#9674: Foldable doesn't have any laws
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:  ekmett
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             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 ekmett):

 The laws should be given in terms of `foldMap` and various monoids from
 `Data.Monoid` rather than `foldr` or `toList`, otherwise the laws will be
 inaccurate where infinite snoc-lists and the like are involved.

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


More information about the ghc-tickets mailing list