Please refrain from commenting further on this MR, see #21142 for a summary of this discussion and please comment there
** ON HOLD **
This MR and related ghc-proposal is on hold until we have working code and tests in
data JSVal = JSVal ByteArray#
In pursuit of #21078 (closed) This MR does:
Opaque#as a prim type. An
Addr#but one that does not support any pointer arithmetic. I'm open to any naming suggestions, perhaps
- Adds a runtime rep
OpaqueRepthat corresponds to the prim type
.stderr(the golden file).
This is the first time I have added a prim type and I may have (very likely) confused things. I believe this should be a
known-key thing, not a
wired-in thing because of the information GHC knows about it, i.e., not all that much. Similarly, I believe this should have a runtime rep to correspond to the prim type but I'm honestly not sure how it all hooks together.
This is a draft because
Marked as Draft because we want this MR to serve as common ground to discuss supporting this feature in other backends as well, specifically Asterius (cc @TerrorJack), and with everyone else of course :)