urn-0.1.0.0: Universal Resource Names

Portabilityportable
Stabilityexperimental
Maintainerpxqr.sta@gmail.com
Safe HaskellSafe-Inferred

Data.URN

Description

URN parsing and rendering according to RFC2141.

For more info see: http://tools.ietf.org/html/rfc2141

Synopsis

Documentation

type NID = StringSource

Namespace Identifier determines the syntactic interpretation of namespace-specific string.

type NSS = StringSource

Namespace Specific String.

data URN Source

URN is persistent location-independent identifier for resources. For example:

 urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6

Constructors

URN 

Fields

urnNamespace :: NID

a normalized namespace identifier;

 uuid
urnString :: NSS

the corresponding normalized and unescaped namespace-specific string.

 f81d4fae-7dec-11d0-a765-00a0c91e6bf6

Instances

Eq URN 
Data URN 
Ord URN 
Read URN

Similar to parseURN.

Show URN

Similar to renderURN.

Typeable URN 
IsString URN

Similar to parseURN.

renderURN :: URN -> StringSource

Render URN to its text representation. Resulting string will have canonicalized NID and NSS part.

parseURN :: String -> Maybe URNSource

Parse URN from its text representation. Resulting URN will have canonicalized NID and NSS part.