URI.Path.Segment  
- Package
- purescript-uri
- Repository
- slamdata/purescript-uri
#PathSegment Source
newtype PathSegmentA path segment. Can be empty, as this is required to represent some paths - segments are joined together with slashes, so in cases where a path contains multiple contiguous slashes this is represented by a group of empty path segments. Corresponds to segment in the spec.
Instances
#segmentFromString Source
segmentFromString :: String -> PathSegmentConstructs a segment value from a string, percent-encoding any characters
that require it. Note that running this on a string that has already had
percent-encoding applied will double-encode it, for those situations use
unsafeSegmentFromString instead.
#segmentToString Source
segmentToString :: PathSegment -> StringReturns the string value for a segment, percent-decoding any characters that require it.
#unsafeSegmentFromString Source
unsafeSegmentFromString :: String -> PathSegmentConstructs a segment value from a string directly - no percent-encoding will be applied. This is useful when using a custom encoding scheme for the segment, to prevent double-encoding.
#unsafeSegmentToString Source
unsafeSegmentToString :: PathSegment -> StringReturns the string value for the segment without percent-decoding. Only
"unsafe" in the sense that values this produces may need further decoding,
the name is more for symmetry with the segmentFromString/
unsafeSegmentFromString pairing.
#parseSegment Source
parseSegment :: Parser String PathSegmentA parser for a segment component of a URI.
#printSegment Source
printSegment :: PathSegment -> StringA printer for a segment component of a URI.
#PathSegmentNZ Source
newtype PathSegmentNZA path segment that cannot be empty. Corresponds to segment-nz in the spec.
Instances
#segmentNZFromString Source
segmentNZFromString :: NonEmptyString -> PathSegmentNZConstructs a non-empty segment value from a string, percent-encoding any
characters that require it. Note that running this on a string that has
already had percent-encoding applied will double-encode it, for those
situations use unsafeSegmentNZFromString instead.
#segmentNZToString Source
segmentNZToString :: PathSegmentNZ -> NonEmptyStringReturns the string value for a non-empty segment, percent-decoding any characters that require it.
#unsafeSegmentNZFromString Source
unsafeSegmentNZFromString :: NonEmptyString -> PathSegmentNZConstructs a non-empty segment value from a string directly - no percent-encoding will be applied. This is useful when using a custom encoding scheme for the segment, to prevent double-encoding.
#unsafeSegmentNZToString Source
unsafeSegmentNZToString :: PathSegmentNZ -> NonEmptyStringReturns the string value for a non-empty segment without percent-decoding.
Only "unsafe" in the sense that values this produces may need further
decoding, the name is more for symmetry with the segmentNZFromString/
unsafeSegmentNZFromString pairing.
#parseSegmentNZ Source
parseSegmentNZ :: Parser String PathSegmentNZA parser for a segment-nz component of a URI.
#printSegmentNZ Source
printSegmentNZ :: PathSegmentNZ -> StringA printer for a segment-nz component of a URI.
#PathSegmentNZNC Source
newtype PathSegmentNZNCA path segment that cannot be empty or contain the : character.
Corresponds to segment-nz-nc in the spec.
Instances
#segmentNZNCFromString Source
segmentNZNCFromString :: NonEmptyString -> PathSegmentNZNCConstructs a non-empty-no-colon segment value from a string,
percent-encoding any characters that require it. Note that running this on
a string that has already had percent-encoding applied will double-encode
it, for those situations use unsafeSegmentNZNCFromString instead.
#segmentNZNCToString Source
segmentNZNCToString :: PathSegmentNZNC -> NonEmptyStringConstructs a non-empty-no-colon segment value from a string directly - no percent-encoding will be applied. This is useful when using a custom encoding scheme for the segment, to prevent double-encoding.
#unsafeSegmentNZNCFromString Source
unsafeSegmentNZNCFromString :: NonEmptyString -> PathSegmentNZNCReturns the string value for a non-empty-no-colon segment, percent-decoding any characters that require it.
#unsafeSegmentNZNCToString Source
unsafeSegmentNZNCToString :: PathSegmentNZNC -> NonEmptyStringReturns the string value for the non-empty-no-colon segment without
percent-decoding. Only "unsafe" in the sense that values this produces may
need further decoding, the name is more for symmetry with the
segmentNZNCFromString/unsafeSegmentNZNCFromString pairing.
#parseSegmentNZNC Source
parseSegmentNZNC :: Parser String PathSegmentNZNCA parser for a segment-nz-nc component of a URI.
#printSegmentNZNC Source
printSegmentNZNC :: PathSegmentNZNC -> StringA printer for a segment-nz-nc component of a URI.
- Modules
- URI
- URI.AbsoluteURI 
- URI.Authority 
- URI.Common 
- URI.Extra. MultiHostPortPair 
- URI.Extra. QueryPairs 
- URI.Extra. UserPassInfo 
- URI.Fragment 
- URI.HierarchicalPart 
- URI.Host 
- URI.Host. Gen 
- URI.Host. IPv4Address 
- URI.Host. IPv6Address 
- URI.Host. RegName 
- URI.HostPortPair 
- URI.HostPortPair. Gen 
- URI.Path 
- URI.Path. Absolute 
- URI.Path. NoScheme 
- URI.Path. Rootless 
- URI.Path. Segment 
- URI.Port 
- URI.Port. Gen 
- URI.Query 
- URI.RelativePart 
- URI.RelativeRef 
- URI.Scheme 
- URI.Scheme. Common 
- URI.URI 
- URI.URIRef 
- URI.UserInfo