3 ms·
> This makes some sense intuitively, but it would be good to see the details worked out. The answer seems to be Safe Haskell: https://downloads.haskell.org/ghc
by hun3 2y ago
> This makes some sense intuitively, but it would be good to see the details worked out.
The answer seems to be Safe Haskell: https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/safe_haskell.html https://downloads.haskell.org/ghc/latest/docs/users_guide/ex...
(Source: Safe extension mentioned in https://github.com/ed-o-saurus/PLHaskell/blob/d917f0991a455cf0558c2036e360ba1a9b40a8ef/src/PLHaskell.hsc#L274 https://github.com/ed-o-saurus/PLHaskell/blob/d917f0991a455c...)
The PGm monad seems to be an instance of §6.18.1.2. Building secure systems (restricted IO Monads): https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/safe_haskell.html#building-secure-systems-restricted-io-monads https://downloads.haskell.org/ghc/latest/docs/users_guide/ex...
> There is always `unsafePerformIO`, after all...
Forbidden in untrusted code by Safe Haskell.