Hacker News new | past | comments | ask | show | jobs | submit login

Firmly on the side of effects: Roc doesn’t have higher-kinded types, which makes it practically impossible to express monads. It’s covered somewhere in https://www.roc-lang.org/faq.html



How do you need HKTs for monads?


You need them to express a type constraint that’s generic for all monads. I might have gone a bit too far saying monads would be impossible without HKTs, but a single Monad type class would be, and you lose a lot of the power of monads if you don’t have that.


You can do monads without HKT but it is much more manual. You need to compose monad transformers yourself, for example.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: