Haskell-language-server: "Remove redundant import" doesn't always work with ImportQualifiedPost

Created on 1 Dec 2020  路  7Comments  路  Source: haskell/haskell-language-server

{-# LANGUAGE ImportQualifiedPost #-}
{-# OPTIONS_GHC -Wall #-}

import Data.Functor qualified

leads to:

{-# LANGUAGE ImportQualifiedPost #-}
{-# OPTIONS_GHC -Wall #-}

 qualified
imports plugin blocked upstream bug

Most helpful comment

All 7 comments

Actually, this looks like a GHC SrcLoc bug. See ghc -ddump-parsed-ast. Will report upstream.

@georgefst can you include the link here when you do. CC @shayne-fletcher (the Ghcide guts of HLS and the ImportQualifiedPost were written by the same people at the same time)

@georgefst , @ndmitchell thanks for alerting me. Yes, I see the problem. @georgefst please assign me the bug

The fix has landed on GHC master and marked as needing back porting to 8.10.3 and 9.0.1 馃

The fix has landed on GHC master and marked as needing back porting to 8.10.3 and 9.0.1 馃

I see that the fix was back-ported to these branches today so we are all set.

Was this page helpful?
0 / 5 - 0 ratings