[Git][ghc/ghc][wip/pluginExtFields] Add function to remove plugin interface fields
Josh Meredith
gitlab at gitlab.haskell.org
Mon Jul 27 09:42:06 UTC 2020
Josh Meredith pushed to branch wip/pluginExtFields at Glasgow Haskell Compiler / GHC
Commits:
20d97fb0 by Josh Meredith at 2020-07-27T19:41:57+10:00
Add function to remove plugin interface fields
- - - - -
1 changed file:
- compiler/GHC/Driver/Types.hs
Changes:
=====================================
compiler/GHC/Driver/Types.hs
=====================================
@@ -156,6 +156,7 @@ module GHC.Driver.Types (
writeField, writeIfaceField, writeIfaceFieldWith,
deleteField, deleteIfaceField,
registerInterfaceData, registerInterfaceDataWith,
+ unregisterInterfaceData,
) where
#include "HsVersions.h"
@@ -3418,3 +3419,8 @@ registerInterfaceDataWith name env write = do
ext_fs <- readIORef (hsc_ext_fields env)
ext_fs' <- writeFieldWith name write ext_fs
writeIORef (hsc_ext_fields env) ext_fs'
+
+unregisterInterfaceData :: FieldName -> HscEnv -> IO ()
+unregisterInterfaceData name env = do
+ ext_fs <- readIORef (hsc_ext_fields env)
+ writeIORef (hsc_ext_fields env) (deleteField name ext_fs)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/20d97fb0246043acd44018aaf1d6423c6300e7a5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/20d97fb0246043acd44018aaf1d6423c6300e7a5
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200727/ee228f54/attachment-0001.html>
More information about the ghc-commits
mailing list