Mercerenies / tfactor

0 stars 0 forks source link

Aliasing Into Functors #9

Open Mercerenies opened 4 years ago

Mercerenies commented 4 years ago

Aliasing into a functor or module synonym that hasn't yet been instantiated is an error right now. It should be allowed.

Example: (contained within a module, to avoid #8 issues)

mod M
  mod N end
  mod P = N end
  alias Q = P # This is an error, even though it should be well-defined.
end

(Added Note: As of the resolution of #11, the above code works as intended. See https://github.com/Mercerenies/tfactor/issues/9#issuecomment-622090857 for a more current example.)

Mercerenies commented 4 years ago

Related: #17, which involves aliases within functors, not into them.

Mercerenies commented 4 years ago

As of commit 829946b, the code referenced in the original issue statement will resolve now since issue #11 has been fixed. However, the similar issue of aliasing into a functor actualization or synonym is still very much present. For instance, the following should function without issues.

mod M
  mod N mod NN end end
  mod P = N end
  alias Q = P.NN # This is an error, even though it should be well-defined.
end
Mercerenies commented 4 years ago

c950f3c fixes this in many cases, including the code snippet in the above comment. include resolution is still not 100% correct.

Mercerenies commented 4 years ago

596160f adds support for include resolution into functor actualizations.