Zulip Chat Archive

Stream: new members

Topic: Repr for Ordering


Carter Schonwald (Dec 13 2023 at 18:55):

Why doesn't the Ordering datatype used by the Ord type class have a repr instance? stumbled into this and had to derive an orphan instance to get #eval compare A B to work (A,B are in a custom datatype of mine)

Eric Wieser (Dec 13 2023 at 20:24):

Note you can add the instance in once line with deriving instance Repr for Ordering

Carter Schonwald (Dec 13 2023 at 20:37):

Yeah. That’s what I did. Just surprised me


Last updated: Dec 20 2023 at 11:08 UTC