[Haskell-cafe] Re: [Haskell] Real life examples

Keean Schupke k.schupke at imperial.ac.uk
Fri Nov 26 09:01:12 EST 2004


I've replied to the cafe, as per requests...

Peek and poke are instances of the Storable class, I can
re-implement storable, and provide the alternative definition
by giving ghc some -i<something> arguments. I don't even
need to recompile your module, simply providing the alternate
Storable module at link time is sufficient.

So I restate my point, it _can_ be done in Haskell as it stands at
the moment, and yor proposal would break this.

    Keean.

Adrian Hey wrote:

>On Friday 26 Nov 2004 11:39 am, Keean Schupke wrote:
>  
>
>>Adrian Hey wrote:
>>    
>>
>>>Well it can be written in Haskell, but not using a module that was
>>>specifically designed to prevent this.
>>>      
>>>
>>Well, It can be written in Haskell as it stands at the moment...
>>    
>>
>
>No it can't. If I have a device driver that's accessing real hardware
>(peeking and poking specific memory locations say), how are you going
>to emulate that? You need to make peek and poke parameters of the
>module.
>
>That is certainly possible, but if the author of the driver module
>didn't anticipate your emulation needs, you'd be stuck I think.
>
>Regards
>--
>Adrian Hey
>
>
>_______________________________________________
>Haskell mailing list
>Haskell at haskell.org
>http://www.haskell.org/mailman/listinfo/haskell
>  
>



More information about the Haskell-Cafe mailing list