Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/Env.roc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var = \name ->
## fail with [DecodeErr](https://www.roc-lang.org/builtins/Decode#DecodeError)
## because `123456789` is too large to fit in a [U16](https://www.roc-lang.org/builtins/Num#U16).
##
decode : Str -> Task val [VarNotFound, DecodeErr DecodeError] where val implements Decoding
decode : Str -> Task val [VarNotFound, DecodeErr [TooShort]] where val implements Decoding
decode = \name ->
Effect.envVar name
|> Effect.map
Expand Down
4 changes: 2 additions & 2 deletions platform/EnvDecoding.roc
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ envList = \decodeElem -> Decode.custom \bytes, @EnvFormat {} ->
# 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.
envRecord : _, (_, _ -> [Keep (Decoder _ _), Skip]), (_, _ -> _) -> Decoder _ _
envRecord : _, (_, _ -> [Keep (Decoder _ _ _), Skip]), (_, _ -> _) -> Decoder _ _ _
envRecord = \_initialState, _stepField, _finalizer -> Decode.custom \bytes, @EnvFormat {} ->
{ 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 : _, (_, _ -> [Next (Decoder _ _ _), TooLong]), (_ -> _) -> Decoder _ _ _
envTuple = \_initialState, _stepElem, _finalizer -> Decode.custom \bytes, @EnvFormat {} ->
{ result: Err TooShort, rest: bytes }
Loading