[Hugs-users] Network.CGI missing in Hugs

Bjorn Bringert bringert at cs.chalmers.se
Fri Jan 5 12:14:31 EST 2007


On Jan 5, 2007, at 18:04 , Ross Paterson wrote:

> On Fri, Jan 05, 2007 at 03:51:31PM +0100, Sven Panne wrote:
>> I've tested the new cgi package a few days ago and IIRC there were  
>> basically
>> two problems:
>>
>>    * Hugs doesn't support System.Environment.getEnvironment yet,  
>> but I guess
>> that this could easily be fixed.
>
> Indeed.
>
>>    * Some instances in Network.CGI.Monad overlap, which is not  
>> supported in
>> Hugs. I don't know if the overlap is crucial and what the  
>> rationale behind
>> this is. Perhaps I've missed some discussions on the libraries  
>> list. Perhaps
>> we can simply #ifdef/remove the overlap. Ross?
>
> One could expand MonadTrans in
>
> 	instance (MonadTrans t, MonadCGI m, Monad (t m)) => MonadCGI (t m)
>
> replacing it with
>
> 	instance (MonadCGI m) => MonadCGI (ListT m)
> 	instance (MonadCGI m) => MonadCGI (ContT m)
> 	instance (Error e, MonadCGI m) => MonadCGI (ErrorT e m)
> 	instance (MonadCGI m) => MonadCGI (ReaderT r m)
> 	instance (MonadCGI m) => MonadCGI (StateT s m)
> 	instance (Monoid w, MonadCGI m) => MonadCGI (StateT w m)
> 	instance (Monoid w, MonadCGI m) => MonadCGI (RWST r w s m)

I added that instance reluctantly, but it is quite useful when you  
write your own monad transformers and want to wrap CGIT. Removing it  
would break some existing code (Hope is the only one I know of), but  
if that's what's needed to get it working with Hugs, I'm ok with it.

/Bjorn


More information about the Hugs-Users mailing list