diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2020-07-27 19:41:57 +1000 |
---|---|---|
committer | Josh Meredith <joshmeredith2008@gmail.com> | 2020-08-09 23:54:28 -0400 |
commit | 95eb22d7fdfacf5dd6d7271368decde2c89f4d19 (patch) | |
tree | a92b22bfa40097b2bef1afb3648ce627f16915ef | |
parent | a74b1cf3ddf9ce6b31e591d707f08a37b74ad0cf (diff) | |
download | haskell-wip/pluginExtFields.tar.gz |
Add function to remove plugin interface fieldswip/pluginExtFields
-rw-r--r-- | compiler/GHC/Driver/Types.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Types.hs b/compiler/GHC/Driver/Types.hs index 93a7ac1b4d..186d9386ae 100644 --- a/compiler/GHC/Driver/Types.hs +++ b/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) |