[Haskell-cafe] Field names

Daryoush Mehrtash dmehrtash at gmail.com
Mon Sep 8 21:13:27 EDT 2008

In type section of the Gentle Introduction to Haskell
is this example:

> data Point = Pt {pointx, pointy :: Float}

> abs (Pt {pointx = x, pointy = y}) = sqrt (x*x + y+y)

Why is it pointx=x and not x=pointx?


Weblog: http://perlustration.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080908/76a68f0b/attachment.htm

More information about the Haskell-Cafe mailing list