Skip to content

WIP: Add hindent support and bash script - #150

Open
amitaibu wants to merge 2 commits into
yesodweb:postgresfrom
amitaibu:hindent
Open

WIP: Add hindent support and bash script#150
amitaibu wants to merge 2 commits into
yesodweb:postgresfrom
amitaibu:hindent

Conversation

@amitaibu

Copy link
Copy Markdown

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.

Comment thread src/Foundation.hs
Nothing -> getApprootText guessApproot app req
Just root -> root

where

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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