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 Oct 19, 2020
1 parent 438f699 commit 7822a5a
Show file tree
Hide file tree
Showing 3 changed files with 583 additions and 1 deletion.
5 changes: 4 additions & 1 deletion exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Ide.Main (defaultMain)
import Ide.Types (IdePlugins)

-- haskell-language-server plugins

import Ide.Plugin.Eval as Eval
import Ide.Plugin.Example as Example
import Ide.Plugin.Example2 as Example2
Expand All @@ -22,6 +23,7 @@ import Ide.Plugin.Ormolu as Ormolu
import Ide.Plugin.Retrie as Retrie
import Ide.Plugin.StylishHaskell as StylishHaskell
import Ide.Plugin.Tactic as Tactic
import Ide.Plugin.Hlint as Hlint
#if AGPL
import Ide.Plugin.Brittany as Brittany
#endif
Expand Down Expand Up @@ -55,11 +57,12 @@ 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"
, ModuleName.descriptor "moduleName"
, 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 7822a5a

Please sign in to comment.