Changes to primops break libraries (was Re: 7.8 Feature window)
jan.stolarek at p.lodz.pl
Wed Aug 21 15:36:40 CEST 2013
> Hmm, almost, but I get now:
> How to repackage Int# to Bool?
Oh dear... that's that 5% :) You just want sameMutableArray instead of sameMutableArray#. There will be problems with sameMVar and so on (if primitive uses them - I don't remember), but that's fixed in a similar way. A quick look at bottom of ghc-prim/GHC/PrimWrappers.hs will tell you what's going on with these functions. Also, from the wiki:
•Six primops are an exception to the rules above: sameMutableArray#, sameMutableByteArray#, sameMutableArrayArray#, sameMutVar#, sameMVar# and sameTVar#. Their names have remained the same as before and new wrappers created for them lack # at the end of their name. We made that decission because this naming feels more consistent and these primops are rarely used so we expect that they won't break a lot of existing code.
I hope this helps.
More information about the ghc-devs