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

Add code formatter #49

Open
wismill opened this issue Dec 20, 2021 · 3 comments
Open

Add code formatter #49

wismill opened this issue Dec 20, 2021 · 3 comments

Comments

@wismill
Copy link
Collaborator

wismill commented Dec 20, 2021

Following this comment, it would be useful to use Formolu to ensure coding style.

@harendra-kumar
Copy link
Member

One hiccup that we saw in adopting fourmolu last time was that there was no way to format like this:

pollCounts
    :: MonadAsync m
    => (a -> Bool)
    -> (Stream m Int -> Stream m Int)
    -> Fold m Int b
    -> Stream m a
    -> Stream m a

It only supported putting the arrows at the end. We have codebase with this style and we have gotten used to it. We did not want to change that. Hopefully it might have support for this now.

@wismill
Copy link
Collaborator Author

wismill commented Dec 20, 2021

There is a PR, but not yet merged.

@adithyaov
Copy link
Member

Although not perfect, https://github.com/adithyaov/hindent/tree/composewell-style works for most cases. There are some known cases it does not work for but I manually fix them as it's much easier.

This is in no way a clean way to solve the problem of formatting though.

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

3 participants