fix: Astrid.Query.andThen compose with map*

Reserve stack slots for andThen values and fill them in later. The old
approach of a strict stack machine was wrong.
This commit is contained in:
YetAnotherMinion 2022-01-07 23:57:28 +00:00 committed by nobody
commit 401aec67d0
Signed by: GrocerPublishAgent
GPG key ID: D460CD54A9E3AB86
5 changed files with 271 additions and 85 deletions

View file

@ -1,6 +1,7 @@
module Astrid.Query
exposing
( Query
( Error
, Query
, andThen
, errorToString
, execute
@ -54,7 +55,7 @@ javascript.
dummyExecute : Result Error a
dummyExecute =
let
query = Dummy
_ = Dummy
_ = Execute "" ""
_ = Decode "" 0 (Json.Decode.Failure "" Json.Encode.null)
_ = Failure ""
@ -96,5 +97,5 @@ map5 f a b c d e =
Dummy
andThen : (a -> Query b) -> Query a -> Query b
andThen f a =
andThen f q =
Dummy