2024-11-08 03:13 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000574mercuryBugpublic2024-05-06 00:46
Reporterjuliensf 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000574: Higher-order inst gets lost when using combined higher-order type and inst
DescriptionThe 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 InformationThe users original program can be found here: <https://gist.github.com/WojciechKarpiel/11fd9ccb92d66784110fbb4f3682b131#gistcomment-5046424>
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0001232

zs (developer)

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.
+Notes

-Issue History
Date Modified Username Field Change
2024-05-06 00:35 juliensf New Issue
2024-05-06 00:35 juliensf File Added: bug574.m
2024-05-06 00:46 zs Note Added: 0001232
+Issue History