
No, genericLength is *not* a decent stopgap. It's horrible. Just look at
the implementation!
On Tue, Nov 13, 2018, 10:21 PM Vanessa McHale Thanks! This is a decent stopgap. On 11/13/18 8:50 PM, Evan Laforge wrote: You can already get these as Data.List.genericLength and
Data.List.genericReplicate As for changing the prelude ones, this would probably cause a lot of
busywork. Where I work we compile with -Werror and -Wtype-defaults,
so a lot of places might have to get type annotations.
On Tue, Nov 13, 2018 at 5:19 PM Vanessa McHale Would it be possible to generalize replicate and length to have type
signatures replicate :: Integral a => a -> b -> [b] and length :: (Integral a, Foldable t) => t b -> a ? There have been a few instances where such a thing would have been
useful to me. Cheers _______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries _______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries