Generalizing some type signatures involving Int

Alexandre Rodrigues alexandreR_B at outlook.com
Wed Nov 14 01:34:33 UTC 2018


:+1: from me.



________________________________
From: Libraries <libraries-bounces at haskell.org> on behalf of Vanessa McHale <vanessa.mchale at iohk.io>
Sent: Wednesday, November 14, 2018 1:18:58 AM
To: Haskell Libraries
Subject: Generalizing some type signatures involving Int

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20181114/e1d8bc3b/attachment.html>


More information about the Libraries mailing list