[Ur] MY_ORD = resolving eq class instance / functor?

Marc Weber marco-oweber at gmx.de
Mon Nov 28 09:52:45 EST 2011


Excerpts from Adam Chlipala's message of Mon Nov 28 15:19:04 +0100 2011:
> Perhaps it would be useful for you to review the concept of type classes 
> in Haskell.  They are very similar in Ur.
I know the Haskell concept inside out. I'm still new to ur :)

> Two solutions that come to mind:
> 1) Add an [eq a] argument to [le].
That's what the tutorial did?
Does work now. Sorry for the noise.
Don't know what I did wrong previously.

> 2) Extend the definition of [strict_less a] to contain an [eq a], too.  
> (Though this seems to create some dissonance with the words "strict less"!)
That would have been

structure My_Ord
  class strict_less a = (eq a) -> a -> a -> bool
  ...
?

I hopefully finally got it. Thanks.

Marc Weber



More information about the Ur mailing list