6 Jun
2003
6 Jun
'03
8:32 a.m.
| Or maybe it would be better to provide some useful guidance? How about, | | To preserve the soundness of the type system, the result of | unsafePerformIO should always have a monomorphic type. For | example, | | listRef = unsafePerformIO (newIORef []) | | is unsafe, while | | listRef = unsafePerformIO (newIORef ([] :: [Int])) | | is type safe. In the first case listRef is assigned type IORef | [a], which makes it possible to store a list of one type and fetch | it with a different type. Yes! Yes! Advice is good! Simon