Don't panic if we fail to resolve a top-level instnatiation

Fixes #1470
This commit is contained in:
Iavor Diatchki 2022-11-21 10:40:20 -08:00
parent c2cda89aa2
commit 18e3563c2c
4 changed files with 10 additions and 2 deletions

View File

@ -148,8 +148,7 @@ resolveImports ext def su =
case tryInstanceMaybe s (ImpTop m) (f,as) of
Just (r,newS) -> add m r newS
Nothing -> panic "resolveImports"
[ "Failed to finish a top-level instantiation" ]
Nothing -> (Map.singleton (ImpTop m) forceResolveInst, su)
where
toNest m = Map.fromList [ (ImpNested k, v) | (k,v) <- Map.toList m ]

View File

@ -0,0 +1 @@
module T034 = submodule X { submodule Y }

View File

@ -0,0 +1 @@
:load T034.cry

View File

@ -0,0 +1,7 @@
Loading module Cryptol
Loading module T034
[error] at T034.cry:1:25--1:26
Module not in scope: X
[error] at T034.cry:1:39--1:40
Module not in scope: Y