Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adopt network-uri more widely #21

Open
robstewart57 opened this issue Dec 21, 2014 · 4 comments
Open

adopt network-uri more widely #21

robstewart57 opened this issue Dec 21, 2014 · 4 comments

Comments

@robstewart57
Copy link
Owner

Migrate Unode Text to:

data Node =
  UNode Network.URI
  | BNode !T.Text
  | BNodeGen !Int
  | LNode !LValue
    deriving Generic

The primary benefit is the URI validation that network-uri implements according to the RFC3986 standard. Two current blockers are:

  1. network-uri uses String representations, not Text . An issue has been opened to inquire. Migrating from String to Text haskell/network-uri#11
  2. rdf4h automatically derives Hashable for nodes This uses the Generic instance for Node. However, URI has no Generic instance in network-uri. I pull request has been opened. Derive Generic instance for URI with GHC >= 7.6 haskell/network-uri#12
@robstewart57
Copy link
Owner Author

Item 1 is discussed in two places: haskell/network-uri#11 and haskell/network-uri#2

Item 2 is resolved: haskell/network-uri@e7aad56

@cordawyn
Copy link
Collaborator

@robstewart57 That's great to see that we've stirred a few interested people here and there. Thanks for taking it to network-uri devs!

I think that we could perhaps disregard that performance hit when converting String to Text for now, if you're going to go ahead and implement Node !URI asap. I don't think it's so crucial at this point however. Perhaps, we should rather cooperate with network-uri devs instead. I read on the issues that you pointed out - there's apparently some room for improvement (including that PortNumber instead of Int suggestion). I'd be happy to help with network-uri2 or whatever, once we've sorted out RDF4H problems ;-)

Let this issue stay here until further updates from network-uri.

@wismill
Copy link
Contributor

wismill commented Jul 21, 2018

In #55 I have implemented a newtype IRI with IRI validation and resolution.

@robstewart57
Copy link
Owner Author

@wismill

In #55 I have implemented a newtype IRI with IRI validation and resolution.

What is the status of this issue 21, after your IRI validation and resolution? Should its use be adopted more widely in this library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants