Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Handle is defined in terms of UnsafeResource (in linear-base). This is where the linearity checking "stops". If you pattern match an UnsafeResource then you have to make sure that you correctly close/free it. Luckily, this only has to be implemented once in an internal module and is not exported in the public interface.
Effects are a restriction of monads. Eff r is a monad, but not all monads can be written as Eff r. You can have algebraic effects without monads. In koka effects are part of the language itself. The restriction makes sure that it is possible to compose effects. And this composition of effects is also why the effects is called algebraic. And that is why we want to avoid monads in the first place: because they don't compose.