I have an algebraic data type (not newtype) that derives Ord:<br><br><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; data AddBounds a = MinBound | NoBound a | MaxBound</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; deriving (Eq, Ord, Read, Show)</span><br><br>I was hoping to get a min method defined in terms of the min method of the type argument (a).&nbsp; Instead, I think GHC is producing something in terms of compare or (&lt;=).&nbsp; Maybe it&#39;s defaulting min altogether.&nbsp; What is the expected behavior in (a) the language standard and (b) GHC?<br>
<br>The reason I care is that my type parameter a turns out to have partial information, specifically lower bounds.&nbsp; The type of min allows this partial info to be used in producing partial info about the result, while the type of (&lt;=) and compare do not.<br>
<br>Thanks,&nbsp; - Conal<br><br>