refactor: introduce Handler type synonym

This commit is contained in:
2026-06-17 16:27:37 +02:00
parent 51cb3a95f5
commit 25a27eda92
4 changed files with 56 additions and 36 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ module Control.Actor.Supervision
, killSlot
) where
import Control.Actor.Core (Actor, ActorM, liftRuntime, linkActorTo, spawnActor)
import Control.Actor.Core (Actor, ActorM, Handler, liftRuntime, linkActorTo, spawnActor)
import Control.Actor.Runtime (Runtime (..), RuntimeM, withRuntime)
import Control.Actor.Types
import Data.Binary (Binary)
@@ -47,7 +47,7 @@ data ChildSpec = forall m r. (Binary m, Binary r) => ChildSpec
child ::
(Binary m, Binary r) =>
(m -> Actor u r) ->
Handler m u r ->
(DeathMessage -> ActorM u (SupervisorAction u)) ->
u ->
ChildSpec
@@ -62,7 +62,7 @@ child msgFn deathFn initState =
childWithRef ::
(Binary m, Binary r) =>
(m -> Actor u r) ->
Handler m u r ->
(DeathMessage -> ActorM u (SupervisorAction u)) ->
u ->
TMVar (ActorRef m r) ->