Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
An implementation of the RFC3987 [RFC3987]: http://www.ietf.org/rfc/rfc3987.txt
Synopsis
- newtype IRI = IRI {}
- data IRIRef = IRIRef !(Maybe Scheme) !(Maybe Authority) !Path !(Maybe IRIQuery) !(Maybe Fragment)
- newtype Scheme = Scheme Text
- data Authority = Authority !(Maybe UserInfo) !Host !(Maybe Port)
- newtype UserInfo = UserInfo Text
- newtype Host = Host Text
- newtype Port = Port Int
- newtype Path = Path Text
- newtype IRIQuery = IRIQuery Text
- newtype Fragment = Fragment Text
- data IRIError = InvalidIRI
- data SchemaError
- mkIRI :: Text -> Either String IRI
- serializeIRI :: IRIRef -> Text
- parseIRI :: Text -> Either String IRIRef
- parseRelIRI :: Text -> Either String IRIRef
- validateIRI :: Text -> Either String Text
- resolveIRI :: Text -> Text -> Either String Text
- removeIRIFragment :: IRIRef -> IRIRef
Documentation
A serialized IRI representation.
A detailed IRI representation with its components.
data SchemaError Source #
NonAlphaLeading | Scheme must start with an alphabet character |
InvalidChars | Subsequent characters in the schema were invalid |
MissingColon | Schemas must be followed by a colon |
Instances
Show SchemaError Source # | |
Defined in Data.RDF.IRI showsPrec :: Int -> SchemaError -> ShowS # show :: SchemaError -> String # showList :: [SchemaError] -> ShowS # | |
Eq SchemaError Source # | |
Defined in Data.RDF.IRI (==) :: SchemaError -> SchemaError -> Bool # (/=) :: SchemaError -> SchemaError -> Bool # |
serializeIRI :: IRIRef -> Text Source #
IRI parsing and resolution according to algorithm 5.2 from RFC3986 See: http://www.ietf.org/rfc/rfc3986.txt [FIXME] Currently, this is a correct but naive implementation.
removeIRIFragment :: IRIRef -> IRIRef Source #