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 Sep 15, 2020
1 parent 34eff96 commit 297058e
Show file tree
Hide file tree
Showing 3 changed files with 582 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 @@ -17,6 +17,7 @@ import Ide.Plugin.GhcIde as GhcIde
import Ide.Plugin.Floskell as Floskell
import Ide.Plugin.Fourmolu as Fourmolu
import Ide.Plugin.ImportLens as ImportLens
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 @@ -49,10 +50,11 @@ idePlugins includeExamples = pluginDescToIdePlugins allPlugins
, StylishHaskell.descriptor "stylish-haskell"
, Retrie.descriptor "retrie"
#if AGPL
, Brittany.descriptor "brittany"
, Brittany.descriptor "brittany"
#endif
, Eval.descriptor "eval"
, ImportLens.descriptor "importLens"
, Hlint.descriptor "hlint"
]
examplePlugins =
[Example.descriptor "eg"
Expand Down
47 changes: 47 additions & 0 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,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, common-deps
main-is: Main.hs
Expand Down
Loading

0 comments on commit 297058e

Please sign in to comment.