on master help sign in
Remove redundant imports
ea2d80eMark Karpov
src/Ormolu/Diff.hs−1
@@ -8,7 +8,6 @@ module Ormolu.Diff
8 )
8 )
9where
9where
10
10
11−import BasicTypes (SourceText)
12import Data.ByteString (ByteString)
11import Data.ByteString (ByteString)
13import Data.Generics
12import Data.Generics
14import Data.Text (Text)
13import Data.Text (Text)
src/Ormolu/Printer/Meat/Common.hs−1
@@ -24,7 +24,6 @@ import Name (nameStableString)
24import OccName (OccName (..))
24import OccName (OccName (..))
25import Ormolu.Printer.Combinators
25import Ormolu.Printer.Combinators
26import Ormolu.Utils
26import Ormolu.Utils
27−import RdrName (RdrName (..))
28
27
29-- | Data and type family style.
28-- | Data and type family style.
30data FamilyStyle
29data FamilyStyle
src/Ormolu/Printer/Meat/Declaration.hs−1
@@ -34,7 +34,6 @@ import Ormolu.Printer.Meat.Declaration.Value
34import Ormolu.Printer.Meat.Declaration.Warning
34import Ormolu.Printer.Meat.Declaration.Warning
35import Ormolu.Printer.Meat.Type
35import Ormolu.Printer.Meat.Type
36import Ormolu.Utils
36import Ormolu.Utils
37−import RdrName (rdrNameOcc)
38
37
39data UserGrouping
38data UserGrouping
40 = -- | Always put newlines where we think they should be
39 = -- | Always put newlines where we think they should be
src/Ormolu/Printer/Meat/Declaration/Class.hs−1
@@ -18,7 +18,6 @@ import Ormolu.Printer.Combinators
18import Ormolu.Printer.Meat.Common
18import Ormolu.Printer.Meat.Common
19import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration
19import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration
20import Ormolu.Printer.Meat.Type
20import Ormolu.Printer.Meat.Type
21−import RdrName (RdrName (..))
22
21
23p_classDecl ::
22p_classDecl ::
24 LHsContext GhcPs ->
23 LHsContext GhcPs ->
src/Ormolu/Printer/Meat/Declaration/Data.hs−2
@@ -15,8 +15,6 @@ import Ormolu.Printer.Combinators
15import Ormolu.Printer.Meat.Common
15import Ormolu.Printer.Meat.Common
16import Ormolu.Printer.Meat.Type
16import Ormolu.Printer.Meat.Type
17import Ormolu.Utils
17import Ormolu.Utils
18−import RdrName (RdrName (..))
19−import SrcLoc (Located)
20
18
21p_dataDecl ::
19p_dataDecl ::
22 -- | Whether to format as data family
20 -- | Whether to format as data family
src/Ormolu/Printer/Meat/Declaration/RoleAnnotation.hs−2
@@ -12,8 +12,6 @@ import CoAxiom
12import GHC
12import GHC
13import Ormolu.Printer.Combinators
13import Ormolu.Printer.Combinators
14import Ormolu.Printer.Meat.Common
14import Ormolu.Printer.Meat.Common
15−import RdrName (RdrName (..))
16−import SrcLoc (Located)
17
15
18p_roleAnnot :: RoleAnnotDecl GhcPs -> R ()
16p_roleAnnot :: RoleAnnotDecl GhcPs -> R ()
19p_roleAnnot = \case
17p_roleAnnot = \case
src/Ormolu/Printer/Meat/Declaration/Type.hs−2
@@ -11,8 +11,6 @@ import GHC
11import Ormolu.Printer.Combinators
11import Ormolu.Printer.Combinators
12import Ormolu.Printer.Meat.Common
12import Ormolu.Printer.Meat.Common
13import Ormolu.Printer.Meat.Type
13import Ormolu.Printer.Meat.Type
14−import RdrName (RdrName (..))
15−import SrcLoc (Located)
16
14
17p_synDecl ::
15p_synDecl ::
18 -- | Type constructor
16 -- | Type constructor
src/Ormolu/Printer/Meat/Declaration/TypeFamily.hs−2
@@ -9,7 +9,6 @@ module Ormolu.Printer.Meat.Declaration.TypeFamily
9 )
9 )
10where
10where
11
11
12−import BasicTypes (LexicalFixity (..))
13import Control.Monad
12import Control.Monad
14import Data.Maybe (isNothing)
13import Data.Maybe (isNothing)
15import GHC
14import GHC
@@ -17,7 +16,6 @@ import Ormolu.Printer.Combinators
17import Ormolu.Printer.Meat.Common
16import Ormolu.Printer.Meat.Common
18import Ormolu.Printer.Meat.Type
17import Ormolu.Printer.Meat.Type
19import Ormolu.Utils
18import Ormolu.Utils
20−import SrcLoc (GenLocated (..), Located)
21
19
22p_famDecl :: FamilyStyle -> FamilyDecl GhcPs -> R ()
20p_famDecl :: FamilyStyle -> FamilyDecl GhcPs -> R ()
23p_famDecl style FamilyDecl {fdTyVars = HsQTvs {..}, ..} = do
21p_famDecl style FamilyDecl {fdTyVars = HsQTvs {..}, ..} = do
src/Ormolu/Printer/Meat/Declaration/Value.hs−2
@@ -35,8 +35,6 @@ import Ormolu.Printer.Meat.Declaration.Signature
35import Ormolu.Printer.Meat.Type
35import Ormolu.Printer.Meat.Type
36import Ormolu.Printer.Operators
36import Ormolu.Printer.Operators
37import Ormolu.Utils
37import Ormolu.Utils
38−import RdrName (RdrName (..), rdrNameOcc)
39−import SrcLoc (combineSrcSpans, isOneLineSpan)
40
38
41-- | Style of a group of equations.
39-- | Style of a group of equations.
42data MatchGroupStyle
40data MatchGroupStyle
src/Ormolu/Printer/Meat/ImportExport.hs−1
@@ -11,7 +11,6 @@ where
11
11
12import Control.Monad
12import Control.Monad
13import GHC
13import GHC
14−import GHC.Hs.ImpExp (IE (..))
15import Ormolu.Printer.Combinators
14import Ormolu.Printer.Combinators
16import Ormolu.Printer.Meat.Common
15import Ormolu.Printer.Meat.Common
17
16
src/Ormolu/Printer/Operators.hs−3
@@ -10,7 +10,6 @@ module Ormolu.Printer.Operators
10 )
10 )
11where
11where
12
12
13−import BasicTypes (Fixity (..), SourceText (NoSourceText), compareFixity, defaultFixity)
14import Data.Function (on)
13import Data.Function (on)
15import Data.List
14import Data.List
16import Data.Maybe (fromMaybe, mapMaybe)
15import Data.Maybe (fromMaybe, mapMaybe)
@@ -18,8 +17,6 @@ import Data.Ord (Down (Down), comparing)
18import GHC
17import GHC
19import OccName (mkVarOcc)
18import OccName (mkVarOcc)
20import Ormolu.Utils (unSrcSpan)
19import Ormolu.Utils (unSrcSpan)
21−import RdrName (mkRdrUnqual)
22−import SrcLoc (combineSrcSpans)
23
20
24-- | Intermediate representation of operator trees. It has two type
21-- | Intermediate representation of operator trees. It has two type
25-- parameters: @ty@ is the type of sub-expressions, while @op@ is the type
22-- parameters: @ty@ is the type of sub-expressions, while @op@ is the type
src/Ormolu/Utils.hs−1
@@ -22,7 +22,6 @@ import Data.Maybe (fromMaybe)
22import Data.Text (Text)
22import Data.Text (Text)
23import qualified Data.Text as T
23import qualified Data.Text as T
24import GHC
24import GHC
25−import GHC.Hs.Doc (HsDocString, unpackHDS)
26import qualified Outputable as GHC
25import qualified Outputable as GHC
27
26
28-- | Combine all source spans from the given list.
27-- | Combine all source spans from the given list.