Proposal: add new forms of unsafePerformIO and unsafeInterleaveIO

John Meacham john at repetae.net
Thu Feb 14 15:00:55 EST 2008


I mildly prefer 'Idempotent' to 'Dupable'. feels more descriptive to me.
This is even useful in jhc without threading, as expressions can be
marked 'idempotent and cheap' giving the compiler freedom to duplicate
them when it makes sense.

However, I am worried about the 'Inline' in the other one, in jhc,
unsafePerformIO is always inlined, it uses a different trick (my
'dependingOn' primitive) to ensure the world is not unified with another
one. 

Can we come up with a term that describes the difference other than
'inline' as that is a ghc specific quirk.

incidentally, jhc has another form of unsafePerformIO that does not wrap
its argument in a new exception handler. It can be used when you know
the argument won't raise an ioError or if it does, it handles them
itself. (normal calls to things like error and pattern match failures
are fine. it is just haskell98 io errors that metter for this one)


        John



-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Libraries mailing list