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

Fourmolu #965

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Fourmolu #965

merged 2 commits into from
Jan 11, 2024

Conversation

kazu-yamamoto
Copy link
Contributor

  • Adding fourmolu.yaml
  • Reformatting most Haskell files with fourmolu

Copy link
Contributor

@Vlix Vlix left a comment

Choose a reason for hiding this comment

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

Straight-forward addition 👍

The following is one of the reasons I prefer trailing function arrows, though:

-- leading
type CheckCreds =
    ByteString
    -> ByteString
    -> IO Bool

compare with trailing:

-- trailing
type CheckCreds =
    ByteString ->
    ByteString ->
    IO Bool

Since this way: they're alligned, and the one that stands out because it doesn't have an arrow is the result of the function, instead of the first argument. (My reasoning is, the first argument isn't special, the result is, so having that be more visually apparent makes more sense)

And with normal functions the diffs are nicer if the first argument moves:

  -- leading
  myFunc
-    :: Arg1
-    -> Arg2
+    :: Arg2
+    -> Arg1
     -> Result

versus

  -- trailing
  myFunc ::
-    Arg1 ->
     Arg2 ->
+    Arg1 ->
     Result

But if you prefer this, it's a nit-pick, so it's totally fine 👍
LGTM.

@kazu-yamamoto
Copy link
Contributor Author

I have no logical reason why I prefer leading.
Anyway, I will merge this after all possible PRs have been merged.

@Vlix
Copy link
Contributor

Vlix commented Jan 10, 2024

I'd say just add this in. 👍
The other open PRs can resolve any conflicts without too much hassle. (only one with more hassle is mine, but I'll reformat it after, no problem)

@kazu-yamamoto
Copy link
Contributor Author

I would like to merge #964 first.

@kazu-yamamoto
Copy link
Contributor Author

Rebased and watching CI.

@kazu-yamamoto kazu-yamamoto merged commit b18612c into yesodweb:master Jan 11, 2024
18 checks passed
@kazu-yamamoto kazu-yamamoto deleted the fourmolu branch January 11, 2024 01:10
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