摘要: The Common Gateway Interface (CGI) for generating dynamic documents on web servers imposes much accidental complexity the programmer. HaskellsCGI library documented in this paper hides all unpleasantness by using common sense ‘design pattern’ of separating model and presentation. Low-level query string requests are represented association lists, primitive HTTP responses easily constructed a set HTML combinators. CGI programmer only needs to write worker function that maps an abstract request into response. A (higher-order) wrapper then transmutes real low-level script deals with exact format concrete as required standard.