mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Move Eq to Bool
This commit is contained in:
parent
bd5f5ed735
commit
a256947a9f
19 changed files with 92 additions and 101 deletions
|
@ -86,7 +86,6 @@ impl ModuleName {
|
|||
pub const ENCODE: &'static str = "Encode";
|
||||
pub const DECODE: &'static str = "Decode";
|
||||
pub const HASH: &'static str = "Hash";
|
||||
pub const EQ: &'static str = "Eq";
|
||||
pub const JSON: &'static str = "Json";
|
||||
|
||||
pub fn as_str(&self) -> &str {
|
||||
|
|
|
@ -184,7 +184,6 @@ macro_rules! map_symbol_to_lowlevel {
|
|||
// Below, we explicitly handle some exceptions to the pattern where a lowlevel maps
|
||||
// directly to a symbol. If you are unsure if your lowlevel is an exception, assume
|
||||
// that it isn't and just see if that works.
|
||||
#[allow(unreachable_patterns)] // TODO: remove after we replace `BOOL_EQ` with `EQ_EQ` wholly
|
||||
match lowlevel {
|
||||
$(
|
||||
LowLevel::$lowlevel => Symbol::$symbol,
|
||||
|
@ -310,7 +309,6 @@ map_symbol_to_lowlevel! {
|
|||
NumShiftRightBy <= NUM_SHIFT_RIGHT,
|
||||
NumShiftRightZfBy <= NUM_SHIFT_RIGHT_ZERO_FILL,
|
||||
NumToStr <= NUM_TO_STR,
|
||||
Eq <= BOOL_EQ,
|
||||
Eq <= EQ_STRUCTURAL_EQ,
|
||||
NotEq <= BOOL_NEQ,
|
||||
And <= BOOL_AND,
|
||||
|
|
|
@ -1251,8 +1251,11 @@ define_builtins! {
|
|||
4 BOOL_OR: "or"
|
||||
5 BOOL_NOT: "not"
|
||||
6 BOOL_XOR: "xor"
|
||||
7 BOOL_EQ: "isEq"
|
||||
8 BOOL_NEQ: "isNotEq"
|
||||
7 BOOL_NEQ: "isNotEq"
|
||||
8 EQ_EQ: "Eq" exposed_type=true
|
||||
9 EQ_IS_EQ: "isEq"
|
||||
10 EQ_STRUCTURAL_EQ: "structuralEq"
|
||||
11 BOOL_IS_EQ_IMPL: "boolIsEq"
|
||||
}
|
||||
5 STR: "Str" => {
|
||||
0 STR_STR: "Str" exposed_apply_type=true // the Str.Str type alias
|
||||
|
@ -1525,15 +1528,9 @@ define_builtins! {
|
|||
15 HASH_HASH_STR_BYTES: "hashStrBytes"
|
||||
16 HASH_HASH_LIST: "hashList"
|
||||
}
|
||||
14 EQ: "Eq" => {
|
||||
0 EQ_EQ: "Eq" exposed_type=true
|
||||
1 EQ_IS_EQ: "isEq"
|
||||
2 EQ_IS_NOT_EQ: "isNotEq"
|
||||
3 EQ_STRUCTURAL_EQ: "structuralEq"
|
||||
}
|
||||
15 JSON: "Json" => {
|
||||
14 JSON: "Json" => {
|
||||
0 JSON_JSON: "Json"
|
||||
}
|
||||
|
||||
num_modules: 16 // Keep this count up to date by hand! (TODO: see the mut_map! macro for how we could determine this count correctly in the macro)
|
||||
num_modules: 15 // Keep this count up to date by hand! (TODO: see the mut_map! macro for how we could determine this count correctly in the macro)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue