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 8, 2020
1 parent d74d111 commit 37398d3
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 @@ -68,6 +68,7 @@ import Ide.Plugin.Example2 as Example2
import Ide.Plugin.GhcIde as GhcIde
import Ide.Plugin.Floskell as Floskell
import Ide.Plugin.Fourmolu as Fourmolu
import Ide.Plugin.Hlint as Hlint
import Ide.Plugin.Ormolu as Ormolu
import Ide.Plugin.StylishHaskell as StylishHaskell
import Ide.Plugin.Retrie as Retrie
Expand Down Expand Up @@ -110,9 +111,10 @@ idePlugins includeExamples = pluginDescToIdePlugins allPlugins
, StylishHaskell.descriptor "stylish-haskell"
, Retrie.descriptor "retrie"
#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 @@ -117,6 +117,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 @@ -158,6 +205,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 37398d3

Please sign in to comment.