base: Override Foldable.{toList,length} for NonEmpty
base: Override Foldable.{toList,length} for NonEmpty

Previously the Foldable instance for NonEmpty used default
implementations for toList and length.

I assume that the existing implementations
(i.e. Data.List.NonEmpty.{toList,length}) are better than
the default ones, and frankly can't see a good reason why they
might be worse – but if they are, instead of this commit
we'd have to switch Data.List.NonEmpty.{toList,length}
to use Foldable.

Reviewers: austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: int-index, thomie

Differential Revision: https://phabricator.haskell.org/D2882

sdiehl/ghc,ezyang/ghc,shlevy/ghc,olsner/ghc,shlevy/ghc,olsner/ghc,sdiehl/ghc,sdiehl/ghc,ezyang/ghc,ezyang/ghc,sdiehl/ghc,olsner/ghc,ezyang/ghc,shlevy/ghc,sdiehl/ghc,ezyang/ghc,ezyang/ghc,olsner/ghc,shlevy/ghc,sdiehl/ghc,shlevy/ghc,shlevy/ghc,sdiehl/ghc,ezyang/ghc,shlevy/ghc,olsner/ghc,olsner/ghc,olsner/ghc