Prevent duplication of unsafePerformIO on a multiprocessor Fixes #986.  The idea is to add a new operation
Prevent duplication of unsafePerformIO on a multiprocessor
Fixes #986.  The idea is to add a new operation

  noDuplicate :: IO ()

it is guaranteed that if two threads have executed noDuplicate, then
they are not duplicating any computation.

We now provide two new unsafe operations:

unsafeDupablePerformIO    :: IO a -> a
unsafeDupableInterleaveIO :: IO a -> IO a

which are equivalent to the old unsafePerformIO and unsafeInterleaveIO
respectively.  The new versions of these functions are defined as:

unsafePerformIO    m = unsafeDupablePerformIO (noDuplicate >> m)
unsafeInterleaveIO m = unsafeDupableInterleaveIO (noDuplicate >> m)

lukexi/ghc,da-x/ghc,ml9951/ghc,nkaretnikov/ghc,mfine/ghc,vTurbine/ghc,vikraman/ghc,ml9951/ghc,holzensp/ghc,ezyang/ghc,ghc-android/ghc,lukexi/ghc,acowley/ghc,ezyang/ghc,nathyong/microghc-ghc,vikraman/ghc,gridaphobe/ghc,green-haskell/ghc,GaloisInc/halvm-ghc,snoyberg/ghc,spacekitteh/smcghc,ml9951/ghc,ryantm/ghc,acowley/ghc,lukexi/ghc,ml9951/ghc,jstolarek/ghc,acowley/ghc,gcampax/ghc,spacekitteh/smcghc,frantisekfarka/ghc-dsi,gridaphobe/ghc,mettekou/ghc,holzensp/ghc,sgillespie/ghc,gcampax/ghc,fmthoma/ghc,nushio3/ghc,acowley/ghc,nushio3/ghc,christiaanb/ghc,tjakway/ghcjvm,tjakway/ghcjvm,anton-dessiatov/ghc,nathyong/microghc-ghc,nkaretnikov/ghc,nushio3/ghc,mfine/ghc,AlexanderPankiv/ghc,forked-upstream-packages-for-ghcjs/ghc,gcampax/ghc,nathyong/microghc-ghc,elieux/ghc,wxwxwwxxx/ghc,vikraman/ghc,forked-upstream-packages-for-ghcjs/ghc,GaloisInc/halvm-ghc,shlevy/ghc,frantisekfarka/ghc-dsi,gridaphobe/ghc,ryantm/ghc,forked-upstream-packages-for-ghcjs/ghc,tjakway/ghcjvm,lukexi/ghc,jstolarek/ghc,siddhanathan/ghc,sdiehl/ghc,jstolarek/ghc,mcschroeder/ghc,fmthoma/ghc,snoyberg/ghc,forked-upstream-packages-for-ghcjs/ghc,jstolarek/ghc,TomMD/ghc,christiaanb/ghc,gridaphobe/ghc,da-x/ghc,frantisekfarka/ghc-dsi,snoyberg/ghc,wxwxwwxxx/ghc,ezyang/ghc,ml9951/ghc,tibbe/ghc,AlexanderPankiv/ghc,sgillespie/ghc,acowley/ghc,snoyberg/ghc,sdiehl/ghc,AlexanderPankiv/ghc,green-haskell/ghc,olsner/ghc,anton-dessiatov/ghc,olsner/ghc,elieux/ghc,vikraman/ghc,sdiehl/ghc,elieux/ghc,GaloisInc/halvm-ghc,oldmanmike/ghc,gridaphobe/ghc,snoyberg/ghc,tibbe/ghc,olsner/ghc,gcampax/ghc,vikraman/ghc,jstolarek/ghc,nushio3/ghc,forked-upstream-packages-for-ghcjs/ghc,wxwxwwxxx/ghc,siddhanathan/ghc,ezyang/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,wxwxwwxxx/ghc,mfine/ghc,acowley/ghc,ghc-android/ghc,bitemyapp/ghc,da-x/ghc,shlevy/ghc,oldmanmike/ghc,mettekou/ghc,AlexanderPankiv/ghc,acowley/ghc,GaloisInc/halvm-ghc,vTurbine/ghc,wxwxwwxxx/ghc,fmthoma/ghc,elieux/ghc,TomMD/ghc,tibbe/ghc,ryantm/ghc,AlexanderPankiv/ghc,spacekitteh/smcghc,vikraman/ghc,christiaanb/ghc,mettekou/ghc,christiaanb/ghc,da-x/ghc,ghc-android/ghc,da-x/ghc,christiaanb/ghc,gridaphobe/ghc,mfine/ghc,oldmanmike/ghc,urbanslug/ghc,holzensp/ghc,sgillespie/ghc,vikraman/ghc,TomMD/ghc,christiaanb/ghc,forked-upstream-packages-for-ghcjs/ghc,siddhanathan/ghc,nushio3/ghc,shlevy/ghc,fmthoma/ghc,tjakway/ghcjvm,nushio3/ghc,gcampax/ghc,nushio3/ghc,nkaretnikov/ghc,shlevy/ghc,olsner/ghc,ryantm/ghc,spacekitteh/smcghc,tjakway/ghcjvm,da-x/ghc,ezyang/ghc,green-haskell/ghc,christiaanb/ghc,anton-dessiatov/ghc,wxwxwwxxx/ghc,mettekou/ghc,sgillespie/ghc,anton-dessiatov/ghc,tibbe/ghc,mettekou/ghc,urbanslug/ghc,urbanslug/ghc,ghc-android/ghc,ezyang/ghc,TomMD/ghc,sdiehl/ghc,vTurbine/ghc,ml9951/ghc,mfine/ghc,ghc-android/ghc,mcschroeder/ghc,snoyberg/ghc,sgillespie/ghc,spacekitteh/smcghc,sdiehl/ghc,anton-dessiatov/ghc,holzensp/ghc,sgillespie/ghc,ghc-android/ghc,lukexi/ghc,mcschroeder/ghc,mcschroeder/ghc,AlexanderPankiv/ghc,vTurbine/ghc,ezyang/ghc,olsner/ghc,siddhanathan/ghc,mcschroeder/ghc,anton-dessiatov/ghc,tibbe/ghc,sdiehl/ghc,olsner/ghc,olsner/ghc,oldmanmike/ghc,nathyong/microghc-ghc,shlevy/ghc,gcampax/ghc,urbanslug/ghc,nkaretnikov/ghc,fmthoma/ghc,ml9951/ghc,mfine/ghc,siddhanathan/ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,oldmanmike/ghc,gcampax/ghc,AlexanderPankiv/ghc,TomMD/ghc,nathyong/microghc-ghc,forked-upstream-packages-for-ghcjs/ghc,wxwxwwxxx/ghc,green-haskell/ghc,urbanslug/ghc,sgillespie/ghc,vTurbine/ghc,tjakway/ghcjvm,oldmanmike/ghc,nkaretnikov/ghc,bitemyapp/ghc,gridaphobe/ghc,fmthoma/ghc,shlevy/ghc,frantisekfarka/ghc-dsi,nathyong/microghc-ghc,siddhanathan/ghc,green-haskell/ghc,bitemyapp/ghc,urbanslug/ghc,snoyberg/ghc,mettekou/ghc,bitemyapp/ghc,frantisekfarka/ghc-dsi,urbanslug/ghc,elieux/ghc,mfine/ghc,TomMD/ghc,ghc-android/ghc,TomMD/ghc,nkaretnikov/ghc,siddhanathan/ghc,elieux/ghc,sdiehl/ghc,vTurbine/ghc,mettekou/ghc,elieux/ghc,nathyong/microghc-ghc,oldmanmike/ghc,ml9951/ghc,GaloisInc/halvm-ghc,holzensp/ghc,mcschroeder/ghc,tjakway/ghcjvm,bitemyapp/ghc,shlevy/ghc,nkaretnikov/ghc,ryantm/ghc,da-x/ghc,fmthoma/ghc,mcschroeder/ghc