haskell / network-uri

URI manipulation facilities
Other
25 stars 33 forks source link

Possibility of Data.Text implementation of parseURI #28

Open AKST opened 8 years ago

AKST commented 8 years ago

Would it be possible to have a Data.Text / Data.ByteString implementation of parseURI? I'm a bit native to the work required to implement this, but parsing urls seems to be one of a common reason for me having to cast between Data.Text / Data.ByteString and String.

ezrakilty commented 8 years ago

Would plain old function composition suffice? I mean, are you looking just for interface convenience, or something more (like performance, or something else)?

At a first blush, I'd think the way to support this would be to offer some wrapper modules (perhaps even in a different package) that just compose Data.ByteString.pack/unpack with the relevant Network.URI functions. Would that do the trick?