How to implement a generic sorting function? #611
Closed
TheLostLambda
started this conversation in
General
Replies: 1 comment 1 reply
-
This should work. Implicit parameters need to be explicitly propagated until they can be statically determined. In this case since As far as |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just started with Koka this evening, so likely a lot of room for improvement, but I as I understand this sort of thing is best done using some of those implicit parameters?
Here is what I have so far (mostly copied from the Koka tests, where they are specialized to
int32
):And the error I'm struggling with (line numbers wrong here, since there is other stuff in that file):
EDIT: That
pure
really only needs to be adiv
, but I don't reckon that should really be needed for a sorting function either... Let me know if you have any clever ideas about how to get rid of that as well!Beta Was this translation helpful? Give feedback.
All reactions