In type section of the Gentle Introduction to Haskell http://www.cs.sfu.ca/CC/SW/Haskell/hugs/tutorial-1.4-html/moretypes.html there 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?

--
Daryoush

Weblog: http://perlustration.blogspot.com/