
27 May
2017
27 May
'17
2:27 p.m.
"Albert Y. C. Lai"
<snip>
class MyOrd (resolver :: k) a where mycmp :: p resolver -> a -> a -> Ordering
<snip>
data BST (resolver :: k) a = Nil | Bin !(BST resolver a) a !(BST resolver a)
Oh that is a pretty neat trick. I have to remember that. The unfortunate thing even with it, you would need to reimplement all of the data structures around to use it. I wonder if there is a way to use something like this together with existing data structures such as Data.Map/Set etc. -- - Frank