[Haskell] Unnamed fields

Martin Sjögren msjogren at gmail.com
Tue Nov 16 10:20:34 EST 2004


On Tue, 16 Nov 2004 15:04:02 +0000, Ian Lynagh <igloo at earth.li> wrote:
> 
> Hi all,
> 
> Is there a good reason why I can't say
> 
>     data Bar = Bar { _ :: Int, _ :: Char, x :: Bool }
> 
> ?
> (Or "data Bar = Bar { Int, Char, x :: Bool }" if you prefer, but that's
> susceptible to typos of the "x, y, z :: Int" syntax causing confusion).

I agree that it would be useful, but wouldn't
  data Bar = Bar Int Char { x :: Bool }
make more sense as far as syntax goes?


/Martin


More information about the Haskell mailing list