tweag / ormolu

A formatter for Haskell source code
https://ormolu-live.tweag.io
Other
956 stars 83 forks source link

GHC parser failure with nested block comment in haddock #904

Closed brandonchinn178 closed 2 years ago

brandonchinn178 commented 2 years ago

Describe the bug When a pragma comment is in a haddock, GHC fails to parse.

To Reproduce

{-| {- bar -} -}

Expected behavior Should pass.

Environment Tested this on ormolu-live.tweag.io

Additional context

brandonchinn178 commented 2 years ago

Update: this parses:

{-| {\- bar -\} -}
mrkkrp commented 2 years ago

If the GHC parser fails on this, what can we do about it?

brandonchinn178 commented 2 years ago

Not much, I suppose. Sorry I guess I wasn't thinking late at night.

brandonchinn178 commented 2 years ago

Moved to https://gitlab.haskell.org/ghc/ghc/-/issues/20336