@@ -52,7 +52,7 @@ var! = \name ->
52
52
## Reads the given environment variable and attempts to decode it.
53
53
##
54
54
## The type being decoded into will be determined by type inference. For example,
55
- ## if this ends up being used like a `Task U16 _` then the environment variable
55
+ ## if this ends up being used like a `Result U16 _` then the environment variable
56
56
## will be decoded as a string representation of a `U16`. Trying to decode into
57
57
## any other type will fail with a `DecodeErr`.
58
58
##
@@ -65,8 +65,8 @@ var! = \name ->
65
65
##
66
66
## ```
67
67
## # Reads "NUM_THINGS" and decodes into a U16
68
- ## getU16Var : Str -> Task U16 [VarNotFound, DecodeErr DecodeError] [Read [Env]]
69
- ## getU16Var = \var -> Env.decode! var
68
+ ## get_u16_var! : Str => Result U16 [VarNotFound, DecodeErr DecodeError] [Read [Env]]
69
+ ## get_u16_var! = \var -> Env.decode! var
70
70
## ```
71
71
##
72
72
## If `NUM_THINGS=123` then `getU16Var` succeeds with the value of `123u16`.
@@ -108,10 +108,9 @@ dict! = \{} ->
108
108
# ##
109
109
# ## If any key or value contains invalid Unicode, the [Unicode replacement character](https://unicode.org/glossary/#replacement_character)
110
110
# ## (`�`) will be used in place of any parts of keys or values that are invalid Unicode.
111
- # walk : state, (state, Str, Str -> state) -> Task state [NonUnicodeEnv state] [Read [Env]]
112
- # walk = \state, walker ->
113
- # Effect.envWalk state walker
114
- # |> InternalTask.fromEffect
111
+ # walk! : state, (state, Str, Str -> state) => Result state [NonUnicodeEnv state] [Read [Env]]
112
+ # walk! = \state, walker ->
113
+ # Host.env_walk! state walker
115
114
# TODO could potentially offer something like walkNonUnicode which takes (state, Result Str Str, Result Str Str) so it
116
115
# tells you when there's invalid Unicode. This is both faster than (and would give you more accurate info than)
117
116
# using regular `walk` and searching for the presence of the replacement character in the resulting
@@ -123,7 +122,7 @@ dict! = \{} ->
123
122
# decode all the required vars only, and then decode the optional ones separately some other way.
124
123
# Alternatively, it could make sense to have some sort of tag union convention here, e.g.
125
124
# if decoding into a tag union of [Present val, Missing], then it knows what to do.
126
- # decodeAll : Task val [] [EnvDecodingFailed Str] [Env] where val implements Decoding
125
+ # decode_all : Result val [] [EnvDecodingFailed Str] [Env] where val implements Decoding
127
126
128
127
ARCH : [X86 , X64 , ARM , AARCH64 , OTHER Str ]
129
128
OS : [LINUX , MACOS , WINDOWS , OTHER Str ]
0 commit comments