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:
parent
b6182376b6
commit
401aec67d0
5 changed files with 271 additions and 85 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue