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

Bas van Dijk v.dijk.bas at gmail.com
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":

http://hackage.haskell.org/packages/archive/base/4.3.0.0/doc/html/Control-Exception.html#12

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).

Bas



More information about the Libraries mailing list