[Haskell-beginners] Re: Integer by default.
Benjamin Edwards
edwards.benj at gmail.com
Wed Jun 23 09:54:56 EDT 2010
And for those functions there are often generic counterparts defined in the
List module eg genericLength that take Integral types.
On 23 June 2010 15:52, Ertugrul Soeylemez <es at ertes.de> wrote:
> Hello Lyndon,
>
> it seems to me that Integer /is/ the default. Probably you're unifying
> with some Int, for example when using functions like 'take' or 'length':
>
> length :: [a] -> Int
> take :: Int -> [a] -> [a]
>
>
> Greets,
> Ertugrul
>
>
> Lyndon Maydwell <maydwell at gmail.com> wrote:
>
> > Hi beginners.
> >
> > Is there a way to get the prelude functions to use Integer by default
> > rather than Int?
> >
> > I often have issues with Ints silently overflowing silently, but don't
> > often have speed issues.
> >
> > Somehow I don't think that this is possible, but... Maybe?
>
>
>
> --
> nightmare = unsafePerformIO (getWrongWife >>= sex)
> http://blog.ertes.de/
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20100623/fc8c7d34/attachment.html
More information about the Beginners
mailing list