[clean-list] Newbie error

Zeno zenem@earthlink.net
Fri, 29 Dec 2000 10:57:17 -0800


When compiling the following code for a rational number class from
Chapter 4 of "Functional Programming in Clean", I get an error
"[<non-type-def>]: <hash-guarded-alt> expected instead of '}'"...

:: Q =3D { num :: Int, den :: Int }

instance toString Q
where toString q
	| q.den=3D=3D1 =3D toString q.num
	| otherwise =3D toString q.num +++ "/" +++ toString q.den

(The error is on the first guarded line.)  Can anyone tell me why I'm
getting this error?

Thank you,
   - Zeno