Is this a joke? Seriously if you writing the OS in haskell this is trivial,
you fork a thread using forkIO at system boot to maintain the driver,
all 'processes' communicate to the thread using channels, the thread
maintains local state (an IORef, or just a peramiter used recursively)
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
Keean.
Adrian Hey wrote:
IOW there is no possible sound solution in Haskell. I think that's
a problem for a "general purpose" programming language. What if
there is no OS or device driver? Shouldn't people reasonably expect
to be able to write their own device driver in a general purpose
programming language?
Regards
--
Adrian Hey
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell