Skip to content

Instantly share code, notes, and snippets.

View plcplc's full-sized avatar

Philip Lykke Carlsen plcplc

View GitHub Profile
@plcplc
plcplc / EffectsInEffects.hs
Created July 9, 2021 16:09
Let's put some effects in your effects!
module EffectsInEffects where
import Polysemy as Poly
-- Plumbing:
class Monad m => EffectMonad m where
type R m :: EffectRow
wrapEffectMonad :: Sem (R m) a -> m a
unwrapEffectMonad :: m a -> Sem (R m) a