thorin2
thorin2 copied to clipboard
Import of files
Currently, the import mechanism operates on dialects.
One could imagine a more modular style of files with a file-based import.
.import name // imports dialect name
.import name/abc // import abc.thorin from the dialect provided files
.import path/abc // imports path/abc.thorin from a local file
Local imports would allows for standard definitions like
.let _32 = 4294967296;
.let I32 = .Idx _32;
.let r32 = %core.Real 32;
.let double = %core.Real 64;
Dialect imports would allow for a more readable and modular approach to dialect definitions.
One example would be the differentiated constructs of autodiff.
While #185 fixes the underlying problem, I'll keep this one open until we have worked out a proper solution who we want to deal with imports and scoping.