News for hackers. Stuff that matters.
Re:On Marketing Haskell by a1369209993 on Saturday May 30, 2020 @03:39PM (#23363945)
> In theory, Haskell could have something like a "volatile" qualifier for functions

  foo :: IO X
Haskell already has that, it just shoves the compiler re-work off on the programmer.
Re:On Marketing Haskell by derefr on Sunday May 31, 2020 @01:25PM (#23370994)
The point of what I said is that in many cases, lifting a function into a monad means that the code that uses said function can no longer be used to prove what you set out to prove by writing it.
Re:On Marketing Haskell by a1369209993 on Sunday May 31, 2020 @03:38PM (#23372033)
Yes, exactly: a function that requires a volatile (or IO) annotation is one for which (some of) the things you could use a non-volatile function to prove are not actually true. If you want to lie to the compiler[0], unsafePerformIO, seq, and other unsound primitives are available and documented. Contrariwise, if you want to not lie to compiler, the primitives for that are also available and documented.

0: Which is a completely resonable thing to do, and the basis of any language's standard library, the ability to recapitulate which in normal code separates good languages from Go-like special-cases-for-me-but-not-for-thee languages.