about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/Xanthous/Data.hs2
-rw-r--r--test/Xanthous/DataSpec.hs4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Xanthous/Data.hs b/src/Xanthous/Data.hs
index 8a8a62d0ee08..5e451695825f 100644
--- a/src/Xanthous/Data.hs
+++ b/src/Xanthous/Data.hs
@@ -334,6 +334,7 @@ data Corner
   | BottomLeft
   | BottomRight
   deriving stock (Show, Eq, Ord, Enum, Bounded, Generic)
+  deriving Arbitrary via GenericArbitrary Corner
 
 instance Opposite Corner where
   opposite TopLeft = BottomRight
@@ -347,6 +348,7 @@ data Edge
   | RightEdge
   | BottomEdge
   deriving stock (Show, Eq, Ord, Enum, Bounded, Generic)
+  deriving Arbitrary via GenericArbitrary Edge
 
 instance Opposite Edge where
   opposite TopEdge = BottomEdge
diff --git a/test/Xanthous/DataSpec.hs b/test/Xanthous/DataSpec.hs
index bd02c0f36fe5..a2fcdbba15e0 100644
--- a/test/Xanthous/DataSpec.hs
+++ b/test/Xanthous/DataSpec.hs
@@ -57,14 +57,14 @@ test = testGroup "Xanthous.Data"
 
   , testGroup "Corner"
     [ testGroup "instance Opposite"
-      [ testProperty "involutive" $ \corner ->
+      [ testProperty "involutive" $ \(corner :: Corner) ->
           opposite (opposite corner) === corner
       ]
     ]
 
   , testGroup "Edge"
     [ testGroup "instance Opposite"
-      [ testProperty "involutive" $ \edge ->
+      [ testProperty "involutive" $ \(edge :: Edge) ->
           opposite (opposite edge) === edge
       ]
     ]