<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>I certainly do! What's wrong with iterating over a <tt>Word</tt>?
<br>
</p>
<div class="moz-cite-prefix">On 11/13/18 8:49 PM, Eric Mertens
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALya0903QX_J4NrwisTdGq25KnwHi4F3O2ODH9NfhqNJnD-0MQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Int is the right type to be able to do efficient
internal operations when implementing length and replicate. It's
unlikely that someone would want to run these operations on
another type internally than Int. Some times people propose
types like these where they imagine just a built-in use of
fromIntegral on either the initial argument or the result, but
that really quite unnecessary. Could you elaborate on what cases
you had in mind?
<div><br>
</div>
<div>While genericLength exists, I have yet to see a good use of
it.<br>
<div><br>
</div>
<div>Best regards,</div>
<div>Eric Mertens</div>
<div>glguy</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Tue, Nov 13, 2018 at 5:34 PM Alexandre
Rodrigues <<a href="mailto:alexandreR_B@outlook.com"
moz-do-not-send="true">alexandreR_B@outlook.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div link="blue" vlink="#954F72" lang="EN-GB">
<div class="m_7139766060243883238x_WordSection1">
<p class="m_7139766060243883238x_MsoNormal">:+1: from
me.</p>
<p class="m_7139766060243883238x_MsoNormal"> </p>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_7139766060243883238x_divRplyFwdMsg" dir="ltr"><font
style="font-size:11pt" face="Calibri, sans-serif"
color="#000000"><b>From:</b> Libraries <<a
href="mailto:libraries-bounces@haskell.org"
target="_blank" moz-do-not-send="true">libraries-bounces@haskell.org</a>>
on behalf of Vanessa McHale <<a
href="mailto:vanessa.mchale@iohk.io" target="_blank"
moz-do-not-send="true">vanessa.mchale@iohk.io</a>><br>
<b>Sent:</b> Wednesday, November 14, 2018 1:18:58 AM<br>
<b>To:</b> Haskell Libraries<br>
<b>Subject:</b> Generalizing some type signatures
involving Int</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:11pt">
<div class="m_7139766060243883238PlainText">Would it be
possible to generalize replicate and length to have
type<br>
signatures<br>
<br>
replicate :: Integral a => a -> b -> [b]<br>
<br>
and<br>
<br>
length :: (Integral a, Foldable t) => t b -> a<br>
<br>
?<br>
<br>
There have been a few instances where such a thing
would have been<br>
useful to me.<br>
<br>
Cheers<br>
<br>
<br>
</div>
</span></font>
</div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank"
moz-do-not-send="true">Libraries@haskell.org</a><br>
<a
href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">Eric Mertens</div>
</blockquote>
</body>
</html>