endpoints4s
Type members
Classlikes
A way to encode and decode values
A way to encode and decode values
- Type parameters:
- D
Type of decoded values
- E
Type of encoded values
- Companion:
- object
A way to decode a From
value into a To
value.
A way to decode a From
value into a To
value.
- Companion:
- object
A way to encode a From
value into a To
value
A way to encode a From
value into a To
value
- Companion:
- object
A list of validation errors
A list of validation errors
- Companion:
- object
Defines ways to transform a given type constructor F
Defines ways to transform a given type constructor F
Provides extensions methods for values of type InvariantFunctor
Provides extensions methods for values of type InvariantFunctor
Type class that checks whether something is a multiple of another numeric value. Added since the std-lib Numeric does not have a modulo function.
Type class that checks whether something is a multiple of another numeric value. Added since the std-lib Numeric does not have a modulo function.
- Companion:
- object
Possible restrictions on the numeric value used. Needs an instance for Ordering
to check whether values are
valid w.r.t. to the properties.
Possible restrictions on the numeric value used. Needs an instance for Ordering
to check whether values are
valid w.r.t. to the properties.
- Companion:
- object
Given a type constructor F
, a partial function A => Validated[B]
and a total function B => A
, turns an F[A]
into an F[B]
.
Given a type constructor F
, a partial function A => Validated[B]
and a total function B => A
, turns an F[A]
into an F[B]
.
A partial invariant functor is an invariant functor whose covariant
transformation function is total (ie, A => Valid[B]
).
Provides extension methods for values of type PartialInvariantFunctor
Provides extension methods for values of type PartialInvariantFunctor
Defines a strategy for tupling A
and B
values, according to types A
and B
.
Defines a strategy for tupling A
and B
values, according to types A
and B
.
The actual implementation avoids nested tuples and eliminates Unit
, so that instead of ending with, e.g.,
the following type:
((Unit, Int), (((Unit, Unit), String)))
We just get:
(Int, String)
The following rules are implemented (by increasing priority):
- A, B -> (A, B)
- A, (B, C) -> (A, B, C)
- (A, B), C -> (A, B, C)
- (A, B), (C, D) -> (A, B, C, D)
- A, (B, C, D, E) -> (A, B, C, D, E)
- (A, B), (C, D, E) -> (A, B, C, D, E)
- (A, B, C), D -> (A, B, C, D)
- (A, B, C, D), E -> (A, B, C, D, E)
- (A, B, C, D, E), F -> (A, B, C, D, E, F)
- A, Unit -> A
- Unit, A -> A
- Companion:
- object
A validated value of type A
can either be Valid
or Invalid
A validated value of type A
can either be Valid
or Invalid
- Type parameters:
- A
Type of the validated value
- Companion:
- object