Is this a bug with ghc-4.04 or just a "feature" of Haskell 98 that I was
unaware of? I get a parse error with the following code:
data Point = Pt {pointx, pointy :: Float}
abs (Pt {pointx, pointy}) = sqrt (pointx*pointx + pointy*pointy)
It doesn't like the `,' on the second line. If I change it to:
abs (Pt {pointx=pointx, pointy=pointy}) = sqrt (pointx*pointx +
pointy*pointy)
It compiles fine.
This is on Solaris 2.5, in case it matters.
- Michael Hobbs
- Re: Field label bug? Michael Hobbs
- Re: Field label bug? Michael Weber
- RE: Field label bug? Simon Peyton-Jones
