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

`hindent` takes exponential time to pretty print #531

Closed
facundominguez opened this issue Dec 20, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@facundominguez
Copy link
Contributor

commented Dec 20, 2018

Problem

hindent takes exponential time when printing the following program.

  • I checked the issue tracker for existing issues about this problem.
  • I'm using the latest version of hindent.

Input haskell

f = f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f f))))))))))))))))))))))))))
$ hindent --version
hindent 5.2.7

$ time hindent test.hs

real	2m45.051s
user	2m44.136s
sys	0m0.913s
@chrisdone

This comment has been minimized.

Copy link
Owner

commented Dec 30, 2018

That's true. Do you have a real world use-case of this?

@facundominguez

This comment has been minimized.

Copy link
Contributor Author

commented Jan 2, 2019

I don't. I just discovered this while studying hindent.

@chrisdone

This comment has been minimized.

Copy link
Owner

commented Jan 2, 2019

Oki doki!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.