Hacker News new | ask | show | jobs
by puddingforears 1782 days ago
But does Koka let you generalize over effects?
3 comments

Disclaimer: only have dabbled in Koka slightly.

Not very sure if this is what you were asking about but yes, you can write functions that are polymorphic in their effect. E.g. the map function takes a function that has some effect e and the map function itself has the same effect e

Not as far as I can tell, but it seems to let you supply handlers to discharge effects at any point. That should at least allow you to 'embed' any effect type in a more general effect type (but the 'embedding' itself would be hardcoded, so not 'first class'... I think.).
from reading it docs in the past, it seems to have polymorphism over effects. I don't know if that's what you mean by generalizing over effects.