Proposal: Deprecate Control.Exception.blocked in favour of getMaskingState

Bas van Dijk v.dijk.bas at
Sat Feb 5 13:13:38 CET 2011

Dear all,

I would like to propose deprecating 'Control.Exception.blocked' in
favour of 'getMaskingState'.

The term "blocked" refers to the old way of dealing with asynchronous
exceptions (block/unblock). It can also be a bit confusing to which
"blocked" property it refers: blocked asynchronous exceptions, or a
blocked thread.

Note that 'blocked' is already listed in the section "(deprecated)
Asynchronous exception control":

We could add an equivalent function with an unambiguous and more
consistent name:

masked :: IO Bool
masked = fmap (/= Unmasked) getMaskingState

However, I don't think it will be used enough to warrant its addition.

I believe the proposal is clear enough, so I will make a patch when
consensus is reached.

Discussion deadline: 2 weeks (19 February).


More information about the Libraries mailing list