[Haskell] Re: Existing Haskell IPv6 Code
Peter Simons
simons at cryp.to
Sun May 15 06:03:25 EDT 2005
Graham Klyne writes:
>> The longer I think about this whole thing, the more I am
>> convinced that using URIs is the answer.
> FWIW, the revised URI parsing code [2][3] in the latest
> libraries includes support for IPv6 literals, as
> specified by RFC 3986 [1].
Thanks for the pointer, Graham. I knew that the URI code had
been written a while ago, but never realized how extensive
the changes were! Great job.
Now the only problem is that the module doesn't expose the
functions we would need; such as Network.URI.host, for
instance. Would it be possible to factor those parser out
into a
Text.ParserCombinators.Parsec.Rfc3986
module? Maybe we could even merge those parsers with the
ones I have here:
http://cryp.to/hsemail/docs/index.html
RFC grammars are often very similar after all.
Peter
P.S.: In the definition
host = ipLiteral <|> try ipv4address <|> regName
it looks as if the 'try' modifier should be given for the
first alternative; not for the second. I may be wrong
though.
More information about the Haskell
mailing list