| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Network.URI.Template.Types
Synopsis
- data Single
- data Associative
- data List
- data TemplateValue a where
- Single :: String -> TemplateValue Single
- Associative :: [(TemplateValue Single, TemplateValue Single)] -> TemplateValue Associative
- List :: [TemplateValue Single] -> TemplateValue List
- data WrappedValue where
- WrappedValue :: TemplateValue a -> WrappedValue
- newtype TemplateString = String {
- fromString :: String
- newtype AList k v = AList {
- fromAList :: [(k, v)]
- class ToTemplateValue a where
- type TemplateRep a :: *
- timeToString :: FormatTime t => String -> t -> String
- data ValueModifier
- data Variable = Variable {}
- data TemplateSegment
- type UriTemplate = [TemplateSegment]
- data Modifier
Documentation
data Associative #
data TemplateValue a where #
All values must reduce to a single value pair, an associative list of keys and values, or a list of values without keys.
Constructors
| Single :: String -> TemplateValue Single | |
| Associative :: [(TemplateValue Single, TemplateValue Single)] -> TemplateValue Associative | |
| List :: [TemplateValue Single] -> TemplateValue List |
Instances
| Show (TemplateValue a) # | |
Defined in Network.URI.Template.Types Methods showsPrec :: Int -> TemplateValue a -> ShowS # show :: TemplateValue a -> String # showList :: [TemplateValue a] -> ShowS # | |
data WrappedValue where #
Constructors
| WrappedValue :: TemplateValue a -> WrappedValue |
newtype TemplateString #
A simple wrapper for interpolating Haskell 98 strings into templates.
Constructors
| String | |
Fields
| |
Instances
| Eq TemplateString # | |
Defined in Network.URI.Template.Types Methods (==) :: TemplateString -> TemplateString -> Bool # (/=) :: TemplateString -> TemplateString -> Bool # | |
| Read TemplateString # | |
Defined in Network.URI.Template.Types Methods readsPrec :: Int -> ReadS TemplateString # readList :: ReadS [TemplateString] # | |
| Show TemplateString # | |
Defined in Network.URI.Template.Types Methods showsPrec :: Int -> TemplateString -> ShowS # show :: TemplateString -> String # showList :: [TemplateString] -> ShowS # | |
| IsString TemplateString # | |
Defined in Network.URI.Template.Types Methods fromString :: String -> TemplateString # | |
| ToTemplateValue TemplateString # | |
Defined in Network.URI.Template.Types Associated Types type TemplateRep TemplateString :: * # Methods toTemplateValue :: TemplateString -> TemplateValue (TemplateRep TemplateString) # | |
| type TemplateRep TemplateString # | |
Defined in Network.URI.Template.Types | |
A simple list of key value pairs. Useful when you want to be able to have multiple duplicate
keys, which Map and HashMap don't support.
Instances
| (Eq k, Eq v) => Eq (AList k v) # | |
| (Read k, Read v) => Read (AList k v) # | |
| (Show k, Show v) => Show (AList k v) # | |
| (ToTemplateValue k, TemplateRep k ~ Single, ToTemplateValue v, TemplateRep v ~ Single) => ToTemplateValue (AList k v) # | |
Defined in Network.URI.Template.Types Associated Types type TemplateRep (AList k v) :: * # Methods toTemplateValue :: AList k v -> TemplateValue (TemplateRep (AList k v)) # | |
| type TemplateRep (AList k v) # | |
Defined in Network.URI.Template.Types | |
class ToTemplateValue a where #
Minimal complete definition
Associated Types
type TemplateRep a :: * #
Methods
toTemplateValue :: a -> TemplateValue (TemplateRep a) #
Instances
timeToString :: FormatTime t => String -> t -> String #
data ValueModifier #
Instances
| Eq ValueModifier # | |
Defined in Network.URI.Template.Types Methods (==) :: ValueModifier -> ValueModifier -> Bool # (/=) :: ValueModifier -> ValueModifier -> Bool # | |
| Read ValueModifier # | |
Defined in Network.URI.Template.Types Methods readsPrec :: Int -> ReadS ValueModifier # readList :: ReadS [ValueModifier] # | |
| Show ValueModifier # | |
Defined in Network.URI.Template.Types Methods showsPrec :: Int -> ValueModifier -> ShowS # show :: ValueModifier -> String # showList :: [ValueModifier] -> ShowS # | |
data TemplateSegment #
Constructors
| Literal String | A literal string. No URI escaping will be performed |
| Embed Modifier [Variable] | An interpolation can have multiple variables (separated by commas in the textual format) |
Instances
| Eq TemplateSegment # | |
Defined in Network.URI.Template.Types Methods (==) :: TemplateSegment -> TemplateSegment -> Bool # (/=) :: TemplateSegment -> TemplateSegment -> Bool # | |
| Read TemplateSegment # | |
Defined in Network.URI.Template.Types Methods readsPrec :: Int -> ReadS TemplateSegment # readList :: ReadS [TemplateSegment] # | |
| Show TemplateSegment # | |
Defined in Network.URI.Template.Types Methods showsPrec :: Int -> TemplateSegment -> ShowS # show :: TemplateSegment -> String # showList :: [TemplateSegment] -> ShowS # | |
type UriTemplate = [TemplateSegment] #
A URI template is fundamentally a bunch of segments that are either constants or else an interpolation