-
Effekt Library
- partial
- fail
- fail
- attempt
- succeeds
- optionally
- must
- exhaustively
- crash
- suchThat
- getOrFail
- partial Jump to source: libraries/common/partial.effekt
- fail
- fail
: Nothing / {} - attempt
[R] { program: => R / {fail} } { fallback: => R }: R / {} - succeeds
{ program: => Unit / {fail} }: Bool / {} - optionally
[R] { program: => R / {fail} }: Option[R] / {} - must
[R] { program: => R / {stop} }: R / {fail} - exhaustively
{ program: => Unit / {fail} }: Unit / {} - crash
[R] (message: String) { program: => R / {fail} }: R / {} - suchThat
[A] (value: A) { predicate: (A) => Bool }: Option[A] / {} - getOrFail
[A] (option: Option[A]): A / {fail}
Example usage: examples/stdlib/partial
Run `program` forever until `fail` is thrown.