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

Incorrect remove $ hint #673

Closed
neil-da opened this issue Jun 13, 2019 · 2 comments
Closed

Incorrect remove $ hint #673

neil-da opened this issue Jun 13, 2019 · 2 comments

Comments

@neil-da
Copy link

neil-da commented Jun 13, 2019

module Test where

mkDiag :: DynFlags -> T.Text -> ErrMsg -> Maybe FileDiagnostic
mkDiag dflags src e =
  case toDSeverity $ errMsgSeverity e of
    Nothing        -> Nothing
    Just bSeverity ->
      Just $ (toNormalizedFilePath $ srcSpanToFilename $ errMsgSpan e,)
        Diagnostic
        { _range    = srcSpanToRange $ errMsgSpan e
        , _severity = Just bSeverity
        , _source   = Just src
        , _message  = T.pack $ Out.showSDoc dflags (ErrUtils.pprLocErrMsg e)
        , _code     = Nothing
        , _relatedInformation = Nothing
        }
@neil-da neil-da changed the title Incorrect remove bracket hint Incorrect remove $ hint Jun 13, 2019
@ndmitchell
Copy link
Owner

Simple case:

foo = (a $ b $ c d, )

The problem is HSE doesn't perform fixity resolution inside tuple sections, as per haskell-suite/haskell-src-exts#434

@ndmitchell
Copy link
Owner

Confirmed works with HEAD that doesn't use HSE for parsing, so fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants