[Haskell-cafe] The percent operator

2007-11-16 Thread PR Stanley
Hi I understand 2%4 will construct a fraction in Haskell. I've tried this in GHCI but got an error message. Is there such an operator in Prelude and if so how is it applied? Cheers, Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] The percent operator

2007-11-16 Thread Philip Armstrong
On Fri, Nov 16, 2007 at 02:44:33PM +, PR Stanley wrote: I understand 2%4 will construct a fraction in Haskell. I've tried this in GHCI but got an error message. Is there such an operator in Prelude and if so how is it applied? It's not in the Prelude, it's in the Ratio module IIRC. Phil

Re: [Haskell-cafe] The percent operator

2007-11-16 Thread Brent Yorgey
On Nov 16, 2007 9:44 AM, PR Stanley [EMAIL PROTECTED] wrote: Hi I understand 2%4 will construct a fraction in Haskell. I've tried this in GHCI but got an error message. Is there such an operator in Prelude and if so how is it applied? Cheers, Paul It's in Data.Ratio. Prelude :m