Re: [commit: ghc] master: add note about compilation safety to safe haskell docs (b78b6b3)
Simon Marlow <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
On 10/11/2012 02:47, Ian Lynagh wrote: > On Fri, Nov 09, 2012 at 05:46:05PM -0800, David Terei wrote: >> On 9 November 2012 17:36, Ian Lynagh <[email protected]> wrote: >>> On Fri, Nov 09, 2012 at 04:34:20PM -0800, David Terei wrote: >>>> >>>> + Safe Haskell, however, <emphasis>does not offer</emphasis> compilation >>>> + safety. >>> >>> Is this a bug? A few lines lower down the docs say that "Compiling and >>> executing untrusted code" is one of the two use cases for Safe Haskell. >> >> What matters is, does this problem make Safe Haskell unusable. I'd >> argue no, > > FWIW, I'd say yes, as it doesn't allow the use cases I can think of (OK, > it does work for lambdabot/tryhaskell, but only because they only allow > toy expressions to be evaluated). What's wrong with using a sandbox? Note that even if we tackled the problem of safe compilation in GHC, that still doesn't help if you're using Cabal, which would also need some explicit support for safe compilation (e.g. to disable the use of Setup.hs, hsc2hs, and who knows what else). However, using a sandbox addresses both cases, without any changes in GHC. Of course we should fix this in GHC in due course, but I'm just pointing out that a sandbox will probably be necessary, and you can use one right now to get compilation safety. Cheers, Simon