packages feed

hls-gadt-plugin 1.0.1.0 → 1.0.2.0

raw patch · 4 files changed

+24/−8 lines, 4 filesdep ~ghcidedep ~hls-test-utilsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: ghcide, hls-test-utils

API changes (from Hackage documentation)

Files

hls-gadt-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               hls-gadt-plugin-version:            1.0.1.0+version:            1.0.2.0 synopsis:           Convert to GADT syntax plugin description:   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-gadt-plugin#readme>@@ -30,7 +30,7 @@     , containers     , extra     , ghc-    , ghcide                ^>= 1.9+    , ghcide                ^>= 1.10     , ghc-boot-th     , ghc-exactprint     , hls-plugin-api        ^>= 1.6
src/Ide/Plugin/GADT.hs view
@@ -8,6 +8,8 @@ {-# LANGUAGE ViewPatterns      #-} module Ide.Plugin.GADT (descriptor) where +import           Control.Monad.Trans.Class+import           Control.Monad.IO.Class import           Control.Lens                  ((^.)) import           Control.Monad.Except import           Data.Aeson                    (FromJSON, ToJSON, Value (Null),
src/Ide/Plugin/GHC.hs view
@@ -13,6 +13,7 @@  import           Data.Functor                            ((<&>)) import           Data.List.Extra                         (stripInfix)+import qualified Data.List.NonEmpty                      as NE import qualified Data.Text                               as T import           Development.IDE import           Development.IDE.GHC.Compat@@ -29,7 +30,11 @@                                                           EpAnnComments (EpaComments),                                                           EpaLocation (EpaDelta),                                                           SrcSpanAnn' (SrcSpanAnn),-                                                          spanAsAnchor)+                                                          spanAsAnchor,+#if MIN_VERSION_ghc(9,5,0)+                                                          TokenLocation(..)+#endif+                                                          ) import           Language.Haskell.GHC.ExactPrint         (showAst) #else import qualified Data.Map.Lazy                           as Map@@ -94,10 +99,18 @@     ConDeclH98{..} ->         ConDeclGADT             con_ext+#if MIN_VERSION_ghc(9,5,0)+            (NE.singleton con_name)+#else             [con_name]+#endif+ #if !MIN_VERSION_ghc(9,2,1)             con_forall #endif+#if MIN_VERSION_ghc(9,5,0)+            (L NoTokenLoc HsNormalTok)+#endif             -- Ignore all existential type variable since GADT not needed             implicitTyVars             (mergeContext ctxt con_mb_cxt)@@ -199,7 +212,8 @@         adjustDataDecl DataDecl{..} = DataDecl             { tcdDExt = adjustWhere tcdDExt             , tcdDataDefn = tcdDataDefn-                { dd_cons = map adjustCon (dd_cons tcdDataDefn)+                { dd_cons =+                      fmap adjustCon (dd_cons tcdDataDefn)                 }             , ..             }
test/Main.hs view
@@ -35,13 +35,13 @@     , runTest "ConstructorContext" "ConstructorContext" 2 0 2 38     , runTest "Context" "Context" 2 0 4 41     , runTest "Pragma" "Pragma" 2 0 3 29-    , onlyWorkForGhcVersions (`elem`[GHC92, GHC94]) "Single deriving has different output on ghc9.2+" $+    , onlyWorkForGhcVersions (`elem`[GHC92, GHC94, GHC96]) "Single deriving has different output on ghc9.2+" $         runTest "SingleDerivingGHC92" "SingleDerivingGHC92" 2 0 3 14-    , knownBrokenForGhcVersions [GHC92,GHC94] "Single deriving has different output on ghc9.2+" $+    , knownBrokenForGhcVersions [GHC92,GHC94,GHC96] "Single deriving has different output on ghc9.2+" $         runTest "SingleDeriving" "SingleDeriving" 2 0 3 14-    , onlyWorkForGhcVersions (`elem`[GHC92, GHC94]) "only ghc-9.2+ enabled GADTs pragma implicitly" $+    , onlyWorkForGhcVersions (`elem`[GHC92, GHC94, GHC96]) "only ghc-9.2+ enabled GADTs pragma implicitly" $         gadtPragmaTest "ghc-9.2 don't need to insert GADTs pragma" False-    , knownBrokenForGhcVersions [GHC92,GHC94] "ghc-9.2 has enabled GADTs pragma implicitly" $+    , knownBrokenForGhcVersions [GHC92,GHC94,GHC96] "ghc-9.2 has enabled GADTs pragma implicitly" $         gadtPragmaTest "insert pragma" True     ]