Polysemy: BundleGautier DI FOLCO February 08, 2023 [Haskell] #haskell #polysemy #design #effects systems
Polysemy comes with an useful effect to group other effects:
It comes with a useful function:
It can be used as follows:
= do sendBundle @Trace @'[Trace] $ trace "Hello" act
The real benefit associated with
Bundle are the interpreters.
= runM . traceToStdout . runBundle intrHidden
subsumeBundle reuse interpreters:
= runM . traceToStdout . subsumeBundle intrExplicit
See the full the code here.