juvix
juvix copied to clipboard
Add do-notation
- Depends on #2354.
We would support three kinds of statements (bind, let, expression), and we could borrow the syntax from haskell.
do {
<var> <- <expr>; -- bind
let <fundef>; -- pure let
<expr>; -- monadic expression
};
In the future we can consider some extensions:
- Allow patterns of single constructor types on the left of
<-
. - @paulcadman mentioned Idris !-notation.
- Do notation for
Applicative
.