The following Haskell files implement a fairly comprehensive URI parser: Parse.hs parser functions based on a framework described in Simon Thompson's book, The Craft of Functional Programming, pages 354 et seq. ParseURI.hs URI parser functions based on the framework in Parse.hs. These functions provide basic recognition and decomposition of URI strings. The URI parser is based very closely on the syntax definition in current work-in-progress RFC2396bis URI specification, which is intended to be (just) a clarification of the current URI standard, RFC 2396. See source code for references. URI.hs A number of functions for manipulating URIs, notably with functions for computing URI references relative to a base URI, and combining a URI reference with a base URI to recover the original absolute URI. ParseTest.hs ParseURITest.hs URITest.hs Unit test modules for the above. These may also serve as example of use of the URI functions. Requires module HUnit (available or linked from www.haskell.org) To run the full unit tests in each of these test modules, evaluate the function 'main' (with no arguments). In some of the files, additional functions are defined for interactive use to run tests selectively, to or output the test results to a file. The code is a bit scrappy, since it has been my introduction to Haskell, and I'm sure there are many things that could be improved. But it does pass a fairly comprehensive battery of tests, and is probably as functional as many URI libraries one might find. Thanks to Dan Connolly for help with test cases, Roy Fielding for the updated URI specification, and the folks who have provided this wonderful Haskell language and implementations. #g -- This software: http://www.ninebynine.org/Software/HaskellURI.zip http://www.ninebynine.org/Software/ReadMe-URI-Haskell.txt For information about Haskell, and links to Haskell development systems: http://www.haskell.org/ +---------+---------+---------+---------+---------+---------+---------+---------+ $Log: ReadMe-URI-Haskell.txt,v $ Revision 1.2 2003/03/06 07:44:40 graham Update Haskell-URI readme file Revision 1.1 2003/03/05 23:04:01 graham Add Haskell URI code to Web CVS