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

Bug?: pretty printer not formatted on either match #40

Open
Sporarum opened this issue Apr 28, 2020 · 3 comments
Open

Bug?: pretty printer not formatted on either match #40

Sporarum opened this issue Apr 28, 2020 · 3 comments

Comments

@Sporarum
Copy link
Contributor

Sporarum commented Apr 28, 2020

Here's the output:

[INFO] matchleft (c + c + c + c) { caselefta => 2 * a * a * a * a * acaserighta => a }

Other trees work fine, for example:

[INFO] fun of a = {
[INFO] 2 * a * a * a * a * a
[INFO] }
[INFO] (c + c + c + c)

@jad-hamza
Copy link
Collaborator

Thanks for the report. Can you give the original file and the command to run? Do you get this on the latest master? The printer is still experimental and spacing is controlled here:

def insertSpace(t1: Token, t2: Token): Boolean = (t1, t2) match {

@Sporarum
Copy link
Contributor Author

Sporarum commented May 6, 2020

Error occurs on https://github.com/Sporarum/StainlessFit/tree/partEval (merged with latest master),
when running: fit parteval examples/parteval/eitherMatch.sf
The spacing is correct now, but the line feeds are still missing:
[INFO] match left (c + c + c + c) { case left a => 2 * a * a * a * a * a case right a => a }
(Note: This is all a single line, github's automatic linefeed just lands correctly by chance)

@jad-hamza
Copy link
Collaborator

I added some new lines in 27f69d5, should be better now

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

No branches or pull requests

2 participants