Skip to content

Commit

Permalink
Separate tactics into its own package (#516)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
isovector authored Oct 19, 2020
1 parent 2533574 commit 1be17d4
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 25 deletions.
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ packages:
./
ghcide
hls-plugin-api
./plugins/tactics

source-repository-package
type: git
Expand Down
24 changes: 2 additions & 22 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hie.yaml.cbl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion hie.yaml.stack
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion plugins/default/src/Ide/Plugin/ModuleName.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
80 changes: 80 additions & 0 deletions plugins/tactics/hls-tactics-plugin.cabal
Original file line number Diff line number Diff line change
@@ -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: [email protected]
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

1 change: 1 addition & 0 deletions stack-8.10.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics

ghc-options:
"$everything": -haddock
Expand Down
1 change: 1 addition & 0 deletions stack-8.10.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics

ghc-options:
"$everything": -haddock
Expand Down
1 change: 1 addition & 0 deletions stack-8.6.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics

ghc-options:
"$everything": -haddock
Expand Down
1 change: 1 addition & 0 deletions stack-8.6.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics

ghc-options:
"$everything": -haddock
Expand Down
1 change: 1 addition & 0 deletions stack-8.8.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics

ghc-options:
"$everything": -haddock
Expand Down
1 change: 1 addition & 0 deletions stack-8.8.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics

ghc-options:
"$everything": -haddock
Expand Down
1 change: 1 addition & 0 deletions stack-8.8.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ packages:
- .
- ./ghcide/
- ./hls-plugin-api
- ./plugins/tactics

ghc-options:
"$everything": -haddock
Expand Down

0 comments on commit 1be17d4

Please sign in to comment.