Defining your own Ord for a data type
Posted
by mvid
on Stack Overflow
See other posts from Stack Overflow
or by mvid
Published on 2010-06-17T21:56:42Z
Indexed on
2010/06/17
22:03 UTC
Read the original article
Hit count: 236
I am attempting to make some data structures to solve a graph puzzle. I am trying to define an edge's comparison criteria, but I am not sure how. So far:
data Edge = Edge (Set String) Bool
How do I tell let the compiler know that I want edges to be declared equal if they have identical sets of strings, and not have equality have anything to do with the boolean value?
© Stack Overflow or respective owner