mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
fully qualify exposed symbols
This commit is contained in:
parent
a48f244cc7
commit
0d51309eb9
2 changed files with 7 additions and 5 deletions
|
@ -10,7 +10,9 @@ impl LayoutId {
|
||||||
// Returns something like "foo#1" when given a symbol that interns to "foo"
|
// Returns something like "foo#1" when given a symbol that interns to "foo"
|
||||||
// and a LayoutId of 1.
|
// and a LayoutId of 1.
|
||||||
pub fn to_symbol_string(self, symbol: Symbol, interns: &Interns) -> String {
|
pub fn to_symbol_string(self, symbol: Symbol, interns: &Interns) -> String {
|
||||||
format!("{}_{}", symbol.ident_string(interns), self.0)
|
let ident_string = symbol.ident_string(interns);
|
||||||
|
let module_string = interns.module_ids.get_name(symbol.module_id()).unwrap();
|
||||||
|
format!("{}_{}_{}", module_string, ident_string, self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,16 +7,16 @@ use std::alloc::Layout;
|
||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#[link_name = "main_1_exposed"]
|
#[link_name = "Main_main_1_exposed"]
|
||||||
fn roc_main(output: *mut u8) -> ();
|
fn roc_main(output: *mut u8) -> ();
|
||||||
|
|
||||||
#[link_name = "main_1_size"]
|
#[link_name = "Main_main_1_size"]
|
||||||
fn roc_main_size() -> i64;
|
fn roc_main_size() -> i64;
|
||||||
|
|
||||||
#[link_name = "main_1_Fx_caller"]
|
#[link_name = "Main_main_1_Fx_caller"]
|
||||||
fn call_Fx(function_pointer: *const u8, closure_data: *const u8, output: *mut u8) -> ();
|
fn call_Fx(function_pointer: *const u8, closure_data: *const u8, output: *mut u8) -> ();
|
||||||
|
|
||||||
#[link_name = "main_1_Fx_size"]
|
#[link_name = "Main_main_1_Fx_size"]
|
||||||
fn size_Fx() -> i64;
|
fn size_Fx() -> i64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue