error in your article? about meaning of safe/unsafe in "foreign import"

Peter Simons simons at cryp.to
Fri May 20 06:45:16 EDT 2005


Duncan Coutts writes:

 > So to sumarise the pairings:
 >       * you _must_ make a safe call to an unsafe foreign function
 >       * you _may_ make an unsafe call to a safe foreign function
 >
 > It's a contravariance :-)

I'd use a slightly different term. Declaring a function that
needs special precaution to be called as "safe", and
declaring a function that is safe to be called anytime as
"unsafe" is contra-intuitive. ;-)

Peter



More information about the Glasgow-haskell-users mailing list