GaloisInc / cryptol

Cryptol: The Language of Cryptography
https://galoisinc.github.io/cryptol/master/RefMan.html
BSD 3-Clause "New" or "Revised" License
1.14k stars 126 forks source link

Aliasing modules #1591

Open qsctr opened 11 months ago

qsctr commented 11 months ago

Currently we have the syntax module M = F { X } for giving the name M to the instantiation of the functor F with module parameter X. However we cannot simply do module M = N where N is a regular module, not a functor. Such a feature might be useful for exposing a deeply nested submodule, e.g. submodule M = submodule A::B::C::M. Alternatively if we have #1589 then this could be achieved by

submodule M where
  extend submodule A::B::C::M

or perhaps be syntactic sugar for it.