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

It should be possible to have pragmas inside record declarations #2872

Closed
lukaszcz opened this issue Jul 2, 2024 · 0 comments · Fixed by #2875
Closed

It should be possible to have pragmas inside record declarations #2872

lukaszcz opened this issue Jul 2, 2024 · 0 comments · Fixed by #2875
Assignees
Milestone

Comments

@lukaszcz
Copy link
Collaborator

lukaszcz commented Jul 2, 2024

The following

type Pr (A B : Type) := mkPr {
     {-# inline: true #-}
     pfst : A;
     psnd : B
};

currently gives an error

  |
6 |      {-# inline: true #-}
  |      ^
unexpected '{'
expecting <identifier>, builtin, syntax, or }

Instead, the pragma should be accepted and associated with the generated record projection.

This would be useful to have for the Isabelle translation, to be able to indicate that certain functions in a trait should be translated to specific Isabelle operators.

@lukaszcz lukaszcz added this to the 0.6.4 milestone Jul 2, 2024
@lukaszcz lukaszcz self-assigned this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant