Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add implcit imports for modules defined by instantiation #1691

Closed
yav opened this issue Jun 28, 2024 · 0 comments
Closed

Add implcit imports for modules defined by instantiation #1691

yav opened this issue Jun 28, 2024 · 0 comments
Labels
feature request Asking for new or improved functionality low-hanging fruit For issues that should be easy to fix parameterized modules Related to Cryptol's parameterized modules

Comments

@yav
Copy link
Member

yav commented Jun 28, 2024

Consider the following example:


module M where

submodule A where
  x = 2

submodule F where
  parameter
    a: Integer

   z = a + 5

submodule B = submodule F {submodule  A }

This defines 3 submodules, 2 normal ones and a functor. At the moment we add implicit imports for simple modules, such as A, but not ones defined by instantiation (e.g., B).

I think it'd be more consistent to also add an import for B. We still can't add implicit imports for things inside B, because at this stage we don't know what F is, and therefore we can't tell what it defines (so we don't know what to import)

@yav yav added feature request Asking for new or improved functionality parameterized modules Related to Cryptol's parameterized modules low-hanging fruit For issues that should be easy to fix labels Jun 28, 2024
@yav yav closed this as completed in 2c6ac78 Jul 2, 2024
yav added a commit that referenced this issue Jul 2, 2024
Fixes #1691 (and removes partial match warning)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Asking for new or improved functionality low-hanging fruit For issues that should be easy to fix parameterized modules Related to Cryptol's parameterized modules
Projects
None yet
Development

No branches or pull requests

1 participant