Skip to content

Commit

Permalink
Make decodeFailed polymorphic
Browse files Browse the repository at this point in the history
  • Loading branch information
ryota-ka committed Feb 21, 2022
1 parent 323ce0b commit 449c065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VariableDecoder/VariableDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ask = (): VariableDecoder<string> => RE.asks(({ value }) => value);
const asks = <A>(f: (value: string) => A): VariableDecoder<A> => RE.asks(({ value }) => f(value));

const decodeFailed =
(msg: string): RE.ReaderEither<Variable, EnvironmentError, never> =>
<A>(msg: string): RE.ReaderEither<Variable, EnvironmentError, A> =>
(variable) =>
E.left(new DecodeFailed(variable, msg));

Expand Down

0 comments on commit 449c065

Please sign in to comment.