Package com.io7m.jproperties.monad
Interface JPropertyParseMonadType<A>
- Type Parameters:
A- The type of returned values
- All Known Subinterfaces:
JPropertyParseMonadType.JPropertyFailureType<A>,JPropertyParseMonadType.JPropertySuccessType<A>
- All Known Implementing Classes:
JPropertyFailure,JPropertySuccess
public interface JPropertyParseMonadType<A>
A parser monad.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe type of parse errors.static interfaceA result indicating failure.static interfaceA result indicating success.static interfaceThe type of parse warnings.static enumThe kind of result.static enumSingle-valued unit type. -
Method Summary
Modifier and TypeMethodDescriptiondefault <B> JPropertyParseMonadType<B>Monadic bind for parse values.errors()<B> JPropertyParseMonadType<B>flatMap(Function<A, JPropertyParseMonadType<B>> f) Monadic bind for parse values.kind()<B> JPropertyParseMonadType<B>Functor map for parse values.warnings()
-
Method Details
-
kind
JPropertyParseMonadType.Kind kind()- Returns:
- The kind of result
-
warnings
List<JPropertyWarning> warnings()- Returns:
- The accumulated warnings
-
errors
List<JPropertyError> errors()- Returns:
- The accumulated errors
-
flatMap
Monadic bind for parse values.- Type Parameters:
B- The type of result values- Parameters:
f- A function to apply to the current value- Returns:
- A monad
-
andThen
Monadic bind for parse values.- Type Parameters:
B- The type of result values- Parameters:
f- A function to apply to the current value- Returns:
- A monad
-
map
Functor map for parse values.- Type Parameters:
B- The type of result values- Parameters:
f- A function to apply to the current value- Returns:
- A monad
-