RE: [Haskell] Re: Numeric programming on toy problems in Haskell

2007-09-12 Thread Simon Peyton-Jones
Dupree | Sent: 12 September 2007 15:37 | To: haskell@haskell.org | Subject: [Haskell] Re: Numeric programming on toy problems in Haskell | | Philip K.F. Hölzenspies wrote: | > The GHC extensions are used, however, | > because of laziness; i.e. automatic derivation of Enum, Num, | > Fractional,

[Haskell] Re: Numeric programming on toy problems in Haskell

2007-09-12 Thread Isaac Dupree
Philip K.F. Hölzenspies wrote: The GHC extensions are used, however, because of laziness; i.e. automatic derivation of Enum, Num, Fractional, Real and RealFrac. Without the GHC extensions, only Eq and Ord can be derived automatically. If I'm wrong about this, please let me know, because I would p

[Haskell] Re: Numeric programming on toy problems in Haskell

2007-09-12 Thread Philip K . F . Hölzenspies
Dear Isaac, all, > Integral looks reasonable (are those really supposed to be div and > mod in defining quotRem, not quot and rem? I'm not sure). Yes, you're right. I changed to quot and rem. Also, the denominator and numerator functions were a bit needlessly complex. > There's no(?) excuse for