[Haskell] Real life examples

Adrian Hey ahey at iee.org
Fri Nov 26 06:27:34 EST 2004


On Thursday 25 Nov 2004 4:53 pm, Keean Schupke wrote:
> Thanks Adrian, for some reason I did not get the original reply to this
> post.
>
> This was my point, I may _want_ two copies of the library. Lets say I
> want to
> write a virtual machine emulator in haskell, and I then wish to use your
> library to drive the virtualised hardware... There must be some way to
> encapsulate the state requirement of the library such that the VM software
> can manage multiple states. At the momemt (with the handle approach)
> this is entirely possible:
>
>     a <- initLibrary
>     b <- initLibrary
>
> With you suggestion this VM cannot be written in Haskell any more. This is
> the point that I object to (and have been trying to explain badly).

Well it can be written in Haskell, but not using a module that was
specifically designed to prevent this. You've gotta make a sensible
choice as to what the purpose of module you're writing really is of
course. But this is always the case I think, no magic bullets here.

Regards
--
Adrian Hey



More information about the Haskell mailing list