I've defined an enum:
data Direction = Clockwise | CounterClockwise deriving (Enum)
Variable 'direction' has type 'Direction'. When doing the following comparison:
direction == Clockwise
I'm getting this error:
No instance for (Eq OrbitDirection) arising from a use of `=='
In the expression: direction == Clockwise
This is as simple as it gets: add the Eq
instance to the derived instances list:
data Direction = Clockwise | CounterClockwise deriving (Enum, Eq)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With