Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ defaults: &defaults

version: 2
jobs:
stackage-lts22:
stackage-lts24:
docker:
- image: haskell:9.6.7-slim-bullseye
- image: haskell:9.10.3-slim-bullseye
environment:
- STACK_FILE: "stack-lts22.yaml"
- STACK_FILE: "stack-lts24.yaml"
<<: *defaults

stackage-lts23:
Expand All @@ -76,5 +76,5 @@ workflows:
version: 2
multiple-ghcs:
jobs:
- stackage-lts22
- stackage-lts24
- stackage-lts23
5 changes: 4 additions & 1 deletion plugins/hls-class-plugin/src/Ide/Plugin/Class/ExactPrint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module Ide.Plugin.Class.ExactPrint where

import Control.Monad.Trans.Maybe
import Data.Either.Extra (eitherToMaybe)
import Data.Functor.Identity (Identity)
import qualified Data.Text as T
import Development.IDE.GHC.Compat
import GHC.Parser.Annotation
Expand All @@ -20,6 +19,10 @@ import Language.LSP.Protocol.Types (Range)
import Control.Lens (_head, over)
#endif

#if !MIN_VERSION_ghc_exactprint(1,10,0)
import Data.Functor.Identity (Identity)
#endif
Comment thread
fendor marked this conversation as resolved.

makeEditText :: Monad m => ParsedModule -> DynFlags -> AddMinimalMethodsParams -> MaybeT m (T.Text, T.Text)
makeEditText pm df AddMinimalMethodsParams{..} = do
mDecls <- MaybeT . pure $ traverse (makeMethodDecl df) methodGroup
Expand Down
11 changes: 5 additions & 6 deletions plugins/hls-notes-plugin/src/Ide/Plugin/Notes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import Control.Monad.Except (ExceptT, MonadError,
throwError)
import Control.Monad.IO.Class (liftIO)
import qualified Data.Array as A
import Data.Foldable (foldl')
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import Data.List (uncons)
import Data.List as List
import Data.Maybe (catMaybes, fromMaybe,
listToMaybe, mapMaybe)
import Data.Text (Text, intercalate)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Utf16.Rope.Mixed as Rope
import Data.Traversable (for)
Expand Down Expand Up @@ -67,7 +66,7 @@ instance Pretty Log where
LogNoteReferencesFound file refs -> "Found note references in " <> prettyNotes file refs
LogNotesFound file notes -> "Found notes in " <> prettyNotes file notes
where prettyNotes file hm = pretty (show file) <> ": ["
<> pretty (intercalate ", " (fmap (\(s, p) -> "\"" <> s <> "\" at " <> intercalate ", " (map (T.pack . show) p)) hm)) <> "]"
<> pretty (T.intercalate ", " (fmap (\(s, p) -> "\"" <> s <> "\" at " <> T.intercalate ", " (map (T.pack . show) p)) hm)) <> "]"

{-
The first time the user requests a jump-to-definition on a note reference, the
Expand Down Expand Up @@ -100,7 +99,7 @@ findNotesRules recorder = do
references <- fmap snd <$> use MkGetNotesInFile nfp
pure $ fmap (HM.map (fmap (nfp,))) references
)
pure $ Just $ foldl' (HM.unionWith (<>)) HM.empty definedReferences
pure $ Just $ List.foldl' (HM.unionWith (<>)) HM.empty definedReferences

err :: MonadError PluginError m => Text -> Maybe a -> m a
err s = maybe (throwError $ PluginInternalError s) pure
Expand Down Expand Up @@ -175,7 +174,7 @@ findNotesInFile file recorder = do
let refMatches = (A.! 1) <$> matchAllText noteRefRegex content
refs = toPositions refMatches content
logWith recorder Debug $ LogNoteReferencesFound file (HM.toList refs)
pure $ Just (HM.mapMaybe (fmap fst . uncons) notes, refs)
pure $ Just (HM.mapMaybe (fmap fst . List.uncons) notes, refs)
where
uint = fromIntegral . toInteger
-- the regex library returns the character index of the match. However
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ import Ide.PluginUtils
import Ide.Types hiding (Config)
import Language.Haskell.Stylish
import Language.LSP.Protocol.Types as LSP
import System.Directory
import System.FilePath

#if !MIN_VERSION_stylish_haskell(0,15,0)
import System.Directory
#endif
Comment thread
fendor marked this conversation as resolved.

data Log
= LogLanguageExtensionFromDynFlags

Expand Down
35 changes: 17 additions & 18 deletions stack-lts22.yaml → stack-lts24.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-22.44 # ghc-9.6.7
resolver: lts-24.33 # ghc-9.10.3

packages:
- .
Expand All @@ -12,39 +12,38 @@ ghc-options:

allow-newer: true
allow-newer-deps:
- extensions
- hw-fingertree
- retrie
# stan dependencies
- directory-ospath-streaming

extra-deps:
- extra-1.8.1
- Diff-0.5
- hiedb-0.8.0.0
- hie-bios-0.18.0
- hie-compat-0.3.1.2
- implicit-hie-0.1.4.0
- hie-bios-0.18.0
- hw-fingertree-0.1.2.1
- monad-dijkstra-0.1.1.5
- retrie-1.2.3
- unordered-containers-0.2.21
- lsp-2.8.0.0
- lsp-test-0.18.0.0
- lsp-types-2.4.0.0
- websockets-0.13.0.0@sha256:9b3680ba5055e0b34ab29c341b21d70084bf067519fc059af0e597cd90a4a05a,7567
- monad-dijkstra-0.1.1.4 # 5
- retrie-1.2.3
- unordered-containers-0.2.21

# stan and friends
# stan dependencies not found in the stackage snapshot
- stan-0.2.1.0
- dir-traverse-0.2.3.0
- extensions-0.1.0.1
- tomland-1.3.3.2
- extensions-0.1.1.0
- trial-0.0.0.0
- trial-optparse-applicative-0.0.0.0
- trial-tomland-0.0.0.0
- validation-selective-0.2.0.0
- cabal-add-0.2
- cabal-install-parsers-0.6.1.1
- directory-ospath-streaming-0.2.2


- cabal-add-0.2
- fourmolu-0.19.0.1
- ormolu-0.8.0.2
- Cabal-3.14.2.0
- Cabal-syntax-3.14.2.0
- cabal-install-parsers-0.6.3
configure-options:
ghcide:
- --disable-library-for-ghci
Expand All @@ -60,7 +59,7 @@ flags:
BuildExecutable: false
# stan dependencies
directory-ospath-streaming:
os-string: false
os-string: true

nix:
packages: [icu libcxx zlib]
Expand Down
Loading