packages feed

hls-retrie-plugin 1.0.0.2 → 1.0.1.0

raw patch · 3 files changed

+16/−25 lines, 3 filesdep +ghc-api-compatdep −shakedep ~ghcidePVP ok

version bump matches the API change (PVP)

Dependencies added: ghc-api-compat

Dependencies removed: shake

Dependency ranges changed: ghcide

API changes (from Hackage documentation)

Files

hls-retrie-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.2 name:               hls-retrie-plugin-version:            1.0.0.2+version:            1.0.1.0 synopsis:           Retrie integration plugin for Haskell Language Server license:            Apache-2.0 license-file:       LICENSE@@ -8,9 +8,7 @@ maintainer:         pepeiborra@gmail.com category:           Development build-type:         Simple-extra-source-files:-  include/ghc-api-version.h-  LICENSE+extra-source-files: LICENSE  library   exposed-modules:    Ide.Plugin.Retrie@@ -23,20 +21,19 @@     , directory     , extra     , ghc-    , ghcide                ^>=1.2+    , ghc-api-compat+    , ghcide                >=1.2     && <1.5     , hashable     , hls-plugin-api        ^>=1.1     , lsp     , lsp-types     , retrie                >=0.1.1.0     , safe-exceptions-    , shake     , text     , transformers     , unordered-containers    default-language:   Haskell2010-  include-dirs:       include   default-extensions:     DataKinds     TypeOperators
− include/ghc-api-version.h
@@ -1,10 +0,0 @@-#ifndef GHC_API_VERSION_H-#define GHC_API_VERSION_H--#ifdef GHC_LIB-#define MIN_GHC_API_VERSION(x,y,z) MIN_VERSION_ghc_lib(x,y,z)-#else-#define MIN_GHC_API_VERSION(x,y,z) MIN_VERSION_ghc(x,y,z)-#endif--#endif
src/Ide/Plugin/Retrie.hs view
@@ -5,6 +5,7 @@ {-# LANGUAGE LambdaCase          #-} {-# LANGUAGE NamedFieldPuns      #-} {-# LANGUAGE OverloadedStrings   #-}+{-# LANGUAGE PatternSynonyms     #-} {-# LANGUAGE RecordWildCards     #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving  #-}@@ -12,7 +13,6 @@ {-# LANGUAGE TypeFamilies        #-}  {-# OPTIONS -Wno-orphans #-}-#include "ghc-api-version.h"  module Ide.Plugin.Retrie (descriptor) where @@ -65,8 +65,11 @@                                                        TyClGroup (..), fun_id,                                                        mi_fixities,                                                        moduleNameString,-                                                       parseModule, rds_rules,-                                                       srcSpanFile)+                                                       parseModule,+                                                       pattern IsBoot,+                                                       pattern NotBoot,+                                                       pattern OldRealSrcSpan,+                                                       rds_rules, srcSpanFile) import           GHC.Generics                         (Generic) import           GhcPlugins                           (Outputable,                                                        SourceText (NoSourceText),@@ -293,7 +296,7 @@           ]         | L l r  <- rds_rules,           pos `isInsideSrcSpan` l,-#if MIN_GHC_API_VERSION(8,8,0)+#if MIN_VERSION_ghc(8,8,0)           let HsRule {rd_name = L _ (_, rn)} = r, #else           let HsRule _ (L _ (_,rn)) _ _ _ _ = r,@@ -466,8 +469,8 @@ asTextEdits NoChange = [] asTextEdits (Change reps _imports) =   [ (filePathToUri spanLoc, edit)-    | Replacement {..} <- nubOrdOn replLocation reps,-      (RealSrcSpan rspan) <- [replLocation],+    | Replacement {..} <- nubOrdOn (realSpan . replLocation) reps,+      (OldRealSrcSpan rspan) <- [replLocation],       let spanLoc = unpackFS $ srcSpanFile rspan,       let edit = TextEdit (realSrcSpanToRange rspan) (T.pack replReplacement)   ]@@ -536,8 +539,9 @@   deriving (Eq, Show, Generic, FromJSON, ToJSON)  toImportDecl :: ImportSpec -> GHC.ImportDecl GHC.GhcPs-toImportDecl AddImport {..} = GHC.ImportDecl {..}+toImportDecl AddImport {..} = GHC.ImportDecl {ideclSource = ideclSource', ..}   where+    ideclSource' = if ideclSource then IsBoot else NotBoot     toMod = GHC.noLoc . GHC.mkModuleName     ideclName = toMod ideclNameString     ideclPkgQual = Nothing@@ -547,7 +551,7 @@     ideclSourceSrc = NoSourceText     ideclExt = GHC.noExtField     ideclAs = toMod <$> ideclAsString-#if MIN_GHC_API_VERSION(8,10,0)+#if MIN_VERSION_ghc(8,10,0)     ideclQualified = if ideclQualifiedBool then GHC.QualifiedPre else GHC.NotQualified #else     ideclQualified = ideclQualifiedBool