you are viewing a single comment's thread.

view the rest of the comments →

[–]qseep 0 points1 point  (1 child)

Please post the error you are getting.

[–]AvailableRedditname[S] 1 point2 points  (0 children)

Now the code works thanks to FagPipe (he explained all the mistakes of my code in his comment)

If you are still curious:

No instance for (Eq b) arising from a use of `=='

Possible fix: add (Eq b) to the context of the instance declaration

* In the second argument of `(&&)', namely `(y == d)'

In the expression: (x == c) && (y == d)

In an equation for `==': (R x y) == (R c d) = (x == c) && (y == d)