Extend `Foldable` class with `length` and `null` methods
authorHerbert Valerio Riedel <hvr@gnu.org>
Sun, 28 Sep 2014 11:02:53 +0000 (13:02 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Sun, 28 Sep 2014 13:06:39 +0000 (15:06 +0200)
commite5cca4ab246ca2d1ecdd7c39eefd3157547cb6aa
tree5fe848bcd68c5a94b3af11b2282df23d759ca823
parentbf3329104c971c84ab178f3ded88254b9594f9cc
Extend `Foldable` class with `length` and `null` methods

This completes the `Foldable` class by two important operations which
this way can be optimised for the underlying structure more easily.

A minor fix for the `containers` submodule was needed to due name clash

Addresses #9621

Reviewed By: ekmett, dfeuer, austin

Differential Revision: https://phabricator.haskell.org/D250
compiler/ghci/Debugger.hs
libraries/base/Data/Foldable.hs
libraries/base/Data/List.hs
libraries/containers
testsuite/tests/ghci/scripts/ghci025.stdout
testsuite/tests/module/mod106.hs
testsuite/tests/parser/should_fail/readFail003.hs
testsuite/tests/simplCore/should_compile/T7360.hs
testsuite/tests/typecheck/should_compile/faxen.hs
testsuite/tests/typecheck/should_fail/mc21.hs
testsuite/tests/typecheck/should_fail/mc24.hs