ghc-tcplugins-extra 0.3.1 → 0.3.2
raw patch · 3 files changed
+17/−8 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +3/−0
- ghc-tcplugins-extra.cabal +2/−2
- src/GHC/TcPluginM/Extra.hs +12/−6
CHANGELOG.md view
@@ -1,3 +1,6 @@+## 0.3.2 *January 18th 2020*+* [#11](https://github.com/clash-lang/ghc-tcplugins-extra/pull/11) Support `-hide-all-plugin-packages`/`-plugin-package-id`+ ## 0.3.1 *January 6th 2020* * Support for GHC-8.9
ghc-tcplugins-extra.cabal view
@@ -1,5 +1,5 @@ name: ghc-tcplugins-extra-version: 0.3.1+version: 0.3.2 synopsis: Utilities for writing GHC type-checker plugins description: Utilities for writing GHC type-checker plugins, such as creating constraints, with a stable API covering multiple@@ -18,7 +18,7 @@ CHANGELOG.md cabal-version: >=1.10 tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4,- GHC == 8.6.5, GHC == 8.8.1, GHC == 8.10.1+ GHC == 8.6.5, GHC == 8.8.2, GHC == 8.10.1 source-repository head type: git
src/GHC/TcPluginM/Extra.hs view
@@ -72,9 +72,9 @@ TcPlugin (..), TcPluginResult (..), ctEvId, ctEvLoc, ctLoc, ctLocEnv, mkNonCanonical, setCtLocEnv) #else-import TcPluginM (FindResult (..), TcPluginM, findImportedModule, lookupOrig,- tcPluginTrace)+import TcPluginM (FindResult (..), TcPluginM, lookupOrig, tcPluginTrace) import qualified TcPluginM+import qualified Finder #if __GLASGOW_HASKELL__ < 809 import TcRnTypes (CtEvidence (..), CtLoc, TcPlugin (..), TcPluginResult (..))@@ -236,10 +236,16 @@ -- | Find a module lookupModule :: ModuleName -- ^ Name of the module- -> FastString -- ^ Name of the package containing the module+ -> FastString -- ^ Name of the package containing the module.+ -- NOTE: This value is ignored on ghc>=8.0. -> TcPluginM Module-lookupModule mod_nm pkg = do- found_module <- findImportedModule mod_nm $ Just pkg+lookupModule mod_nm _pkg = do+#if __GLASGOW_HASKELL__ >= 711+ hsc_env <- TcPluginM.getTopEnv+ found_module <- TcPluginM.tcPluginIO $ Finder.findPluginModule hsc_env mod_nm+#else+ found_module <- findImportedModule mod_nm $ Just _pkg+#endif case found_module of #if __GLASGOW_HASKELL__ >= 711 FoundModule h -> return (fr_mod h)@@ -247,7 +253,7 @@ Found _ md -> return md #endif _ -> do- found_module' <- findImportedModule mod_nm $ Just $ fsLit "this"+ found_module' <- TcPluginM.findImportedModule mod_nm $ Just $ fsLit "this" case found_module' of #if __GLASGOW_HASKELL__ >= 711 FoundModule h -> return (fr_mod h)