Fri Aug 19 14:51:13 WEST 2005 Malcolm.Wallace@cs.york.ac.uk
* refactor DoublePoint defn
Refactor the definition of the DoublePoint type to avoid named fields.
This is purely to make the derived instances of read and show simpler,
so I can write values nicely by hand and have them 'read' properly.
{
hunk ./src/Math.hs 3
+ , doublePointX, doublePointY
hunk ./src/Math.hs 19
+{-
hunk ./src/Math.hs 25
+-}
+data DoublePoint = DoublePoint !Double !Double
+ deriving (Show, Eq, Read)
hunk ./src/Math.hs 30
+
+doublePointX (DoublePoint x _) = x
+doublePointY (DoublePoint _ y) = y
hunk ./src/NetworkView.hs 101
- center@(DoublePoint { doublePointX = x, doublePointY = y }) =
- Node.getPosition node
+ center@(DoublePoint x y) = Node.getPosition node
}