mirror of
https://github.com/anoma/juvix.git
synced 2024-12-12 04:43:18 +03:00
20 lines
379 B
Plaintext
20 lines
379 B
Plaintext
|
module IncomparablePrecedences;
|
||
|
|
||
|
type Bool := true | false;
|
||
|
|
||
|
syntax fixity log1 {arity: binary, assoc: left};
|
||
|
syntax fixity log2 {arity: binary, assoc: right};
|
||
|
|
||
|
syntax operator && log1;
|
||
|
syntax operator || log2;
|
||
|
|
||
|
&& : Bool -> Bool -> Bool
|
||
|
| true x := x
|
||
|
| false _ := false;
|
||
|
|
||
|
|| : Bool -> Bool -> Bool
|
||
|
| true _ := true
|
||
|
| false x := x;
|
||
|
|
||
|
main : Bool := false && true || true;
|