diff options
Diffstat (limited to 'dhall_core/src/core.rs')
-rw-r--r-- | dhall_core/src/core.rs | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/dhall_core/src/core.rs b/dhall_core/src/core.rs index 502a9bc..0ea8c83 100644 --- a/dhall_core/src/core.rs +++ b/dhall_core/src/core.rs @@ -102,32 +102,34 @@ pub enum Const { #[derive(Debug, Clone, PartialEq, Eq)] pub struct V(pub Label, pub usize); -#[derive(Debug, Copy, Clone, PartialEq, Eq)] +// Definition order must match precedence order for +// pretty-printing to work correctly +#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] pub enum BinOp { - /// x && y` - BoolAnd, + /// x ? y + ImportAlt, /// x || y` BoolOr, - /// x == y` - BoolEQ, - /// x != y` - BoolNE, /// x + y` NaturalPlus, - /// x * y` - NaturalTimes, /// x ++ y` TextAppend, + /// x # y + ListAppend, + /// x && y` + BoolAnd, /// x ∧ y` Combine, - /// x //\\ y - CombineTypes, - /// x ? y - ImportAlt, /// x // y Prefer, - /// x # y - ListAppend, + /// x //\\ y + CombineTypes, + /// x * y` + NaturalTimes, + /// x == y` + BoolEQ, + /// x != y` + BoolNE, } /// Built-ins |