You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if you prefer to track issues here or on Bitbucket - I see hackage does list Bitbucket as the official repository, but also that neither repo has been touched in a long while.
At any rate: global-variables isn’t compatible with versions of base since 4.9, due to changes in the API for Data.Typeable.
Three lines need to be patched in order to make it work:
diff --git a/src/Data/Global/Registry.hs b/src/Data/Global/Registry.hs
index e7591ce..d29f2c7 100644
--- a/src/Data/Global/Registry.hs+++ b/src/Data/Global/Registry.hs@@ -30,6 +30,7 @@ import Control.Exception ( evaluate )
#endif
import Data.IORef
import Data.Dynamic
+import Data.Typeable
import Data.Map as M
import GHC.Conc ( pseq )
import GHC.IO ( unsafePerformIO, unsafeDupablePerformIO )
@@ -63,7 +64,7 @@ globalRegistry = m `pseq` unsafePerformIO (newMVar m)
-- | Exposed for unit testing
lookupOrInsert
- :: forall a. forall ref. (Typeable a, Typeable1 ref)+ :: forall a ref . (Typeable a, Typeable ref)
=> MVar Registry
-> (a -> IO (ref a))
-> String
@@ -79,7 +80,7 @@ lookupOrInsert registry new name val = modifyMVar registry lkup
#if __GLASGOW_HASKELL__ >= 702
typVal = typeOf val
- typRef = typeOf (undefined :: ref ()) -- TypeRep representing the reference, e.g. IORef,+ typRef = typeOf1 (undefined :: ref ()) -- TypeRep representing the reference, e.g. IORef,
-- MVar
lkup :: Registry -> IO (Registry, ref a)
I'd be happy to create a pull request if you want.
The text was updated successfully, but these errors were encountered:
Not sure if you prefer to track issues here or on Bitbucket - I see hackage does list Bitbucket as the official repository, but also that neither repo has been touched in a long while.
At any rate: global-variables isn’t compatible with versions of
base
since 4.9, due to changes in the API forData.Typeable
.Three lines need to be patched in order to make it work:
I'd be happy to create a pull request if you want.
The text was updated successfully, but these errors were encountered: