Derive Eq for Vertex
This commit is contained in:
parent
5d956a3d89
commit
d823f5b33c
|
@ -4,7 +4,7 @@ import Control.Monad (join)
|
||||||
import Test.QuickCheck (Arbitrary (arbitrary))
|
import Test.QuickCheck (Arbitrary (arbitrary))
|
||||||
|
|
||||||
-- | One point of a path, consisting of its \(x\) and \(y\) coordinates.
|
-- | One point of a path, consisting of its \(x\) and \(y\) coordinates.
|
||||||
newtype Vertex = Point (Double, Double)
|
newtype Vertex = Point (Double, Double) deriving (Eq)
|
||||||
|
|
||||||
instance Show Vertex where
|
instance Show Vertex where
|
||||||
show (Point (x, y)) = show x ++ " " ++ show y
|
show (Point (x, y)) = show x ++ " " ++ show y
|
||||||
|
|
Reference in a new issue