Skip to content

Commit d8f6860

Browse files
committed
remove DecodeError
1 parent f75c31b commit d8f6860

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

platform/Env.roc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ var = \name ->
6565
##
6666
## ```
6767
## # Reads "NUM_THINGS" and decodes into a U16
68-
## getU16Var : Str -> Task U16 [VarNotFound, DecodeErr DecodeError] [Read [Env]]
68+
## getU16Var : Str -> Task U16 [VarNotFound, DecodeErr [TooShort]] [Read [Env]]
6969
## getU16Var = \var -> Env.decode var
7070
## ```
7171
##
7272
## If `NUM_THINGS=123` then `getU16Var` succeeds with the value of `123u16`.
7373
## However if `NUM_THINGS=123456789`, then `getU16Var` will
74-
## fail with [DecodeErr](https://www.roc-lang.org/builtins/Decode#DecodeError)
74+
## fail with [TooShort]
7575
## because `123456789` is too large to fit in a [U16](https://www.roc-lang.org/builtins/Num#U16).
7676
##
77-
decode : Str -> Task val [VarNotFound, DecodeErr DecodeError] where val implements Decoding
77+
decode : Str -> Task val [VarNotFound, DecodeErr [TooShort]] where val implements Decoding
7878
decode = \name ->
7979
Effect.envVar name
8080
|> Effect.map

0 commit comments

Comments
 (0)