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

WIP: Add hindent support and bash script #150

Open
wants to merge 2 commits into
base: postgres
Choose a base branch
from

Conversation

amitaibu
Copy link

PR will add format files using hindent and will add a bash script to run it all on files.

Currently the bash script needs to exclude src/Settings.hs due to a known bug.

I've opened PR as work in progress, just to confirm it is a desired change. If so, I'll work on finalizing it.

The .haskell-ghc-mod.json is there to suppress errors in editors such as atom, that might get confused with multiple ghc installations.

Nothing -> getApprootText guessApproot app req
Just root -> root

where
Copy link
Author

Choose a reason for hiding this comment

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

apparently some things are still off.

Copy link
Author

Choose a reason for hiding this comment

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

known issue

Copy link
Member

Choose a reason for hiding this comment

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

That's easy to work around with a change to the source. I'll push that into a separate commit. I'm still not sure about the change overall though...

@snoyberg
Copy link
Member

I have two high-level concerns with doing this:

  1. A lot of diffs added to the codebase, not necessarily for great reasons. But I'm overall in favor of code style consistency, so I think I'd go along with it here.
  2. I'm not convinced that adding a script to each project is a good way to handle this. What about working on getting a command added to hindent to format a whole project?

@amitaibu
Copy link
Author

What about working on getting a command added to hindent to format a whole project?

If I understand correctly hident is just a prettifier. That is, it doesn't deal at all with (re-)saving the files. Maybe we could add it as a stack command -- but I haven't done it yet, so not sure about the complexity.

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.

2 participants