[Haskell-beginners] the first argument of take is an Int and not Integral..

Daniel Fischer daniel.is.fischer at googlemail.com
Wed Aug 10 20:52:31 CEST 2011


On Wednesday 10 August 2011, 20:42:05, Sunil S Nandihalli wrote:
> hmm.. I do agree that taking elements larger than say 2-billion is
> insane .. however, I have no intention of doing that. But the thing is
> the value I am getting is of type Integer but it actually very small
> and I am unable to pass it as is. So is there a way to convert a value
> of type Integer to Int ? This might be obvious.. But I am a newbie to
> the whole Haskell thing ...

Use fromInteger or fromIntegral

> 
> Thanks,
> Sunil.



More information about the Beginners mailing list