Skip to content

Commit e334dc3

Browse files
jneirafendor
authored andcommitted
Rebase cleanup
1 parent c6862f4 commit e334dc3

File tree

12 files changed

+6
-154
lines changed

12 files changed

+6
-154
lines changed

ghcide/ghcide.cabal

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ library
4848
dependent-map,
4949
dependent-sum,
5050
dlist,
51+
-- we can't use >= 1.7.10 while we have to use hlint == 3.2.*
5152
extra >= 1.7.4 && < 1.7.10,
5253
fuzzy,
5354
filepath,
@@ -109,22 +110,6 @@ library
109110
build-depends:
110111
unix
111112

112-
if impl(ghc < 8.10.5)
113-
build-depends:
114-
ghc-api-compat ==8.6
115-
elif impl(ghc == 8.10.5)
116-
build-depends:
117-
ghc-api-compat ==8.10.5
118-
elif impl(ghc == 8.10.6)
119-
build-depends:
120-
ghc-api-compat ==8.10.6
121-
elif impl(ghc == 8.10.7)
122-
build-depends:
123-
ghc-api-compat ==8.10.7
124-
elif impl(ghc == 9.0.1)
125-
build-depends:
126-
ghc-api-compat ==9.0.1
127-
128113
default-extensions:
129114
ApplicativeDo
130115
BangPatterns

ghcide/src/Development/IDE/Plugin/CodeAction.hs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,14 +1287,8 @@ newImportToEdit (unNewImport -> imp) ps fileContents
12871287
newImportInsertRange :: ParsedSource -> T.Text -> Maybe (Range, Int)
12881288
newImportInsertRange (L _ HsModule {..}) fileContents
12891289
| Just (uncurry Position -> insertPos, col) <- case hsmodImports of
1290-
[] -> case getLoc (head hsmodDecls) of
1291-
RealSrcSpan s _ -> let col = srcLocCol (realSrcSpanStart s) - 1
1292-
in Just ((srcLocLine (realSrcSpanStart s) - 1, col), col)
1293-
_ -> Nothing
1294-
_ -> case getLoc (last hsmodImports) of
1295-
RealSrcSpan s _ -> let col = srcLocCol (realSrcSpanStart s) - 1
1296-
in Just ((srcLocLine $ realSrcSpanEnd s,col), col)
1297-
_ -> Nothing
1290+
[] -> findPositionNoImports hsmodName hsmodExports fileContents
1291+
_ -> findPositionFromImportsOrModuleDecl hsmodImports last True
12981292
= Just (Range insertPos insertPos, col)
12991293
| otherwise = Nothing
13001294

@@ -1308,7 +1302,7 @@ findPositionNoImports (Just hsmodName) _ _ = findPositionFromImportsOrModuleDecl
13081302

13091303
findPositionFromImportsOrModuleDecl :: HasSrcSpan a => t -> (t -> a) -> Bool -> Maybe ((Int, Int), Int)
13101304
findPositionFromImportsOrModuleDecl hsField f hasImports = case getLoc (f hsField) of
1311-
OldRealSrcSpan s ->
1305+
RealSrcSpan s _ ->
13121306
let col = calcCol s
13131307
in Just ((srcLocLine (realSrcSpanEnd s), col), col)
13141308
_ -> Nothing

haskell-language-server.cabal

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -360,22 +360,6 @@ executable haskell-language-server
360360
, transformers
361361
, unordered-containers
362362

363-
if impl(ghc < 8.10.5)
364-
build-depends:
365-
ghc-api-compat ==8.6
366-
elif impl(ghc == 8.10.5)
367-
build-depends:
368-
ghc-api-compat ==8.10.5
369-
elif impl(ghc == 8.10.6)
370-
build-depends:
371-
ghc-api-compat ==8.10.6
372-
elif impl(ghc == 8.10.7)
373-
build-depends:
374-
ghc-api-compat ==8.10.7
375-
elif impl(ghc == 9.0.1)
376-
build-depends:
377-
ghc-api-compat ==9.0.1
378-
379363
default-language: Haskell2010
380364
default-extensions: DataKinds, TypeOperators
381365

hls-plugin-api/hls-plugin-api.cabal

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,6 @@ library
5656
, text
5757
, unordered-containers
5858

59-
if impl(ghc < 8.10.5)
60-
build-depends:
61-
ghc-api-compat ==8.6
62-
elif impl(ghc == 8.10.5)
63-
build-depends:
64-
ghc-api-compat ==8.10.5
65-
elif impl(ghc == 8.10.6)
66-
build-depends:
67-
ghc-api-compat ==8.10.6
68-
elif impl(ghc == 8.10.7)
69-
build-depends:
70-
ghc-api-compat ==8.10.7
71-
elif impl(ghc == 9.0.1)
72-
build-depends:
73-
ghc-api-compat ==9.0.1
74-
7559
if os(windows)
7660
build-depends: Win32
7761

plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,6 @@ library
4242
default-language: Haskell2010
4343
default-extensions: DataKinds
4444

45-
if impl(ghc < 8.10.5)
46-
build-depends:
47-
ghc-api-compat ==8.6
48-
elif impl(ghc == 8.10.5)
49-
build-depends:
50-
ghc-api-compat ==8.10.5
51-
elif impl(ghc == 8.10.6)
52-
build-depends:
53-
ghc-api-compat ==8.10.6
54-
elif impl(ghc == 8.10.7)
55-
build-depends:
56-
ghc-api-compat ==8.10.7
57-
elif impl(ghc == 9.0.1)
58-
build-depends:
59-
ghc-api-compat ==9.0.1
60-
6145
test-suite tests
6246
type: exitcode-stdio-1.0
6347
default-language: Haskell2010

plugins/hls-class-plugin/hls-class-plugin.cabal

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ library
3636
, text
3737
, transformers
3838

39-
if impl(ghc < 8.10.5)
40-
build-depends:
41-
ghc-api-compat ==8.6
42-
elif impl(ghc == 8.10.5)
43-
build-depends:
44-
ghc-api-compat ==8.10.5
45-
elif impl(ghc == 8.10.6)
46-
build-depends:
47-
ghc-api-compat ==8.10.6
48-
elif impl(ghc == 8.10.7)
49-
build-depends:
50-
ghc-api-compat ==8.10.7
51-
elif impl(ghc == 9.0.1)
52-
build-depends:
53-
ghc-api-compat ==9.0.1
54-
5539
default-language: Haskell2010
5640
default-extensions:
5741
DataKinds

plugins/hls-eval-plugin/hls-eval-plugin.cabal

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,6 @@ library
8282
, unliftio
8383
, unordered-containers
8484

85-
if impl(ghc < 8.10.5)
86-
build-depends:
87-
ghc-api-compat ==8.6
88-
elif impl(ghc == 8.10.5)
89-
build-depends:
90-
ghc-api-compat ==8.10.5
91-
elif impl(ghc == 8.10.6)
92-
build-depends:
93-
ghc-api-compat ==8.10.6
94-
elif impl(ghc == 8.10.7)
95-
build-depends:
96-
ghc-api-compat ==8.10.7
97-
elif impl(ghc == 9.0.1)
98-
build-depends:
99-
ghc-api-compat ==9.0.1
100-
10185
ghc-options:
10286
-Wall -Wno-name-shadowing -Wno-unticked-promoted-constructors
10387

plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,6 @@ library
2828
, text
2929
, unordered-containers
3030

31-
if impl(ghc < 8.10.5)
32-
build-depends:
33-
ghc-api-compat ==8.6
34-
elif impl(ghc == 8.10.5)
35-
build-depends:
36-
ghc-api-compat ==8.10.5
37-
elif impl(ghc == 8.10.6)
38-
build-depends:
39-
ghc-api-compat ==8.10.6
40-
elif impl(ghc == 8.10.7)
41-
build-depends:
42-
ghc-api-compat ==8.10.7
43-
elif impl(ghc == 9.0.1)
44-
build-depends:
45-
ghc-api-compat ==9.0.1
46-
4731
default-language: Haskell2010
4832
default-extensions:
4933
DataKinds

plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,6 @@ library
3333

3434
default-language: Haskell2010
3535

36-
if impl(ghc < 8.10.5)
37-
build-depends:
38-
ghc-api-compat ==8.6
39-
elif impl(ghc == 8.10.5)
40-
build-depends:
41-
ghc-api-compat ==8.10.5
42-
elif impl(ghc == 8.10.6)
43-
build-depends:
44-
ghc-api-compat ==8.10.6
45-
elif impl(ghc == 8.10.7)
46-
build-depends:
47-
ghc-api-compat ==8.10.7
48-
elif impl(ghc == 9.0.1)
49-
build-depends:
50-
ghc-api-compat ==9.0.1
51-
5236
test-suite tests
5337
type: exitcode-stdio-1.0
5438
default-language: Haskell2010

plugins/hls-retrie-plugin/hls-retrie-plugin.cabal

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,6 @@ library
3434
, transformers
3535
, unordered-containers
3636

37-
if impl(ghc < 8.10.5)
38-
build-depends:
39-
ghc-api-compat ==8.6
40-
elif impl(ghc == 8.10.5)
41-
build-depends:
42-
ghc-api-compat ==8.10.5
43-
elif impl(ghc == 8.10.6)
44-
build-depends:
45-
ghc-api-compat ==8.10.6
46-
elif impl(ghc == 8.10.7)
47-
build-depends:
48-
ghc-api-compat ==8.10.7
49-
elif impl(ghc == 9.0.1)
50-
build-depends:
51-
ghc-api-compat ==9.0.1
52-
5337
default-language: Haskell2010
5438
default-extensions:
5539
DataKinds

0 commit comments

Comments
 (0)