5 ms·
> This is why unsafePerformIO is unsafe: it’s completely foreign to the programming model Maybe, although it is also not type safe because Haskell doesn't have
by lpw25 12y ago
> This is why unsafePerformIO is unsafe: it’s completely foreign to the programming model
Maybe, although it is also not type safe because Haskell doesn't have a value restriction for polymorphism. (or looked at another way Haskell's value restriction assumes that function application is a value).
- tel 12y agoIt's not really trying to be type safe either. There are lots of ways to break types with unsafePerformIO
- tikhonj 12y agoAnd, by extension, we don't have a value restriction because unsafePerformIO is foreign to our programming model. If it was actually part of the abstraction, Haskell would be a lot more like ML!