proposal: add 'unsafeCoerce'

Cale Gibbard cgibbard at
Tue Nov 21 05:21:57 EST 2006

I'd actually like to have an -unsafe flag which one would have to use
in order to compile a module using functions/values marked as unsafe.
Unsafety would be inherited by default, and using a compiler pragma
would avoid this inheritance (but the module would still need to be
compiled with -unsafe, just not its children.)

I tend to think of the unsafe functions as hooks into the
compiler/runtime to be used for modifying the language, not really as
part of the language itself.

 - Cale

On 11/11/06, Neil Mitchell <ndmitchell at> wrote:
> Hi
> > isn't it _much_ better to use Virtual Machine to disallow bad code?
> > may be yhc may provide such VM?
> It could do with relative ease - just add a -safe flag and disallow IO
> in the interpretter. You could even keep the IO monad just not perform
> the actual IO effects.
> Thanks
> Neil
> _______________________________________________
> Libraries mailing list
> Libraries at

More information about the Libraries mailing list