-
Notifications
You must be signed in to change notification settings - Fork 2
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
Definition of a pragma for boolean type. #48
base: main
Are you sure you want to change the base?
Conversation
What's the intended meaning? To translate declared true/false to Yul true/false/ Anything else? |
That's my main question: What should I do with this information? Should I add if / while statements to the surface syntax? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very hard to tell what changed when actual changes are mixed with big reformatting. Could you please split this PR in two (reformatting, actual pragma stuff)?
data PragmaStatus | ||
= Enabled | ||
| DisableAll | ||
| DisableFor (NonEmpty Name) | ||
deriving (Eq, Ord, Show, Data, Typeable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what PragmaStatus
is, please add comment in code
Something is missign in prettyprinter:
|
instance Pretty Pragma where | ||
ppr (InferencePragma _ Enabled) = empty | ||
ppr (InferencePragma ty st) = | ||
hsep [text "pragma", ppr ty, ppr st, semi] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instance Pretty Pragma where | |
ppr (InferencePragma _ Enabled) = empty | |
ppr (InferencePragma ty st) = | |
hsep [text "pragma", ppr ty, ppr st, semi] | |
instance Pretty Pragma where | |
ppr (InferencePragma _ Enabled) = empty | |
ppr (InferencePragma ty st) = | |
hsep [text "pragma", ppr ty, ppr st, semi] | |
ppr (BoolTypePragma (ty N.:| cons)) = | |
text "pragma bool-type-decl" <+> commaSep (map ppr (ty:cons)) | |
Initial implementation for a pragma for setting up the boolean type. Current syntax definition: