Ross Paterson <ross@soi.city.ac.uk> wrote,
Great care should be exercised in the use of this function. Not only because of the danger of introducing side effects, but also because \code{unsafePerformIO} may compromise typing; in particular, the result of \code{unsafePerformIO} should always have a monomorphic type.
Unlike the other restrictions, this one could be checked by a compiler, but perhaps it's too strict. The problem isn't polymorphism as such, but polymorphic storage references, and I claim they're either environment-dependent or ill-typed. I also suspect there may be some perfectly reasonable polymorphic examples, though I can't think of a realistic example offhand.
In any case, it's not accurate to call it a function.
I changed "function" to "primitive" (as in the text preceding the type signature).
Typo: in 6.2 CTypes, the second and third bulleted paras have T for CT.
Fixed. Cheers, Manuel