FFI, safe vs unsafe

John Meacham john at repetae.net
Wed Mar 29 03:11:10 EST 2006

It would be nice if we can deprecate the not very informative  'safe'
and 'unsafe' names and use more descriptive ones that tell you what is
actually allowed.

'reentrant' - routine might call back into the haskell run-time
'blockable' - routine might block indefinitly

and it is not to hard to imagine others (though, perhaps pragmas might
be better), not that I am suggesting we standardize these.. unless
others want to.

'reentrant_tail' - will tail call a haskell routine
'reentrant_nonglobal' - will only call arguments passed to it.
'fatal' - routine always aborts or performs a non-local return
'cheap' - routine is cheap to call, may be duplicated freely by optimizer
'speculatable' - routine may be reordered and called speculatively, even
if the optimizer can't prove it will eventually be used


John Meacham - ⑆repetae.net⑆john⑈

More information about the Haskell-prime mailing list