asoffer / Icarus

An experimental general-purpose programming language
Apache License 2.0
9 stars 2 forks source link

Module declarations should be allowed to overload. #80

Open asoffer opened 2 years ago

perimosocordiae commented 2 years ago

I'm not sure exactly what you mean by this. Can you give an example?

asoffer commented 2 years ago

The following should be allowed:

m ::= import "mod1.ic"
m ::= import "mod2.ic"

Then any use of m.symbol will look up symbol in both mod1.ic and mod2.ic.

Importantly though, for ADL, these are still considered two separate modules. If a type is declared it mod1.ic, and a function call is invoked with ADL, we will only look up the symbol in mod1.ic, and not mod2.ic.