haskell / network-uri

URI manipulation facilities
Other
25 stars 33 forks source link

Migrating from String to Text #11

Closed robstewart57 closed 9 years ago

robstewart57 commented 9 years ago

Is there a reason why Network.URI is implemented sing String representations instead of Text? I'd like to migrate some types in the rdf4h library to use more of network-uri. We currently use Text extensively in our URI representation. Using the URI validation is something we'd like to adopt, but possibly not at the expense of performance of using Strings. Are there any plans to migrate network-uri from String to Text representations?

tibbe commented 9 years ago

Network.URI was written before Text existed. I agree that using Text for URI processing makes sense, but changing network-uri to use Text would break all users so badly that you might as well just create a new package instead (which would be my suggestion). There are some other warts we could fix at the same time (e.g. the uriScheme fields contains a trailing ":" which doesn't belong there.)