module Control.Effect.Fix
(
Fix(..)
, module Control.Monad.Fix
, fixToFinal
, threadFixViaClass
, FixToFinalC
) where
import Control.Monad.Fix
import Control.Effect
import Control.Effect.Primitive
import Control.Effect.Type.Fix
data FixToFinalH
instance (Carrier m, MonadFix m)
=> PrimHandler FixToFinalH Fix m where
effPrimHandler :: Fix m x -> m x
effPrimHandler (Fix x -> m x
f) = (x -> m x) -> m x
forall (m :: * -> *) a. MonadFix m => (a -> m a) -> m a
mfix x -> m x
f
{-# INLINEABLE effPrimHandler #-}
type FixToFinalC = InterpretPrimC FixToFinalH Fix
fixToFinal :: ( Carrier m
, MonadFix m
)
=> FixToFinalC m a
-> m a
fixToFinal :: FixToFinalC m a -> m a
fixToFinal = FixToFinalC m a -> m a
forall h (e :: Effect) (m :: * -> *) a.
PrimHandler h e m =>
InterpretPrimC h e m a -> m a
interpretPrimViaHandler
{-# INLINEABLE fixToFinal #-}