Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion plugins/hls-module-name-plugin/hls-module-name-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ source-repository head
type: git
location: https://github.com/haskell/haskell-language-server.git

common warnings
ghc-options: -Wall -Wunused-packages

library
import: warnings
exposed-modules: Ide.Plugin.ModuleName
hs-source-dirs: src
build-depends:
Expand All @@ -37,11 +41,11 @@ library
, lsp
, text
, transformers
, unordered-containers

default-language: Haskell2010

test-suite tests
import: warnings
type: exitcode-stdio-1.0
default-language: Haskell2010
hs-source-dirs: test
Expand Down
3 changes: 1 addition & 2 deletions plugins/hls-module-name-plugin/src/Ide/Plugin/ModuleName.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}

{-# OPTIONS_GHC -Wall -Wwarn -fno-warn-type-defaults #-}
Expand Down Expand Up @@ -133,7 +132,7 @@ action recorder state uri = do
| emptyModule ->
let code = "module " <> bestName <> " where\n"
in pure [Replace uri (Range (Position 0 0) (Position 0 0)) code code]
_ -> pure $ []
_ -> pure []

-- | Possible module names, as derived by the position of the module in the
-- source directories. There may be more than one possible name, if the source
Expand Down
1 change: 0 additions & 1 deletion plugins/hls-module-name-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ tests =
let edit = TextEdit (mkRange 1 0 1 0) "f ="
_ <- applyEdit doc edit
newLens <- getCodeLenses doc
txt <- documentContents doc
liftIO $ newLens @?= oldLens
closeDoc doc
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source-repository head
location: https://github.com/haskell/haskell-language-server

common warnings
ghc-options: -Wall
ghc-options: -Wall -Wunused-packages

library
import: warnings
Expand All @@ -35,8 +35,6 @@ library
, text
, syb
, transformers
, ghc-boot-th
, unordered-containers
, containers
, deepseq
hs-source-dirs: src
Expand All @@ -51,13 +49,7 @@ test-suite tests
build-depends:
, base
, filepath
, ghcide
, text
, hls-overloaded-record-dot-plugin
, hls-plugin-api
, lens
, lsp-test
, lsp-types
, row-types
, hls-test-utils

Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ import Development.IDE.Core.RuleTypes (TcModuleResult (..),
import Development.IDE.Core.Shake (define, useWithStale)
import qualified Development.IDE.Core.Shake as Shake

#if __GLASGOW_HASKELL__ >= 903
import Development.IDE.GHC.Compat (HsExpr (HsRecSel))
#else
import Development.IDE.GHC.Compat (HsExpr (HsRecFld))
#endif

import Control.DeepSeq (rwhnf)
import Development.IDE.Core.PluginUtils
Expand All @@ -49,7 +44,13 @@ import Development.IDE.Core.PositionMapping (PositionMapping,
import Development.IDE.GHC.Compat (Extension (OverloadedRecordDot),
GhcPass,
HsExpansion (HsExpanded),
HsExpr (HsApp, HsVar, OpApp, XExpr),
HsExpr (HsApp, HsVar, OpApp, XExpr,
#if __GLASGOW_HASKELL__ >= 903
HsRecSel
#else
HsRecFld
#endif
),
LHsExpr, Outputable,
Pass (..), appPrec,
dollarName, getLoc,
Expand Down