
On Sat, Oct 11, 2014 at 9:02 AM, Nicolaas du Preez
data Cycle = Cycle { name :: String, size :: Double } deriving (Eq, Show)
instance Ord Cycle where (<) a b = (<) (size a) (size b) -- problem statement! …
How can I specify that, on the right-hand side of the problem statement, I refer to (<) :: Double -> Double -> Bool instead of (<) :: Cycle -> Cycle -> Bool?
That should be automatic, since it knows that size :: Cycle -> Double and therefore should use the Double instance. Can you provide a minimal full example and full error message? -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net