You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6151 Reporter:@Drup Status: closed (set by @mshinwell on 2016-12-06T22:08:01Z) Resolution: won't fix Priority: low Severity: minor Version: 4.00.1 Target version: later Category: back end (clambda to assembly) Related to:#7408 Monitored by:@Drup
Bug description
I'm not really sure this is really a bug or "working as intended" but the joined file doesn't compile with the following message :
I think it's reasonable to assume that all the builtins have fixed signature that match the one declared as data type. We should close this PR as variable arity %apply is a bad idea. On other hand "lambda" intermediate language supports only simple single argument apply.
The fact that this code don't compile is fine, but the error reporting should be clearer and a type check should be done at the definition, not as the use.
By using external, you are giving up your right to static type checking, so in my opinion you should be happy to get an error at compile-time and not a segment violation at run-time.
That said, if there is a simple way of giving a better error message, I'm in favor of implementing it.
I think there are many higher-priority items on the agenda. Furthermore, use of % primitives outside the compiler distribution is not to be encouraged---if you play with fire, you should expect to get burnt occasionally. Closing this issue; please submit a patch via Github if you feel strongly enough.
Original bug ID: 6151
Reporter: @Drup
Status: closed (set by @mshinwell on 2016-12-06T22:08:01Z)
Resolution: won't fix
Priority: low
Severity: minor
Version: 4.00.1
Target version: later
Category: back end (clambda to assembly)
Related to: #7408
Monitored by: @Drup
Bug description
I'm not really sure this is really a bug or "working as intended" but the joined file doesn't compile with the following message :
It does of course compile (and give the expected result with the signature :
('a -> 'b) -> 'a -> 'b
Also, and this is probably a bigger issue, the first line alone compile just fine as long as ap2 is not used.
File attachments
The text was updated successfully, but these errors were encountered: