On 12/12/2013 06:16 AM, Sergey Mironov wrote:
Haskell version allows it by defining
third datatype parameter with kind (Type -> Type). But looks like it
wouldn't work for Ur/Web since UrWeb accepts only Type kinds in this
place (but I may have missed some syntax):
datatype state m st a = State of (st -> m (st * a))
Yeah, datatypes are currently hardcoded to accept only [Type] arguments,
which is pretty arbitrary. Maybe some day I'll be motivated to
generalize. ;)
You can still abstract a datatype over arbitrary kinds using functors
(in the module system), though. Let me know if that isn't a clear
enough hint!
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur