The Labeled Effects Extension to PureScript
PureScript's Eff
type is really nice. Sometimes, however, you might want to
associate resources with side-effects, such as file descriptors, sockets, or
byte buffer. Manually passing around such resources to related side-effecting
operations is error-prone, and the compiler might not be able to catch your
mistakes. With Leffe, resources are bundled into the monadic side-effecting
operations, and thus safe from being passed around incorrectly.
This library is highly experimental at this stage, and should probably not be used for anything but playful things.
There's a naive File
module, wrapping the Node.FS
module. See the usage
example.