RE: {-# LINE 100 "Foo.hs #-} vs. # 100 "Foo.hs"

2001-01-18 Thread Simon Marlow
> Indeed. Or do you want to tell me that you are going to > break one of my favourite programs? > > [ code deleted ] > # 111 "Foo.hs" Actually the cpp-style pragma is only recognised if the '#' is in the leftmost column and is followed by optional spaces and a digit. It's quite hard to write

Re: A simple problem

2001-01-18 Thread Tom Pledger
Ashley Yakeley writes: > At 2001-01-18 15:38, I wrote: > > >3 is not always an Integer. It's of type "(Num a) => a". > > Of course, it would be nice if 3 were an Integer, and Integer were a > subtype of Real. I haven't come across a language that does this, where > for instance 3.0 can

Re: A simple problem

2001-01-18 Thread William Lee Irwin III
At 2001-01-18 15:57, William Lee Irwin III wrote: >>class C a where >> fun :: a -> Integer >> >>instance Integral a => C a where >> fun = toInteger . succ > On Thu, Jan 18, 2001 at 04:04:01PM -0800, Ashley Yakeley wrote: > Gives "syntax error in instance head (constructor expected)" at

Re: A simple problem

2001-01-18 Thread Ashley Yakeley
At 2001-01-18 15:57, William Lee Irwin III wrote: >class C a where > fun :: a -> Integer > >instance Integral a => C a where > fun = toInteger . succ Gives "syntax error in instance head (constructor expected)" at the 'instance' line in Hugs. Is there a option I need to turn on or s

Re: A simple problem

2001-01-18 Thread William Lee Irwin III
Moving over to haskell-cafe... At 2001-01-18 05:16, Saswat Anand wrote: >> fun 3 --gives error in Hugs >> fun (3::Integer) -- OK >> >> I am a building an embedded language, so don't want user to cast. Is >> there a solution? On Thu, Jan 18, 2001 at 03:38:10PM -0800, Ashley Yakeley wrote: > 3 is