Skip to content

Commit 1be17d4

Browse files
authored
Separate tactics into its own package (#516)
Move the tactics plugin into a separate package, completely distinct form the hls exe which previously hosted this code. This is the first step towards moving tactics out of hls proper entirely.
1 parent 2533574 commit 1be17d4

13 files changed

+92
-25
lines changed

Diff for: cabal.project

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ packages:
22
./
33
ghcide
44
hls-plugin-api
5+
./plugins/tactics
56

67
source-repository-package
78
type: git

Diff for: haskell-language-server.cabal

+2-22
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ library
8080
executable haskell-language-server
8181
import: agpl, common-deps
8282
main-is: Main.hs
83-
hs-source-dirs: exe plugins/default/src plugins/tactics/src
83+
hs-source-dirs: exe plugins/default/src
8484
other-modules:
8585
Ide.Plugin.Eval
8686
Ide.Plugin.Example
@@ -93,21 +93,6 @@ executable haskell-language-server
9393
Ide.Plugin.Pragmas
9494
Ide.Plugin.Retrie
9595
Ide.Plugin.StylishHaskell
96-
Ide.Plugin.Tactic
97-
Ide.Plugin.Tactic.Auto
98-
Ide.Plugin.Tactic.CodeGen
99-
Ide.Plugin.Tactic.Context
100-
Ide.Plugin.Tactic.Debug
101-
Ide.Plugin.Tactic.GHC
102-
Ide.Plugin.Tactic.Judgements
103-
Ide.Plugin.Tactic.KnownStrategies
104-
Ide.Plugin.Tactic.Machinery
105-
Ide.Plugin.Tactic.Naming
106-
Ide.Plugin.Tactic.Range
107-
Ide.Plugin.Tactic.Tactics
108-
Ide.Plugin.Tactic.Types
109-
Ide.Plugin.Tactic.TestTypes
110-
Ide.TreeTransform
11196

11297
ghc-options:
11398
-threaded -Wall -Wno-name-shadowing -Wredundant-constraints
@@ -135,6 +120,7 @@ executable haskell-language-server
135120
, haskell-language-server
136121
, haskell-lsp ^>=0.22
137122
, hls-plugin-api
123+
, hls-tactics-plugin
138124
, lens
139125
, ormolu ^>=0.1.2
140126
, regex-tdfa
@@ -153,15 +139,9 @@ executable haskell-language-server
153139
, stylish-haskell ^>=0.12
154140
, temporary
155141
, text
156-
, syb
157142
, time
158143
, transformers
159144
, unordered-containers
160-
, ghc-source-gen
161-
, refinery ^>=0.3
162-
, ghc-exactprint
163-
, fingertree
164-
, generic-lens
165145

166146
if flag(agpl)
167147
build-depends: brittany

Diff for: hie.yaml.cbl

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ cradle:
2626
component: "haskell-language-server:exe:haskell-language-server"
2727

2828
- path: "./plugins/tactics/src"
29-
component: "haskell-language-server:exe:haskell-language-server"
29+
component: "lib:hls-tactics-plugin"
3030

3131
- path: "./exe/Wrapper.hs"
3232
component: "haskell-language-server:exe:haskell-language-server-wrapper"

Diff for: hie.yaml.stack

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cradle:
2222
- path: "./plugins/default/src"
2323
component: "haskell-language-server:exe:haskell-language-server"
2424
- path: "./plugins/tactics/src"
25-
component: "haskell-language-server:exe:haskell-language-server"
25+
component: "hls-tactics-plugin:lib:hls-tactics-plugin"
2626

2727
- path: "./exe/Arguments.hs"
2828
component: "haskell-language-server:exe:haskell-language-server"

Diff for: plugins/default/src/Ide/Plugin/ModuleName.hs

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ import Development.IDE.Core.Shake
9494
import Data.Text ( pack )
9595
import System.Directory ( canonicalizePath )
9696
import Data.List
97-
import Ide.Plugin.Tactic.Debug ( unsafeRender )
9897
-- |Plugin descriptor
9998
descriptor :: PluginId -> PluginDescriptor
10099
descriptor plId = (defaultPluginDescriptor plId)

Diff for: plugins/tactics/hls-tactics-plugin.cabal

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
cabal-version: 2.2
2+
category: Development
3+
name: hls-tactics-plugin
4+
version: 0.5.1.0
5+
synopsis: LSP server for GHC
6+
description:
7+
Please see the README on GitHub at <https://github.com/isovector/hls-tactics-plugin#readme>
8+
9+
homepage: https://github.com/isovector/hls-tactics-plugin#readme
10+
bug-reports: https://github.com/isovector/hls-tactics-plugin/issues
11+
author: Sandy Maguire, Reed Mullanix
12+
maintainer: [email protected]
13+
copyright: Sandy Maguire, Reed Mullanix
14+
-- license: Apache-2.0
15+
-- license-file: LICENSE
16+
build-type: Simple
17+
-- extra-source-files:
18+
-- README.md
19+
-- ChangeLog.md
20+
21+
flag pedantic
22+
description: Enable -Werror
23+
default: False
24+
manual: True
25+
26+
source-repository head
27+
type: git
28+
location: https://github.com/isovector/hls-tactics-plugin
29+
30+
library
31+
hs-source-dirs: src
32+
exposed-modules:
33+
Ide.Plugin.Tactic
34+
Ide.Plugin.Tactic.Auto
35+
Ide.Plugin.Tactic.CodeGen
36+
Ide.Plugin.Tactic.Context
37+
Ide.Plugin.Tactic.Debug
38+
Ide.Plugin.Tactic.GHC
39+
Ide.Plugin.Tactic.Judgements
40+
Ide.Plugin.Tactic.KnownStrategies
41+
Ide.Plugin.Tactic.Machinery
42+
Ide.Plugin.Tactic.Naming
43+
Ide.Plugin.Tactic.Range
44+
Ide.Plugin.Tactic.Tactics
45+
Ide.Plugin.Tactic.Types
46+
Ide.Plugin.Tactic.TestTypes
47+
Ide.TreeTransform
48+
49+
ghc-options:
50+
-Wno-name-shadowing -Wredundant-constraints
51+
if flag(pedantic)
52+
ghc-options: -Werror
53+
54+
build-depends:
55+
, aeson
56+
, base >=4.12 && <5
57+
, containers
58+
, directory
59+
, extra
60+
, filepath
61+
, fingertree
62+
, generic-lens
63+
, ghc
64+
, ghc-boot-th
65+
, ghc-exactprint
66+
, ghc-source-gen
67+
, ghcide >=0.1
68+
, haskell-lsp ^>=0.22
69+
, hls-plugin-api
70+
, lens
71+
, mtl
72+
, refinery ^>=0.3
73+
, retrie >=0.1.1.0
74+
, shake >=0.17.5
75+
, syb
76+
, text
77+
, transformers
78+
79+
default-language: Haskell2010
80+

Diff for: stack-8.10.1.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ packages:
44
- .
55
- ./ghcide/
66
- ./hls-plugin-api
7+
- ./plugins/tactics
78

89
ghc-options:
910
"$everything": -haddock

Diff for: stack-8.10.2.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ packages:
44
- .
55
- ./ghcide/
66
- ./hls-plugin-api
7+
- ./plugins/tactics
78

89
ghc-options:
910
"$everything": -haddock

Diff for: stack-8.6.4.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ packages:
55
- .
66
- ./ghcide/
77
- ./hls-plugin-api
8+
- ./plugins/tactics
89

910
ghc-options:
1011
"$everything": -haddock

Diff for: stack-8.6.5.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ packages:
44
- .
55
- ./ghcide/
66
- ./hls-plugin-api
7+
- ./plugins/tactics
78

89
ghc-options:
910
"$everything": -haddock

Diff for: stack-8.8.2.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ packages:
44
- .
55
- ./ghcide/
66
- ./hls-plugin-api
7+
- ./plugins/tactics
78

89
ghc-options:
910
"$everything": -haddock

Diff for: stack-8.8.3.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ packages:
44
- .
55
- ./ghcide/
66
- ./hls-plugin-api
7+
- ./plugins/tactics
78

89
ghc-options:
910
"$everything": -haddock

Diff for: stack-8.8.4.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ packages:
44
- .
55
- ./ghcide/
66
- ./hls-plugin-api
7+
- ./plugins/tactics
78

89
ghc-options:
910
"$everything": -haddock

0 commit comments

Comments
 (0)