Copyright | (c) Michael Szvetits 2020 |
---|---|
License | BSD3 (see the file LICENSE) |
Maintainer | typedbyte@qualified.name |
Stability | stable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module provides default implementations for the MonadTrans
and
MonadTransControl
type classes.
Synopsis
- newtype Default m a = Default {
- runDefault :: m a
Documentation
This type provides default implementations for the MonadTrans
and
MonadTransControl
type classes. The type is intended to be targeted by the
DerivingVia
language extension when writing an effect handler newtype that
wraps a monad m a
:
newtype MyHandler m a =
MyHandler { runMyHandler :: m a }
deriving (Applicative, Functor, Monad, MonadIO)
deriving (MonadTrans, MonadTransControl) via Default
deriving (MonadBase b, MonadBaseControl b)
Default | |
|
Instances
MonadBase b m => MonadBase b (Default m) Source # | |
Defined in Control.Effect.Machinery.Default | |
MonadBaseControl b m => MonadBaseControl b (Default m) Source # | |
MonadTrans (Default :: (Type -> Type) -> Type -> Type) Source # | |
Defined in Control.Effect.Machinery.Default | |
MonadTransControl (Default :: (Type -> Type) -> Type -> Type) Source # | |
Monad m => Monad (Default m) Source # | |
Functor m => Functor (Default m) Source # | |
Applicative m => Applicative (Default m) Source # | |
Defined in Control.Effect.Machinery.Default | |
MonadIO m => MonadIO (Default m) Source # | |
Defined in Control.Effect.Machinery.Default | |
type StT (Default :: (Type -> Type) -> Type -> Type) a Source # | |
type StM (Default m) a Source # | |
Defined in Control.Effect.Machinery.Default |