Re: implementing a class using superclasses?
Jade Hagborg via Haskell-Cafe <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cafe |
|---|---|
| Message-ID | <0265fc97527675b4323b071bcf11ef259d43770a.camel@quasicoherent.solutions> |
On Wed, 2025-03-26 at 18:08 -0400, Jade Hagborg via Haskell-Cafe wrote:
> instance (Primary a, Secondary a) => Ord (Lex2 a) where
> compare (MkLex2 x) (MkLex2 y) = comp1 x y <> comp2 x y
My bad (copy-paste error), should be
instance (Primary a, Secondary a) => Ord (UsePrimaryAndSecondary a) where
compare (MkUsePrimaryAndSecondary x)
(MkUsePrimaryAndSecondary y) = comp1 x y <> comp2 x y
Sorry if that caused confusion.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.