mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-09-11 14:06:13 +03:00
Merge pull request #1698 from GaloisInc/issue_1691_2
Make fixes for 1691 work with more nested modules.
This commit is contained in:
commit
07bb442d7e
@ -76,7 +76,13 @@ processModule dcl =
|
||||
Private -> []
|
||||
)
|
||||
|
||||
FunctorInstance {} -> ([dcl, mkImp loc [mname]], [])
|
||||
FunctorInstance {} ->
|
||||
let imps = [[mname]]
|
||||
in ( dcl : map (mkImp loc) imps
|
||||
, case tlExport m of
|
||||
Public -> imps
|
||||
Private -> []
|
||||
)
|
||||
InterfaceModule {} -> ([dcl], [])
|
||||
_ -> panic "processModule" ["Not a module"]
|
||||
|
||||
|
12
tests/issues/issue_1691_2.cry
Normal file
12
tests/issues/issue_1691_2.cry
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
submodule F where
|
||||
parameter x: Integer
|
||||
y = x + 1
|
||||
|
||||
submodule B = submodule F where x = 2
|
||||
|
||||
submodule M where
|
||||
submodule A where
|
||||
a = 2
|
||||
submodule B = submodule F where x = 2
|
2
tests/issues/issue_1691_2.icry
Normal file
2
tests/issues/issue_1691_2.icry
Normal file
@ -0,0 +1,2 @@
|
||||
:load issue_1691_2.cry
|
||||
:t M::B::y
|
4
tests/issues/issue_1691_2.icry.stdout
Normal file
4
tests/issues/issue_1691_2.icry.stdout
Normal file
@ -0,0 +1,4 @@
|
||||
Loading module Cryptol
|
||||
Loading module Cryptol
|
||||
Loading module Main
|
||||
M::B::y : Integer
|
Loading…
Reference in New Issue
Block a user