File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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
7878decode = \name ->
7979 Effect . envVar name
8080 |> Effect . map
You can’t perform that action at this time.
0 commit comments