[Haskell-cafe] How to convert Num a => a to Int

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Wed Mar 14 19:33:25 EDT 2007


On Mar 14, 2007, at 19:30 , Sergey Perminov wrote:

> So, the question is: Is it possible somehow to convert any Num (or at
> least Integral) to Int.
> Please, tell me if I don't get smth in Haskell type system.

fromIntegral.
Try http://haskell.org/hoogle for searching for useful functions like  
this.

-- 
brandon s. allbery  [solaris,freebsd,perl,pugs,haskell]   
allbery at kf8nh.com
system administrator  [openafs,heimdal,too many hats]   
allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university       
KF8NH




More information about the Haskell-Cafe mailing list