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
Modifier and TypeInterfaceDescriptionstatic interface
The type of parse errors.static interface
A result indicating failure.static interface
A result indicating success.static interface
The type of parse warnings.static enum
The kind of result.static enum
Single-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
-