Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Synopsis
- data T name string = Cons {}
- cons :: Attribute name => Name name -> string -> T name string
- new :: Attribute name => String -> string -> T name string
- lift :: (Name name -> string -> (Name name, string)) -> T name string -> T name string
- toPair :: Attribute name => T name string -> (String, string)
- fromPair :: Attribute name => (String, string) -> T name string
- name :: T (T name string) (Name name)
- value :: T (T name string) string
- formatListBlankHead :: (Attribute name, C string) => [T name string] -> ShowS
- mapName :: (Name name0 -> Name name1) -> T name0 string -> T name1 string
- newtype Name ident = Name {
- unname :: ident
- versionName :: Attribute name => Name name
- encodingName :: Attribute name => Name name
- versionString :: String
- encodingString :: String
- mapValues :: (str0 -> str1) -> [T name str0] -> [T name str1]
- mapValuesA :: Applicative f => (str0 -> f str1) -> [T name str0] -> f [T name str1]
- adjustOn :: (Name name -> Bool) -> (string -> string) -> [T name string] -> [T name string]
- adjustOnA :: Applicative f => (Name name -> Bool) -> (string -> f string) -> [T name string] -> f [T name string]
- insert :: Attribute name => Name name -> string -> [T name string] -> [T name string]
- insertWith :: Attribute name => (string -> string -> string) -> Name name -> string -> [T name string] -> [T name string]
- match :: (Attribute name, Eq string) => String -> string -> T name string -> Bool
- matchAnyValue :: (Attribute name, Eq string) => String -> [string] -> T name string -> Bool
- lookup :: Attribute name => Name name -> [T name string] -> Maybe string
- lookupLit :: Attribute name => String -> [T name string] -> Maybe string
- any :: (T name string -> Bool) -> [T name string] -> Bool
- anyName :: (Name name -> Bool) -> [T name string] -> Bool
- anyValue :: (string -> Bool) -> [T name string] -> Bool
- anyLit :: (Attribute name, Eq string) => String -> string -> [T name string] -> Bool
- anyNameLit :: Attribute name => String -> [T name string] -> Bool
- anyValueLit :: Eq string => string -> [T name string] -> Bool
Documentation
An HTML attribute id="name"
generates ("id","name")
Instances
Functor (T name) Source # | |
Foldable (T name) Source # | |
Defined in Text.XML.Basic.Attribute fold :: Monoid m => T name m -> m # foldMap :: Monoid m => (a -> m) -> T name a -> m # foldr :: (a -> b -> b) -> b -> T name a -> b # foldr' :: (a -> b -> b) -> b -> T name a -> b # foldl :: (b -> a -> b) -> b -> T name a -> b # foldl' :: (b -> a -> b) -> b -> T name a -> b # foldr1 :: (a -> a -> a) -> T name a -> a # foldl1 :: (a -> a -> a) -> T name a -> a # elem :: Eq a => a -> T name a -> Bool # maximum :: Ord a => T name a -> a # minimum :: Ord a => T name a -> a # | |
Traversable (T name) Source # | |
(Eq name, Eq string) => Eq (T name string) Source # | |
(Ord name, Ord string) => Ord (T name string) Source # | |
Defined in Text.XML.Basic.Attribute compare :: T name string -> T name string -> Ordering # (<) :: T name string -> T name string -> Bool # (<=) :: T name string -> T name string -> Bool # (>) :: T name string -> T name string -> Bool # (>=) :: T name string -> T name string -> Bool # | |
(Attribute name, Show string) => Show (T name string) Source # | |
(Attribute name, C string) => C (T name string) Source # | |
formatListBlankHead :: (Attribute name, C string) => [T name string] -> ShowS Source #
Each attribute is preceded by a space, that is there is a space between adjacent attributes and one leading space.
Instances
Eq ident => Eq (Name ident) Source # | |
Ord ident => Ord (Name ident) Source # | |
Show ident => Show (Name ident) Source # | |
Attribute ident => C (Name ident) Source # | |
versionName :: Attribute name => Name name Source #
encodingName :: Attribute name => Name name Source #
attribute lists
mapValuesA :: Applicative f => (str0 -> f str1) -> [T name str0] -> f [T name str1] Source #
adjustOn :: (Name name -> Bool) -> (string -> string) -> [T name string] -> [T name string] Source #
Process specific attributes of an attribute list. The function name is inspired by Data.Map.
adjustOnA :: Applicative f => (Name name -> Bool) -> (string -> f string) -> [T name string] -> f [T name string] Source #
insertWith :: Attribute name => (string -> string -> string) -> Name name -> string -> [T name string] -> [T name string] Source #
Insert an attribute into an attribute list.
If an attribute with the same name is already present,
then the value of this attribute is changed to f newValue oldValue
.
The function name is analogous to Data.Map.