[clean-list] Newbie error
Zeno
zenem@earthlink.net
Fri, 29 Dec 2000 16:07:50 -0800
On Fri, 29 Dec 2000 23:30:03 +0000, Sven Eric wrote:
>looks like a simple indentation error you made:
>
>the following will do (not tested):
>
>instance toString Q
> where
> toString q
> | q.den=3D=3D1 =3D toString q.num
> | otherwise =3D toString q.num +++ "/" +++ toString q.den
>
>
>As far as I know the guards of a function definition have to be
>more indented than the function name in the function definition.
>
>Sven Eric
Thank you so much! I had tried indenting the 'where toString q' from
the 'instance' statement and then the guards indented more than that,
but it had not occurred to me that the guards still were not indented
more than the beginning of the words 'toString q'.
I won't tell you how long I spent trying to figure out what was wrong.
At least I asked before I took my computer in to the shop for repairs!
Thanks again,
- Zeno