Skip to content

Fixing two issues with the pretty printing of operators that are not applied to arguments#929

Open
alleystoughton wants to merge 1 commit intomainfrom
op-pretty-printing-fixes
Open

Fixing two issues with the pretty printing of operators that are not applied to arguments#929
alleystoughton wants to merge 1 commit intomainfrom
op-pretty-printing-fixes

Conversation

@alleystoughton
Copy link
Member

@alleystoughton alleystoughton commented Mar 10, 2026

Fixing two issues with the pretty printing of operators that are not applied to arguments. The first is unnecessary qualification, in some cases. The second is pretty printing qualified unary operators in a way that fails to parse.

close #854

applied to arguments. The first is unnecessary qualification, in some
cases. The second is pretty printing qualified unary operators in a
way that fails to parse. #close #854
@alleystoughton alleystoughton requested a review from strub March 10, 2026 00:50
@alleystoughton
Copy link
Member Author

Issue #928 is orthogonal to this fix.

->
let negop = EcPath.pqoname (EcPath.prefix op') "<>" in
pp_opapp ppe outer fmt (negop, tys, [f1; f2])
pp_opapp ppe outer fmt (negop, tys, [f1; f2], None)
Copy link
Member

Choose a reason for hiding this comment

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

Why None?


| Fapp ({f_node = Fop (p, tys)}, args) ->
pp_opapp ppe outer fmt (p, tys, args)
pp_opapp ppe outer fmt (p, tys, args, None)
Copy link
Member

Choose a reason for hiding this comment

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

Why None?

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.

pretty printing of operators that are not applied to argument

2 participants