mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Make Inspect a builtin
This commit is contained in:
parent
75f6293e12
commit
700776fad7
14 changed files with 63 additions and 29 deletions
|
@ -2290,6 +2290,7 @@ fn update<'a>(
|
|||
extend_header_with_builtin(header, ModuleId::ENCODE);
|
||||
extend_header_with_builtin(header, ModuleId::DECODE);
|
||||
extend_header_with_builtin(header, ModuleId::HASH);
|
||||
extend_header_with_builtin(header, ModuleId::INSPECT);
|
||||
}
|
||||
|
||||
state
|
||||
|
@ -3494,6 +3495,7 @@ fn load_module<'a>(
|
|||
"Encode", ModuleId::ENCODE
|
||||
"Decode", ModuleId::DECODE
|
||||
"Hash", ModuleId::HASH
|
||||
"Inspect", ModuleId::INSPECT
|
||||
"TotallyNotJson", ModuleId::JSON
|
||||
}
|
||||
|
||||
|
@ -5257,6 +5259,7 @@ fn canonicalize_and_constrain<'a>(
|
|||
| ModuleId::DICT
|
||||
| ModuleId::SET
|
||||
| ModuleId::HASH
|
||||
| ModuleId::INSPECT
|
||||
);
|
||||
|
||||
if !name.is_builtin() || should_include_builtin {
|
||||
|
|
|
@ -25,5 +25,6 @@ pub const BUILTIN_MODULES: &[(ModuleId, &str)] = &[
|
|||
(ModuleId::ENCODE, "Encode"),
|
||||
(ModuleId::DECODE, "Decode"),
|
||||
(ModuleId::HASH, "Hash"),
|
||||
(ModuleId::INSPECT, "Inspect"),
|
||||
(ModuleId::JSON, "TotallyNotJson"),
|
||||
];
|
||||
|
|
|
@ -85,6 +85,7 @@ impl Default for ModuleCache<'_> {
|
|||
ENCODE,
|
||||
DECODE,
|
||||
HASH,
|
||||
INSPECT,
|
||||
JSON,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue