mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Fully implement Decoding in EnvDecoding
This commit is contained in:
parent
f9f90a3684
commit
825ed1c8b3
1 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,7 @@ EnvFormat := {} has [
|
||||||
string: envString,
|
string: envString,
|
||||||
list: envList,
|
list: envList,
|
||||||
record: envRecord,
|
record: envRecord,
|
||||||
|
tuple: envTuple,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -93,3 +94,10 @@ envList = \decodeElem -> Decode.custom \bytes, @EnvFormat {} ->
|
||||||
envRecord : _, (_, _ -> [Keep (Decoder _ _), Skip]), (_ -> _) -> Decoder _ _
|
envRecord : _, (_, _ -> [Keep (Decoder _ _), Skip]), (_ -> _) -> Decoder _ _
|
||||||
envRecord = \_initialState, _stepField, _finalizer -> Decode.custom \bytes, @EnvFormat {} ->
|
envRecord = \_initialState, _stepField, _finalizer -> Decode.custom \bytes, @EnvFormat {} ->
|
||||||
{ result: Err TooShort, rest: bytes }
|
{ result: Err TooShort, rest: bytes }
|
||||||
|
|
||||||
|
# TODO: we must currently annotate the arrows here so that the lambda sets are
|
||||||
|
# exercised, and the solver can find an ambient lambda set for the
|
||||||
|
# specialization.
|
||||||
|
envTuple : _, (_, _ -> [Next (Decoder _ _), TooLong]), (_ -> _) -> Decoder _ _
|
||||||
|
envTuple = \_initialState, _stepElem, _finalizer -> Decode.custom \bytes, @EnvFormat {} ->
|
||||||
|
{ result: Err TooShort, rest: bytes }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue