I do agree that Safe Haskell would be useful even if it was only used for enforcing type safety and avoiding accidental use of unsafe features, but the paper [1] makes it quite clear that one of the main goals is to safely execute untrusted code:

"Safe Haskell makes it possible to confine and safely execute untrusted, possibly malicious code. By strictly enforcing types, Safe Haskell allows a variety of different policies from API sandboxing to information-flow control to be implemented easily as monads.
[..]
We use Safe Haskell to implement an online Haskell interpreter that can securely execute arbitrary untrusted code with no overhead."

Cheers, Jaro

[1] https://www.scs.stanford.edu/~dm/home/papers/terei:safe-haskell.pdf

On 13-01-2023 18:06, Carter Schonwald wrote:
Indeed type safety is exactly what it’s for! The other notions of safety were never part of the goals. And it was designed so that the end user could decide which codes they deem trustworthy.

On Wed, Dec 28, 2022 at 6:04 PM davean <dav...@xkcd.com <mailto:dav...@xkcd.com>> wrote:

    The only part of Safe Haskell I ever really cared about was type safety.
    That's what matters, I think.

    I've wanted to use it a number of times and played with it, but it's never
    actually managed to become an important part of anything for me.
    So take that as you will. I'd love it if it worked well, its issues have
    limited what I attempt, but at the end of the day it's never hurt me too
    bad to not have it.


    -davean

    On Wed, Dec 28, 2022 at 7:14 AM Tom Ellis
    <tom-lists-haskell-cafe-2...@jaguarpaw.co.uk
    <mailto:tom-lists-haskell-cafe-2...@jaguarpaw.co.uk>> wrote:

        On Tue, Dec 27, 2022 at 08:33:04PM -0700, Chris Smith wrote:
         > This conversation reminds me of a parable I encountered somewhere,
        in which
         > someone declares "I don't understand why this decision was ever
        made, and I
         > we should change it", and someone responds, "No, if you don't 
understand
         > the decision was made, then you don't know enough to change it.  If 
you
         > learn why it was decided that way in the first place, then you will 
have
         > the understanding to decide whether to change it."

        That parable is Chesterton's fence:

        https://en.wikipedia.org/wiki/G._K._Chesterton#Chesterton's_fence
        <https://en.wikipedia.org/wiki/G._K._Chesterton#Chesterton's_fence>
        _______________________________________________
        ghc-devs mailing list
        ghc-devs@haskell.org <mailto:ghc-devs@haskell.org>
        http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
        <http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs>

    _______________________________________________
    ghc-devs mailing list
    ghc-devs@haskell.org <mailto:ghc-devs@haskell.org>
    http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
    <http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs>


_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to