[Haskell-cafe] unresolved overloading

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Thu Jul 12 10:37:15 EDT 2007


On Jul 12, 2007, at 09:48 , Crediné Menezes wrote:

> p  n            = fp n (g  n)

This requires n to simultaneously be Integral (for mod) and RealFloat  
(for sqrt).  One possible fix is:

> p n = fp (truncate n) (g n)

-- 
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