Open
Description
Given this BSV code:
package Foo;
module [Module] helloWorld#(Module#(Empty) m)(Empty);
let e <- m;
endmodule
endpackage
Compiling it with bsc -dparsed=FooParsed.bsv Foo.bsv
yields:
package Foo;
module helloWorld#(Module#(Empty) m)(Empty);
let e <- m;
endmodule: helloWorld
endpackage: Foo
This is almost the same code, but there is one key difference: the module
keyword lacks the [Module]
part after it. This change is significant enough to cause bsc to reject it:
$ bsc FooParsed.bsv
Warning: Unknown position: (S0001)
File name `FooParsed.bsv' does not match package name `Foo'
Error: "FooParsed.bsv", line 2, column 8: (T0029)
Signature mismatch (given too general):
given:
function a__#(Empty) f(Module#(Empty) x1) provisos (IsModule#(a__, b__))
deduced:
module f#(Module#(Empty) x1)(Empty) provisos (IsModule#(Module, Id__))
Any reason not to preserve the [Module]
part?
Metadata
Metadata
Assignees
Labels
No labels