[Hugs-users] Network.CGI missing in Hugs

Lihn, Steve horng_twu_lihn at merck.com
Tue Jan 9 12:56:28 EST 2007


I did not realize reporting a missing CGI module could cause such a lengthy discussion.
Since I am new to Haskell, can someone explain why a CGI module, which seems to be a basic 
for any modern programming language, is such a headache in Haskell?

I roughly know it is related to Monad, a state machine. But why is it so difficult to get
something from the environment and process the information accordingly?
Programs read from environments, databases, files all the time. 
Do they all have similar issues in Haskell?

  Steve Lihn
  

-----Original Message-----
From: hugs-users-bounces at haskell.org [mailto:hugs-users-bounces at haskell.org] On Behalf Of Bjorn Bringert
Sent: Sunday, January 07, 2007 1:10 PM
To: Ian Lynagh
Cc: Ross Paterson; hugs-users at haskell.org
Subject: Re: [Hugs-users] Network.CGI missing in Hugs

On Jan 7, 2007, at 19:03 , Ian Lynagh wrote:

> On Fri, Jan 05, 2007 at 06:14:31PM +0100, Bjorn Bringert wrote:
>> On Jan 5, 2007, at 18:04 , Ross Paterson wrote:
>>>
>>> 	instance (MonadTrans t, MonadCGI m, Monad (t m)) => MonadCGI (t 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),
>
> Some of my code needs it too (I think I might have requested it be  
> added
> in the first place?). I find it very useful to be able to write  
> code in
> the style shown in
> http://www.haskell.org/pipermail/haskell-cafe/2007-January/021085.html
>
> Hugs compatibility is also important, though, and undecidable  
> instances
> are marked "probably no" for Haskell'.
>
> It feels like a bit of a sledgehammer, but maybe the instance  
> should be
> put in its own package cgi-undecidable or something?

Yes, you were the one who requested it in the first place. It was  
initially in a separate module. As far as I recall, I only moved it  
to Network.CGI.Monad to avoid it being an orphan instance. This isn't  
really important I guess. I would be ok with moving it somewhere  
else. A separate package would probably be the cleanest, since it  
would allow applications to declare that they need it.

/Björn_______________________________________________
Hugs-Users mailing list
Hugs-Users at haskell.org
http://www.haskell.org/mailman/listinfo/hugs-users




------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is 
available at http://www.merck.com/contact/contacts.html) that may be 
confidential, proprietary copyrighted and/or legally privileged. It is 
intended solely for the use of the individual or entity named on this 
message. If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then 
delete it from your system.

------------------------------------------------------------------------------


More information about the Hugs-Users mailing list