Browse Source

Show <builtin>/ path for builtin prelude modules

David Peter 2 years ago
parent
commit
5e67dcf53d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      numbat/src/module_importer.rs

+ 4 - 1
numbat/src/module_importer.rs

@@ -72,7 +72,10 @@ impl ModuleImporter for BuiltinModuleImporter {
                 let content = embedded_file.data.into_owned();
                 String::from_utf8(content).expect("Numbat modules are properly UTF-8 encoded")
             })
-            .map(|content| (content, None))
+            .map(|content| {
+                let user_facing_path = PathBuf::from("<builtin>").join("modules").join(path);
+                (content, Some(user_facing_path))
+            })
     }
 }