Overlapping, undecidable, incoherent -- or worse?
MR K P SCHUPKE
k.schupke at imperial.ac.uk
Thu May 20 16:52:49 EDT 2004
I don't know whether this was apparent, but only the instance
pattern is used in determining which instance to use, so
"PO a" is the same as "PO a" ... you need to make them different
otherwise they don;t just overlap they are identical.
the left-hand-side of the "=>" play no part in instance selection.
That is why I suggested using new types. (infact it is your only option)
Even priority would not help here, as the instances are identical.
(there is a priority, in that if the instances are overlapping
the most specific is used, IE choosing between (PO a) and (PO Int)
PO Int wins is 'a' is an Int.
More information about the Glasgow-haskell-users