@@ -562,14 +562,14 @@ mapResponseError f res =
562562-- Execute a Task
563563
564564
565- type Pool msg x a
566- = Pool ( Pool_ msg x a )
565+ type Pool msg
566+ = Pool ( Pool_ msg)
567567
568568
569- type alias Pool_ msg x a =
569+ type alias Pool_ msg =
570570 { poolId : PoolId
571- , queued : List ( Array Todo , Progress msg x a )
572- , attempts : Dict AttemptId ( Progress msg x a )
571+ , queued : List ( Array Todo , Progress msg )
572+ , attempts : Dict AttemptId ( Progress msg)
573573 , attemptIds : Ids
574574 }
575575
@@ -595,10 +595,10 @@ type PoolId
595595 | Identified String
596596
597597
598- type alias Progress msg x a =
598+ type alias Progress msg =
599599 { inFlight : Set TaskId
600- , task : ( Ids , ConcurrentTask x a )
601- , onComplete : Response x a -> msg
600+ , task : ( Ids , ConcurrentTask msg msg )
601+ , onComplete : Response msg msg -> msg
602602 }
603603
604604
@@ -617,21 +617,21 @@ type alias AttemptId =
617617 Ids . Id
618618
619619
620- type alias Attempt msg x a =
621- { pool : Pool msg x a
620+ type alias Attempt msg =
621+ { pool : Pool msg
622622 , send : Decode . Value -> Cmd msg
623- , onComplete : Response x a -> msg
623+ , onComplete : Response msg msg -> msg
624624 }
625625
626626
627- type alias OnProgress msg x a =
627+ type alias OnProgress msg =
628628 { send : Decode . Value -> Cmd msg
629629 , receive : ( Decode . Value -> msg) -> Sub msg
630- , onProgress : ( Pool msg x a , Cmd msg ) -> msg
630+ , onProgress : ( Pool msg, Cmd msg ) -> msg
631631 }
632632
633633
634- attempt : Attempt msg x a -> ConcurrentTask x a -> ( Pool msg x a , Cmd msg )
634+ attempt : Attempt msg -> ConcurrentTask msg msg -> ( Pool msg , Cmd msg )
635635attempt attempt_ task =
636636 case stepTask Dict . empty ( Ids . init, task ) of
637637 ( _, Done res ) ->
@@ -641,7 +641,7 @@ attempt attempt_ task =
641641
642642 ( _, Pending defs _ ) ->
643643 let
644- progress : Progress msg x a
644+ progress : Progress msg
645645 progress =
646646 { task = ( Ids . init, task )
647647 , inFlight = recordSent defs Set . empty
@@ -669,12 +669,12 @@ attempt attempt_ task =
669669
670670
671671startTask :
672- { progress : Progress msg x a
673- , pool : Pool msg x a
672+ { progress : Progress msg
673+ , pool : Pool msg
674674 , send : Encode . Value -> Cmd msg
675675 , defs : Array Todo
676676 }
677- -> ( Pool msg x a , Cmd msg )
677+ -> ( Pool msg, Cmd msg )
678678startTask options =
679679 ( startAttempt options. progress options. pool
680680 , options. send ( encodeDefinitions ( currentAttemptId options. pool) options. defs)
@@ -694,7 +694,7 @@ decodeIdentifyResponse =
694694 )
695695
696696
697- onProgress : OnProgress msg x a -> Pool msg x a -> Sub msg
697+ onProgress : OnProgress msg -> Pool msg -> Sub msg
698698onProgress options pool_ =
699699 options. receive
700700 ( \ rawResults ->
@@ -726,7 +726,7 @@ onProgress options pool_ =
726726 )
727727
728728
729- startQueuedTasks : { send : Encode .Value -> Cmd msg , pool : Pool msg x a } -> ( Pool msg x a , Cmd msg )
729+ startQueuedTasks : { send : Encode .Value -> Cmd msg , pool : Pool msg } -> ( Pool msg , Cmd msg )
730730startQueuedTasks options =
731731 queuedTasks options. pool
732732 |> List . foldl
@@ -743,12 +743,12 @@ startQueuedTasks options =
743743 |> Tuple . mapFirst clearQueue
744744
745745
746- updateAttempt : OnProgress msg x a -> Pool msg x a -> ( AttemptId , Results ) -> Progress msg x a -> ( Pool msg x a , Cmd msg )
746+ updateAttempt : OnProgress msg -> Pool msg -> ( AttemptId , Results ) -> Progress msg -> ( Pool msg , Cmd msg )
747747updateAttempt options pool_ ( attemptId, results ) progress =
748748 case stepTask results progress. task of
749749 ( ids_, Pending _ next_ ) ->
750750 let
751- nextProgress : ( Ids , ConcurrentTask x a )
751+ nextProgress : ( Ids , ConcurrentTask msg msg )
752752 nextProgress =
753753 ( ids_, next_ )
754754 in
@@ -800,7 +800,7 @@ sendResult onComplete res =
800800 CoreTask . succeed res |> CoreTask . perform onComplete
801801
802802
803- notStarted : Progress msg x a -> Todo -> Bool
803+ notStarted : Progress msg -> Todo -> Bool
804804notStarted model def =
805805 not ( Set . member def. taskId model. inFlight)
806806
@@ -994,7 +994,7 @@ encodeDefinition attemptId def =
994994-- Pool
995995
996996
997- pool : Pool msg x a
997+ pool : Pool msg
998998pool =
999999 Pool
10001000 { poolId = Unidentified
@@ -1004,7 +1004,7 @@ pool =
10041004 }
10051005
10061006
1007- startAttempt : Progress msg x a -> Pool msg x a -> Pool msg x a
1007+ startAttempt : Progress msg -> Pool msg -> Pool msg
10081008startAttempt progress p =
10091009 mapPool
10101010 ( \ pool_ ->
@@ -1016,7 +1016,7 @@ startAttempt progress p =
10161016 p
10171017
10181018
1019- currentAttemptId : Pool msg x a -> AttemptId
1019+ currentAttemptId : Pool msg -> AttemptId
10201020currentAttemptId ( Pool pool_) =
10211021 case pool_. poolId of
10221022 Identified id ->
@@ -1029,47 +1029,47 @@ currentAttemptId (Pool pool_) =
10291029 Ids . get pool_. attemptIds
10301030
10311031
1032- poolId : Pool msg x a -> PoolId
1032+ poolId : Pool msg -> PoolId
10331033poolId ( Pool pool_) =
10341034 pool_. poolId
10351035
10361036
1037- withPoolId : PoolId -> Pool msg x a -> Pool msg x a
1037+ withPoolId : PoolId -> Pool msg -> Pool msg
10381038withPoolId id =
10391039 mapPool ( \ pool_ -> { pool_ | poolId = id } )
10401040
10411041
1042- queueTask : ( Array Todo , Progress msg x a ) -> Pool msg x a -> Pool msg x a
1042+ queueTask : ( Array Todo , Progress msg ) -> Pool msg -> Pool msg
10431043queueTask progress =
10441044 mapPool ( \ pool_ -> { pool_ | queued = progress :: pool_. queued } )
10451045
10461046
1047- updateProgressFor : AttemptId -> Progress msg x a -> Pool msg x a -> Pool msg x a
1047+ updateProgressFor : AttemptId -> Progress msg -> Pool msg -> Pool msg
10481048updateProgressFor attemptId progress_ =
10491049 mapPool ( \ pool_ -> { pool_ | attempts = Dict . update attemptId ( Maybe . map ( always progress_)) pool_. attempts } )
10501050
10511051
1052- removeFromPool : AttemptId -> Pool msg x a -> Pool msg x a
1052+ removeFromPool : AttemptId -> Pool msg -> Pool msg
10531053removeFromPool attemptId =
10541054 mapPool ( \ pool_ -> { pool_ | attempts = Dict . remove attemptId pool_. attempts } )
10551055
10561056
1057- queuedTasks : Pool msg x a -> List ( Array Todo , Progress msg x a )
1057+ queuedTasks : Pool msg -> List ( Array Todo , Progress msg )
10581058queuedTasks ( Pool p) =
10591059 p. queued
10601060
10611061
1062- clearQueue : Pool msg x a -> Pool msg x a
1062+ clearQueue : Pool msg -> Pool msg
10631063clearQueue =
10641064 mapPool ( \ pool_ -> { pool_ | queued = [] } )
10651065
10661066
1067- findAttempt : AttemptId -> Pool msg x a -> Maybe (Progress msg x a )
1067+ findAttempt : AttemptId -> Pool msg -> Maybe (Progress msg )
10681068findAttempt attemptId ( Pool p) =
10691069 Dict . get attemptId p. attempts
10701070
10711071
1072- mapPool : (Pool_ msg x a -> Pool_ msg x a ) -> Pool msg x a -> Pool msg x a
1072+ mapPool : (Pool_ msg -> Pool_ msg ) -> Pool msg -> Pool msg
10731073mapPool f ( Pool p) =
10741074 Pool ( f p)
10751075
0 commit comments