Add builtin functions to the prelude
Starting with 'not', will add 'always' and 'identity' later.
This commit is contained in:
@@ -486,8 +486,12 @@ where
|
||||
let mut imports = HashMap::new();
|
||||
let mut constants = HashMap::new();
|
||||
|
||||
let option_data_type = TypedDataType::option(generic_var(self.id_gen.next()));
|
||||
let prelude_functions = builtins::prelude_functions();
|
||||
for (access_key, func) in prelude_functions.iter() {
|
||||
functions.insert(access_key.clone(), func);
|
||||
}
|
||||
|
||||
let option_data_type = TypedDataType::option(generic_var(self.id_gen.next()));
|
||||
data_types.insert(
|
||||
DataTypeKey {
|
||||
module_name: "".to_string(),
|
||||
@@ -582,6 +586,11 @@ where
|
||||
let mut imports = HashMap::new();
|
||||
let mut constants = HashMap::new();
|
||||
|
||||
let prelude_functions = builtins::prelude_functions();
|
||||
for (access_key, func) in prelude_functions.iter() {
|
||||
functions.insert(access_key.clone(), func);
|
||||
}
|
||||
|
||||
let option_data_type = TypedDataType::option(generic_var(self.id_gen.next()));
|
||||
|
||||
data_types.insert(
|
||||
|
||||
Reference in New Issue
Block a user