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.
This commit is contained in:
Sandy Maguire 2020-10-19 11:44:58 -07:00 committed by GitHub
parent 2533574a7f
commit 1be17d4b9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 92 additions and 25 deletions

View File

@ -2,6 +2,7 @@ packages:
./
ghcide
hls-plugin-api
./plugins/tactics
source-repository-package
type: git

View File

@ -80,7 +80,7 @@ library
executable haskell-language-server
import: agpl, common-deps
main-is: Main.hs
hs-source-dirs: exe plugins/default/src plugins/tactics/src
hs-source-dirs: exe plugins/default/src
other-modules:
Ide.Plugin.Eval
Ide.Plugin.Example
@ -93,21 +93,6 @@ executable haskell-language-server
Ide.Plugin.Pragmas
Ide.Plugin.Retrie
Ide.Plugin.StylishHaskell
Ide.Plugin.Tactic
Ide.Plugin.Tactic.Auto
Ide.Plugin.Tactic.CodeGen
Ide.Plugin.Tactic.Context
Ide.Plugin.Tactic.Debug
Ide.Plugin.Tactic.GHC
Ide.Plugin.Tactic.Judgements
Ide.Plugin.Tactic.KnownStrategies
Ide.Plugin.Tactic.Machinery
Ide.Plugin.Tactic.Naming
Ide.Plugin.Tactic.Range
Ide.Plugin.Tactic.Tactics
Ide.Plugin.Tactic.Types
Ide.Plugin.Tactic.TestTypes
Ide.TreeTransform
ghc-options:
-threaded -Wall -Wno-name-shadowing -Wredundant-constraints
@ -135,6 +120,7 @@ executable haskell-language-server
, haskell-language-server
, haskell-lsp ^>=0.22
, hls-plugin-api
, hls-tactics-plugin
, lens
, ormolu ^>=0.1.2
, regex-tdfa
@ -153,15 +139,9 @@ executable haskell-language-server
, stylish-haskell ^>=0.12
, temporary
, text
, syb
, time
, transformers
, unordered-containers
, ghc-source-gen
, refinery ^>=0.3
, ghc-exactprint
, fingertree
, generic-lens
if flag(agpl)
build-depends: brittany

View File

@ -26,7 +26,7 @@ cradle:
component: "haskell-language-server:exe:haskell-language-server"
- path: "./plugins/tactics/src"
component: "haskell-language-server:exe:haskell-language-server"
component: "lib:hls-tactics-plugin"
- path: "./exe/Wrapper.hs"
component: "haskell-language-server:exe:haskell-language-server-wrapper"

View File

@ -22,7 +22,7 @@ cradle:
- path: "./plugins/default/src"
component: "haskell-language-server:exe:haskell-language-server"
- path: "./plugins/tactics/src"
component: "haskell-language-server:exe:haskell-language-server"
component: "hls-tactics-plugin:lib:hls-tactics-plugin"
- path: "./exe/Arguments.hs"
component: "haskell-language-server:exe:haskell-language-server"

View File

@ -94,7 +94,6 @@ import Development.IDE.Core.Shake
import Data.Text ( pack )
import System.Directory ( canonicalizePath )
import Data.List
import Ide.Plugin.Tactic.Debug ( unsafeRender )
-- |Plugin descriptor
descriptor :: PluginId -> PluginDescriptor
descriptor plId = (defaultPluginDescriptor plId)

View File

@ -0,0 +1,80 @@
cabal-version: 2.2
category: Development
name: hls-tactics-plugin
version: 0.5.1.0
synopsis: LSP server for GHC
description:
Please see the README on GitHub at <https://github.com/isovector/hls-tactics-plugin#readme>
homepage: https://github.com/isovector/hls-tactics-plugin#readme
bug-reports: https://github.com/isovector/hls-tactics-plugin/issues
author: Sandy Maguire, Reed Mullanix
maintainer: sandy@sandymaguire.me
copyright: Sandy Maguire, Reed Mullanix
-- license: Apache-2.0
-- license-file: LICENSE
build-type: Simple
-- extra-source-files:
-- README.md
-- ChangeLog.md
flag pedantic
description: Enable -Werror
default: False
manual: True
source-repository head
type: git
location: https://github.com/isovector/hls-tactics-plugin
library
hs-source-dirs: src
exposed-modules:
Ide.Plugin.Tactic
Ide.Plugin.Tactic.Auto
Ide.Plugin.Tactic.CodeGen
Ide.Plugin.Tactic.Context
Ide.Plugin.Tactic.Debug
Ide.Plugin.Tactic.GHC
Ide.Plugin.Tactic.Judgements
Ide.Plugin.Tactic.KnownStrategies
Ide.Plugin.Tactic.Machinery
Ide.Plugin.Tactic.Naming
Ide.Plugin.Tactic.Range
Ide.Plugin.Tactic.Tactics
Ide.Plugin.Tactic.Types
Ide.Plugin.Tactic.TestTypes
Ide.TreeTransform
ghc-options:
-Wno-name-shadowing -Wredundant-constraints
if flag(pedantic)
ghc-options: -Werror
build-depends:
, aeson
, base >=4.12 && <5
, containers
, directory
, extra
, filepath
, fingertree
, generic-lens
, ghc
, ghc-boot-th
, ghc-exactprint
, ghc-source-gen
, ghcide >=0.1
, haskell-lsp ^>=0.22
, hls-plugin-api
, lens
, mtl
, refinery ^>=0.3
, retrie >=0.1.1.0
, shake >=0.17.5
, syb
, text
, transformers
default-language: Haskell2010

View File

@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics
ghc-options:
"$everything": -haddock

View File

@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics
ghc-options:
"$everything": -haddock

View File

@ -5,6 +5,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics
ghc-options:
"$everything": -haddock

View File

@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics
ghc-options:
"$everything": -haddock

View File

@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics
ghc-options:
"$everything": -haddock

View File

@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics
ghc-options:
"$everything": -haddock

View File

@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics
ghc-options:
"$everything": -haddock