Skip to content

make meta part of records visible in mir - #899

Closed
SteveBronder wants to merge 2 commits into
stan-dev:masterfrom
SteveBronder:fix/make-metas-visible-in-mir
Closed

make meta part of records visible in mir#899
SteveBronder wants to merge 2 commits into
stan-dev:masterfrom
SteveBronder:fix/make-metas-visible-in-mir

Conversation

@SteveBronder

Copy link
Copy Markdown
Contributor

Summary

I never knew what the meta part of a record was because when I printed it out in the mir all I got back was <opaque>. Turns out, sometimes they have useful things in them. This PR makes is so that the meta parts of a record are visible in the mir. It makes for a lot more code that's printed out but imo I'd rather have it printed out so I can see what's there.

Release notes

Makes meta records visible in mir instead of <opaque>

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@rybern

rybern commented May 14, 2021

Copy link
Copy Markdown
Collaborator

It seems like most of the bloat in the printouts comes from locations, but I'm guessing that's not the parts that's useful for you. Can we keep only the location opaque?

@SteveBronder

Copy link
Copy Markdown
Contributor Author

Yeah I'm fine with that. One weird thing, I can just put an opaque_list there but in #885 ocaml 4.12 throws a warning / error for these. Is there some other way to suppress these besides opaque_list? If not then I'm fine doing it anyway and we can sort out how to fix that when we bump up versions

@rybern

rybern commented May 14, 2021

Copy link
Copy Markdown
Collaborator

Not sure about that, is opaque_list an alternative to [@sexp.opaque]?

@SteveBronder

Copy link
Copy Markdown
Contributor Author

Honestly idk lol I'm gonna just put it on the line number and we can sort it when we update to 4.12

@SteveBronder

Copy link
Copy Markdown
Contributor Author

Huh it looks like doing that just puts us back to where we started. Maybe I was just confused since I kept seeing opaque everywhere and we were actually printing the meta in places. Going to close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants