polysemy-0.7.0.0: Higher-order, low-boilerplate, zero-cost free monads.

Safe HaskellNone
LanguageHaskell2010

Polysemy.Internal.CustomErrors

Synopsis

Documentation

type AmbiguousSend r e = IfStuck r (AmbiguousSendError TyVarR r e) (Pure (AmbiguousSendError (UnstuckRState r) r e)) Source #

type WhenStuck expr b = IfStuck expr b NoErrorFcf Source #

Like IfStuck, but specialized to the case when you don't want to do anything if expr isn't stuck.

type FirstOrder (e :: Effect) fn = UnlessStuck e (FirstOrderErrorFcf e fn) Source #

This constraint gives helpful error messages if you attempt to use a first-order combinator with a higher-order type.

type family UnhandledEffect e where ... Source #

Equations

UnhandledEffect e = IfStuck (DefiningModule e) (TypeError (UnhandledEffectMsg e)) (DoError (UnhandledEffectMsg e :$$: CheckDocumentation e)) 

type family DefiningModule (t :: k) :: Symbol Source #

The module this effect was originally defined in. This type family is used only for providing better error messages.

Calls to makeSem will automatically give instances of DefiningModule.

Instances
type DefiningModule Async Source # 
Instance details

Defined in Polysemy.Async

type DefiningModule Async = "Polysemy.Async"
type DefiningModule Resource Source # 
Instance details

Defined in Polysemy.Resource

type DefiningModule Resource = "Polysemy.Resource"
type DefiningModule Reader Source # 
Instance details

Defined in Polysemy.Reader

type DefiningModule Reader = "Polysemy.Reader"
type DefiningModule Writer Source # 
Instance details

Defined in Polysemy.Writer

type DefiningModule Writer = "Polysemy.Writer"
type DefiningModule (Error :: Type -> (k -> Type) -> k -> Type) Source # 
Instance details

Defined in Polysemy.Error

type DefiningModule (Error :: Type -> (k -> Type) -> k -> Type) = "Polysemy.Error"
type DefiningModule (State :: Type -> k -> Type -> Type) Source # 
Instance details

Defined in Polysemy.State

type DefiningModule (State :: Type -> k -> Type -> Type) = "Polysemy.State"
type DefiningModule (Output :: Type -> k -> Type -> Type) Source # 
Instance details

Defined in Polysemy.Output

type DefiningModule (Output :: Type -> k -> Type -> Type) = "Polysemy.Output"
type DefiningModule (Trace :: k -> Type -> Type) Source # 
Instance details

Defined in Polysemy.Trace

type DefiningModule (Trace :: k -> Type -> Type) = "Polysemy.Trace"
type DefiningModule (Input :: k1 -> k2 -> k1 -> Type) Source # 
Instance details

Defined in Polysemy.Input

type DefiningModule (Input :: k1 -> k2 -> k1 -> Type) = "Polysemy.Input"