Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some enhancements in support of interfaces in Pulse #3270

Merged
merged 16 commits into from
Apr 29, 2024

Conversation

aseemr
Copy link
Collaborator

@aseemr aseemr commented Apr 26, 2024

The PR adds the following:
 

  • When interleaving, use the extension parser peek functionality to determine the name of the extension definition. This allows matching a val in the interface to the extension definition in .fst.
  • Adds support for expected type in DSL checking. When there is a val present for the extension definition, we need to check that the type of the definition is consistent with the val. We now pass an optional expected type to the DSL type checker and expect the proof that the returned sigelt has the expected type, if any.

Copy link
Member

@mtzguido mtzguido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I like the new interface.

// See if there is a val for the lid
//
if List.length lids > 1
then let s = lids |> List.map Ident.string_of_lid |> BU.concat_l ", " in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s unused? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, thanks! At some point I was adding this in the error message but then I switched to the show method.

(e_tuple3
(e_list (e_tuple3 e_bool RE.e_sigelt e_blob))
(e_tuple3 e_bool RE.e_sigelt e_blob)
(e_list (e_tuple3 e_bool RE.e_sigelt e_blob)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal but maybe using Typeclasses.solve can fill in these embeddings.

@aseemr
Copy link
Collaborator Author

aseemr commented Apr 29, 2024

I have a local everest green, merging.

@aseemr aseemr merged commit ac9f693 into master Apr 29, 2024
2 checks passed
@aseemr aseemr deleted the _aseem_pulse_interfaces branch April 29, 2024 08:18
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