thorin2 icon indicating copy to clipboard operation
thorin2 copied to clipboard

Import of files

Open NeuralCoder3 opened this issue 3 years ago • 1 comments

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.

NeuralCoder3 avatar Oct 14 '22 08:10 NeuralCoder3

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.

leissa avatar Mar 27 '23 14:03 leissa