<TwoNotes>
vaninwagen It looks like it should. I just have to find what changed since the last time this compiled ok
_whitelogger has joined #ponylang
dx_ob has quit [Remote host closed the connection]
Foaly has quit [Ping timeout: 246 seconds]
acarrico has joined #ponylang
<TwoNotes>
I have a class which needs to be sortable. So I declare it "is Comparable[]" and write an 'lt' fun for it. But what goes in the square brackets on Comparable?
<vaninwagen>
The type of the argument to `lt` and `eq`
<TwoNotes>
So if it is comparable to other objects of the same class, I just put its own name there?
<vaninwagen>
Indeed :)
<TwoNotes>
It complains that "type argument is outside its constraint". I have no idea what that means
<vaninwagen>
TwoNotes: in general a type argument is the thing you put in square brackets - when you implement or instantiate a generic type
<vaninwagen>
e.g. Array[U8]
<vaninwagen>
Here U8 is the type argument
<vaninwagen>
If a type is generic, it has a type parameter, which requires such a type argument. Those type parameters can have constraints, limiting what you can provide as type argument
<vaninwagen>
If a type argument is outside its constraint it might not have the required capability or is just the wrong type
<vaninwagen>
If you could give the full compiler error you get, we can find out what doesnt fit
<vaninwagen>
Long story short, i think you also need to implement the eq method from https://stdlib.ponylang.io/builtin-Equatable because that is also required in order to be sortable
<TwoNotes>
I know 'eq' has to be there. I will do that next
<vaninwagen>
I assume thats the root cause for your error