on master help sign in
Delete unused deps (#1856)

* Delete unused package dependencies * Eliminate the use of pretty * Don't export some things that weren't necessary * Add a missing dependency * Avoid reexporting files of interest methods * Put toIdeResult back

commit6f79fd13920e924fb68f7cf1ac768b8a55fea19d authorNeil Mitchell <35463327+neil-da@users.noreply.github.com> dateTue 25 Jun 2019, 10:09 (7 years ago) parente686887
8 files changed+4−22
BUILD.bazel−6 hie-core.cabal+1−7 src/Development/IDE/Core/Service.hs−1 src/Development/IDE/Core/Shake.hs+1−2 src/Development/IDE/GHC/Error.hs−1 src/Development/IDE/LSP/LanguageServer.hs+1 src/Development/IDE/Types/Diagnostics.hs−5 test/Demo.hs+1
BUILD.bazel−6
@@ -14,7 +14,6 @@ depends = [
1414 "data-default",
1515 "deepseq",
1616 "directory",
17− "either",
1817 "extra",
1918 "filepath",
2019 "hashable",
@@ -22,11 +21,9 @@ depends = [
2221 "haskell-lsp-types",
2322 "mtl",
2423 "network-uri",
25− "pretty",
2624 "prettyprinter",
2725 "prettyprinter-ansi-terminal",
2826 "rope-utf16-splay",
29− "safe-exceptions",
3027 "sorted-list",
3128 "shake",
3229 "stm",
@@ -34,10 +31,8 @@ depends = [
3431 "text",
3532 "time",
3633 "transformers",
37− "uniplate",
3834 "unordered-containers",
3935 "utf8-string",
40− "uri-encode",
4136]
4237
4338da_haskell_library(
@@ -78,7 +73,6 @@ da_haskell_binary(
7873 "containers",
7974 "directory",
8075 "extra",
81− "filepath",
8276 "ghc-paths",
8377 "ghc",
8478 "haskell-lsp",
hie-core.cabal+1−7
@@ -30,7 +30,6 @@ library
3030 data-default,
3131 deepseq,
3232 directory,
33− either,
3433 extra,
3534 filepath,
3635 ghc,
@@ -41,10 +40,8 @@ library
4140 haskell-lsp-types,
4241 mtl,
4342 network-uri,
44− pretty,
4543 prettyprinter-ansi-terminal,
4644 rope-utf16-splay,
47− safe-exceptions,
4845 shake,
4946 sorted-list,
5047 stm,
@@ -54,10 +51,8 @@ library
5451 prettyprinter,
5552 prettyprinter-ansi-terminal,
5653 transformers,
57− uniplate,
5854 unordered-containers,
59− utf8-string,
60− uri-encode
55+ utf8-string
6156
6257 cpp-options: -DGHC_STABLE
6358 default-extensions:
@@ -111,7 +106,6 @@ executable hie-core
111106 ghc-options: -main-is Demo.main
112107 build-depends:
113108 base == 4.*,
114− filepath,
115109 containers,
116110 directory,
117111 hie-bios,
src/Development/IDE/Core/Service.hs−1
@@ -13,7 +13,6 @@ module Development.IDE.Core.Service(
1313 IdeState, initialise, shutdown,
1414 runAction, runActions,
1515 runActionSync, runActionsSync,
16− getFilesOfInterest, setFilesOfInterest, modifyFilesOfInterest,
1716 writeProfile,
1817 getDiagnostics, unsafeClearDiagnostics,
1918 ideLogger
src/Development/IDE/Core/Shake.hs+1−2
@@ -38,8 +38,7 @@ module Development.IDE.Core.Shake(
3838 setPriority,
3939 sendEvent,
4040 ideLogger,
41− FileVersion(..),
42− vfsVersion
41+ FileVersion(..)
4342 ) where
4443
4544import Development.Shake
src/Development/IDE/GHC/Error.hs−1
@@ -15,7 +15,6 @@ module Development.IDE.GHC.Error
1515 , srcSpanToFilename
1616 , zeroSpan
1717 , realSpan
18− , noSpan
1918 ) where
2019
2120import Development.IDE.Types.Diagnostics as D
src/Development/IDE/LSP/LanguageServer.hs+1
@@ -27,6 +27,7 @@ import qualified Data.Set as S
2727import qualified Data.Text as T
2828
2929import Development.IDE.Core.FileStore
30+import Development.IDE.Core.OfInterest
3031
3132import qualified Network.URI as URI
3233
src/Development/IDE/Types/Diagnostics.hs−5
@@ -10,7 +10,6 @@ module Development.IDE.Types.Diagnostics (
1010 DiagnosticStore,
1111 List(..),
1212 ideErrorText,
13− ideErrorPretty,
1413 showDiagnostics,
1514 showDiagnosticsColored,
1615 ) where
@@ -18,7 +17,6 @@ module Development.IDE.Types.Diagnostics (
1817import Data.Maybe as Maybe
1918import qualified Data.Text as T
2019import Data.Text.Prettyprint.Doc
21−import qualified Text.PrettyPrint.Annotated.HughesPJClass as Pretty
2220import qualified Language.Haskell.LSP.Types as LSP
2321import Language.Haskell.LSP.Types as LSP (
2422 DiagnosticSeverity(..)
@@ -43,9 +41,6 @@ ideErrorText fp msg = (fp, LSP.Diagnostic {
4341 _relatedInformation = Nothing
4442 })
4543
46−ideErrorPretty :: Pretty.Pretty e => NormalizedFilePath -> e -> FileDiagnostic
47−ideErrorPretty fp = ideErrorText fp . T.pack . Pretty.prettyShow
48−
4944
5045-- | Human readable diagnostics for a specific file.
5146--
test/Demo.hs+1
@@ -8,6 +8,7 @@ import Control.Concurrent.Extra
88import Control.Monad
99import System.Time.Extra
1010import Development.IDE.Core.FileStore
11+import Development.IDE.Core.OfInterest
1112import Development.IDE.Core.Service
1213import Development.IDE.Core.Rules
1314import Development.IDE.Core.Shake