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 haddock-style-module configuration #135

Merged
merged 4 commits into from Nov 11, 2022

Conversation

brandonchinn178
Copy link
Collaborator

@brandonchinn178 brandonchinn178 commented Nov 23, 2021

Blocked on #49?
Resolves #74

Adds a haddock-style-module option that specifies the haddock style to use specifically for the module docstring (when not set, resolves to whatever haddock-style is — the current behavior)

Tested with this file:

{- |
Module: Foo
-}

module Foo where

-- | This is a
-- multi line
-- haddock
foo :: Int
foo = 42

and this command:

$ stack exec -- fourmolu --haddock-style=single-line --haddock-style-module=multi-line Foo.hs

{- |
Module: Foo
-}
module Foo where

-- | This is a
-- multi line
-- haddock
foo :: Int
foo = 42

@brandonchinn178
Copy link
Collaborator Author

Orthogonal, but related, to #130

@brandonchinn178 brandonchinn178 added the new config option Adds or would add new configuration option label Jan 24, 2022
@brandonchinn178
Copy link
Collaborator Author

brandonchinn178 commented May 31, 2022

Checklist:

  • CHANGELOG.md has been updated
  • Configuration docs in README.md have been updated
  • fourmolu.yaml updated to stay in sync with config in README.md

@joncol
Copy link

joncol commented Nov 11, 2022

Hi @brandonchinn178! Any chance this might see a revival now that #49 is resolved?

@brandonchinn178
Copy link
Collaborator Author

Yup! I was wondering if anyone else wanted this or if it was just me 😛 I'll merge soon

@brandonchinn178 brandonchinn178 merged commit c550536 into main Nov 11, 2022
@brandonchinn178 brandonchinn178 deleted the chinn/haddock-style-module branch November 11, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new config option Adds or would add new configuration option
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support different comment types for module and function docstrings
2 participants