module Control.Effect.ExtensibleFinalA where
import Control.Effect (type (~>))
import Control.Effect.Free (EffF, EffectfulF)
import Control.Effect.Free qualified as F
import Control.Effect.Hefty (Eff, Effectful)
import Control.Effect.Hefty qualified as H
import Control.Freer.Final (FreerFinal)
import Data.Effect (LiftIns)
import Data.Hefty.Extensible (ExtensibleUnion)
type eh !! ef = Effectful ExtensibleUnion (FreerFinal Applicative) eh ef
type (!) ef = EffectfulF ExtensibleUnion (FreerFinal Applicative) ef
infixr 5 !!
infixr 4 !
type ehs :!! efs = Eff ExtensibleUnion (FreerFinal Applicative) ehs efs
type (:!) efs = EffF ExtensibleUnion (FreerFinal Applicative) efs
infixr 4 :!!
infixr 3 :!
runEff :: Applicative f => '[] :!! '[LiftIns f] ~> f
runEff :: forall (f :: * -> *). Applicative f => ('[] :!! '[LiftIns f]) ~> f
runEff = forall (f :: * -> *) (fr :: SigClass) (u :: [SigClass] -> SigClass)
(c :: (* -> *) -> Constraint).
(Freer c fr, Union u, c f) =>
Eff u fr '[] '[LiftIns f] ~> f
H.runEff
{-# INLINE runEff #-}
runEffF :: Applicative f => (:!) '[LiftIns f] ~> f
runEffF :: forall (f :: * -> *). Applicative f => (:!) '[LiftIns f] ~> f
runEffF = forall (f :: * -> *) (fr :: SigClass) (u :: [SigClass] -> SigClass)
(c :: (* -> *) -> Constraint).
(Freer c fr, Union u, c f) =>
EffF u fr '[LiftIns f] ~> f
F.runEffF
{-# INLINE runEffF #-}