View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0000574 | mercury | Bug | public | 2024-05-06 00:35 | 2024-05-06 00:46 | ||||||||
Reporter | juliensf | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0000574: Higher-order inst gets lost when using combined higher-order type and inst | ||||||||||||
Description | The attached program is a very cut-down version of a problem reported by a user on twitter. Compiling the attached results in: bug574.m:017: In clause for `process_job(in, di, uo)': bug574.m:017: in argument 1 of call to predicate `bug574.do_process_job1'/3: bug574.m:017: mode error: variable `Pred' has instantiatedness `ground', bug574.m:017: expected instantiatedness was `(pred(in, di, uo) is det)'. I can see no reason why Pred has that instantiatedness, unless it is some limitation of the combined higher-order types and insts implementation or an actual bug. | ||||||||||||
Additional Information | The users original program can be found here: <https://gist.github.com/WojciechKarpiel/11fd9ccb92d66784110fbb4f3682b131#gistcomment-5046424> | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
|
Notes | |
zs (developer) 2024-05-06 00:46 |
This is not so much a bug as a not-yet-fully-implemented feature. The code for *accepting* insts in types was done years ago, but the code for *using* insts in types was not. In the absence of that code, having the inst "get lost" is unfortunately the accepted behavior. I have already started work on this issue some months ago, but got distracted by other things. I guess I can resume work on it after I get done with the first pass through the parts of the compiler that generate diagnostics to add color. |