Since the repl works by changing provides to (effectively) provide *, if there are well-formedness issues in the provides block, they are ignored.
On master:
provide { bogus: bogus } end
x = 10
Does not report an error, but would report that bogus is unbound if imported.
On horizon:
provide:
data MyPosn hiding (j, MyPosn), # j is not reported as nonsense
type MyPosn as P
end
data MyPosn:
| pos2d(x, y)
| pos3d(x, y, z)
end
Does not report that j is nonsense from main, but does if that file is imported.
Note that these cases do report the right error if they are run as a main program from the command-line, because then they aren't treated as definitions, they're treated as modules to compile with their provides block.
Since the repl works by changing provides to (effectively)
provide *
, if there are well-formedness issues in the provides block, they are ignored.On master:
Does not report an error, but would report that
bogus
is unbound if imported.On horizon:
Does not report that
j
is nonsense from main, but does if that file is imported.Note that these cases do report the right error if they are run as a main program from the command-line, because then they aren't treated as definitions, they're treated as modules to compile with their provides block.