[Haskell-beginners] Re: Integer by default.
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]
> 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)
> Beginners mailing list
> Beginners at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners