Running vera run examples/modules.vera --fn clamp -- 100 0 42 fails:
[E609] Error at examples/modules.vera, line 4, column 1:
import vera.collections(List, Option);
Data type 'Option' is defined in both imported module 'vera.math' and 'vera.collections'.
The prelude injects Option<T> into every module. When a module imports two other modules that both re-export prelude types (like Option), the flat compilation strategy (C7e) sees duplicate definitions.
The example passes vera check and vera verify but fails at vera run.
Reproduction
vera run examples/modules.vera --fn clamp -- 100 0 42
Related: #187 (module-qualified call disambiguation)
Running
vera run examples/modules.vera --fn clamp -- 100 0 42fails:The prelude injects
Option<T>into every module. When a module imports two other modules that both re-export prelude types (likeOption), the flat compilation strategy (C7e) sees duplicate definitions.The example passes
vera checkandvera verifybut fails atvera run.Reproduction
Related: #187 (module-qualified call disambiguation)