0b7eba8458
Attempts to compile a pervasives.epi containing functions with multiple outputs or nodes now fail with an informative error message. * The following files demonstrate the problem: pervasives.epi: type bool = true | false external val node test(bool;bool) returns bool broken.ept: node broken() returns (y : bool) let y = test(false, false); tel Running: heptc -nopervasives pervasives.epi heptc -stdlib . -target c broken.ept Fails with: --------- Internal compiler error Passe : Static evaluation failed of the pervasive operator test ---------- Fatal error: exception Misc.Assert_false * A different error occurs for nodes that return multiple outputs: pervasives.epi: type bool = true | false external val node test(bool;bool) returns (bool;bool) broken.ept: node broken() returns (y : bool) var l1 : bool; let (y,l1) = test(false, false); tel Running: heptc -nopervasives pervasives.epi heptc -stdlib . broken.ept Gives: Inconsistent clock annotation for exp test(false, false). File "broken.ept", line 4, characters 11-29: > (y,l1) = test(false, false); > ^^^^^^^^^^^^^^^^^^ Clock Clash: this expression has clock 'a3, but is expected to have clock ('a4 * 'a5). The name "test" is parsed as an Eextvalue (rather than an Eapp), and there is an implicit assumption in compiler/minils/analysis/clocking.ml that such values have a simple clock. |
||
---|---|---|
.. | ||
global | ||
heptagon | ||
main | ||
minils | ||
obc | ||
utilities | ||
_tags.in | ||
Makefile | ||
myocamlbuild.ml | ||
myocamlbuild_config.ml | ||
preproc.ml |