Top Level TWI's again was Re: [Haskell] Re: Parameterized Show

Lennart Augustsson lennart at augustsson.net
Wed Nov 24 03:51:32 EST 2004


Adrian Hey wrote:
> On Tuesday 23 Nov 2004 9:29 am, Keean Schupke wrote:
>>    myDriver :: (Chan in,Chan out) -> State -> IO State
>>    myDriver (in,out) state = do
>>       -- read commands from in
>>       -- process commands
>>       -- reply on out
>>       myDriver (in,out) new_state
> 
> 
> How does this solve the problem we're talking about (namely preventing
> the accidental creation of multiple processes all of which believe they
> are "the" device driver for a particular unique resource)?

So do you agree with me that the protection against two drivers
"opening" the same device does not belong in the driver code?
(Because if it sits there I could mistakenly have another driver
open the same device.)

	-- Lennart


More information about the Haskell mailing list