Add spaceship operator for getting an ord
This commit is contained in:
parent
8565c7dfb3
commit
e125e8b440
@ -133,5 +133,6 @@ lazy_static! {
|
||||
"<=" => (Func(bx!(Const(Nat)), bx!(Func(bx!(Const(Nat)), bx!(Const(Nat))))), (), 20),
|
||||
"==" => (Func(bx!(Const(Nat)), bx!(Func(bx!(Const(Nat)), bx!(Const(Nat))))), (), 20),
|
||||
"=" => (Func(bx!(Const(Nat)), bx!(Func(bx!(Const(Nat)), bx!(Const(Nat))))), (), 20),
|
||||
"<=>" => (Func(bx!(Const(Nat)), bx!(Func(bx!(Const(Nat)), bx!(Const(Nat))))), (), 20),
|
||||
};
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ impl Schala {
|
||||
let prelude = r#"
|
||||
type Option<T> = Some(T) | None
|
||||
type Color = Red | Green | Blue
|
||||
type Ord = LT | EQ | GT
|
||||
"#;
|
||||
let mut s = Schala::new_blank_env();
|
||||
s.execute_pipeline(prelude, &EvalOptions::default());
|
||||
|
Loading…
Reference in New Issue
Block a user