
10 Feb
2019
10 Feb
'19
3:24 a.m.
Dear list Playing on ghci I encountered the following type GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help Prelude> :m +Control.Concurrent.STM Prelude Control.Concurrent.STM> var1 <- atomically $ newEmptyTMVar Prelude Control.Concurrent.STM> :t var1 var1 :: TMVar GHC.Types.Any Prelude Control.Concurrent.STM> I would think `var1 :: TMVar a` as the documentation says it should. Reading on `GHC.Types` `Any` seems to be a type family related to some laws on `unsafeCoerce`. Can anybody explain me why is this sensible defaulting and how to obtain the expected result? -- -- Ruben -- pgp: 4EE9 28F7 932E F4AD