Skip to content

Commit

Permalink
WIP on integrating hlint using DAML approach
Browse files Browse the repository at this point in the history
But getting a mismatch on ghc-lib vs GHC types for the call to hlint.

Closes #32
  • Loading branch information
alanz authored and jneira committed Aug 2, 2020
1 parent 6c7b43a commit 68781ca
Show file tree
Hide file tree
Showing 3 changed files with 583 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import Ide.Plugin.Example as Example
import Ide.Plugin.Example2 as Example2
import Ide.Plugin.GhcIde as GhcIde
import Ide.Plugin.Floskell as Floskell
import Ide.Plugin.Hlint as Hlint
import Ide.Plugin.Ormolu as Ormolu
import Ide.Plugin.StylishHaskell as StylishHaskell
#if AGPL
Expand Down Expand Up @@ -106,9 +107,10 @@ idePlugins includeExamples = pluginDescToIdePlugins allPlugins
, Ormolu.descriptor "ormolu"
, StylishHaskell.descriptor "stylish-haskell"
#if AGPL
, Brittany.descriptor "brittany"
, Brittany.descriptor "brittany"
#endif
, Eval.descriptor "eval"
, Hlint.descriptor "hlint"
]
examplePlugins =
[Example.descriptor "eg"
Expand Down
48 changes: 48 additions & 0 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,53 @@ library

default-language: Haskell2010

flag ghc-lib
default: False
manual: True
description: Force dependency on ghc-lib-parser even if GHC API in the ghc package is supported

library hls-ghc-lib
exposed-modules:
Ide.Plugin.Hlint
hs-source-dirs:
src
build-depends:
base
, aeson
, binary
, bytestring
, containers
, data-default
, deepseq
, directory
, extra
, filepath
, ghcide
, hashable
, haskell-lsp
, haskell-src-exts
, hlint >= 3.0
, regex-tdfa
, shake
, text
, transformers
, unordered-containers
if !flag(ghc-lib) && impl(ghc >= 8.10.1) && impl(ghc < 8.11.0)
build-depends:
ghc == 8.10.*
else
build-depends:
ghc-lib == 8.10.*

ghc-options:
-Wall
-Wredundant-constraints
-Wno-name-shadowing
if flag(pedantic)
ghc-options: -Werror

default-language: Haskell2010

executable haskell-language-server
import: agpl
main-is: Main.hs
Expand Down Expand Up @@ -150,6 +197,7 @@ executable haskell-language-server
, haskell-lsp
, hie-bios
, haskell-language-server
, hls-ghc-lib
, hslogger
, optparse-applicative
, safe-exceptions
Expand Down
Loading

0 comments on commit 68781ca

Please sign in to comment.