Interface constraint scoping #1690
Labels
bug
Something not working correctly
design needed
We need to specify precisely what we want
parameterized modules
Related to Cryptol's parameterized modules
Consider the following example:
This reports the following error (error lines omitted):
However, if you swap the declaration of
K
and import ofFu
things work, which is clearly inconsistent.The problem is that we don't process declarations in top-to-bottom order---instead the renamer arranges declarations in dependency order when it figures out the names of things. This is nice because the user can declare things in whatever order makes most sense to them. It can do this because it can see where names are used and rearrange things as needed.
interface constraint
s, however present a problem, because they are not explicitly used so we don't know where to place them. At the moment we do some pretty ad-hoc stuff to try figure out their location, but that's clearly not working well.We need a different design to work around this. Perhaps
interface constraint
split the file into chunks and they are only in scope after the declarations, and when we rearrnage things we make sure stuff does not get moved out of its chunk?This requires some more thinking.
The text was updated successfully, but these errors were encountered: