atomicModifyMutVar# has incorrect type
this ticket
specifically, currently we only expose in ghc-prim
atomicModifyMutVar# :: MutVar# s a -> (a -> b) -> State# s -> (# State# s,c #)
is the type more like the following?
atomicModifyMutVar# :: MutVar# s a -> (a -> (#a,b #)) -> State# s -> (# State# s,b #)
looking at GHC.IOREF
atomicModifyIORef :: IORef a -> (a -> (a,b)) -> IO b
atomicModifyIORef (IORef (STRef r#)) f = IO $ \s -> atomicModifyMutVar# r# f s
it seems that either way, something screwy is afoot
i'm not sure where the spurious c type variable comes from
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |