File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -100,13 +100,16 @@ defaultEval =
100100-- | Given an `EvalSpec` builder, it will return an eval function.
101101mkEval ::
102102 forall m action state props .
103- EvalSpec props state action m ->
104- Lifecycle props action -> HaloM props state action m Unit
105- mkEval spec = case _ of
106- Initialize props -> traverse_ spec.onAction $ spec.onInitialize props
107- Update old new -> traverse_ spec.onAction $ spec.onUpdate old new
108- Action action -> spec.onAction action
109- Finalize -> traverse_ spec.onAction spec.onFinalize
103+ (EvalSpec props state action m -> EvalSpec props state action m ) ->
104+ Lifecycle props action ->
105+ HaloM props state action m Unit
106+ mkEval f = case _ of
107+ Initialize props -> traverse_ eval.onAction $ eval.onInitialize props
108+ Update old new -> traverse_ eval.onAction $ eval.onUpdate old new
109+ Action action -> eval.onAction action
110+ Finalize -> traverse_ eval.onAction eval.onFinalize
111+ where
112+ eval = f defaultEval
110113
111114-- | Simple way to run Aff logic asynchronously, while bringing errors back into Effect.
112115runAff :: Aff Unit -> Effect Unit
You can’t perform that action at this time.
0 commit comments