Safe Haskell | Safe-Inferred |
---|

Write-only attributes.

- data Assignment a
- = forall f b . HasAttribute f a => (f b) := b
- | forall f b . HasAttribute f a => (f b) :~ (b -> b)

- class HasAttribute f a where
- modifyAttribute :: f b -> (b -> b) -> a -> a
- setAttribute :: f b -> b -> a -> a

- with :: a -> [Assignment a] -> a

# Documentation

data Assignment a Source

Representation of an attribute update for an element of type `a`

.

forall f b . HasAttribute f a => (f b) := b | Set an attribute |

forall f b . HasAttribute f a => (f b) :~ (b -> b) | Modify an attribute |

class HasAttribute f a whereSource

The type constructor `f`

is such that `f b`

is the type of names of
attributes of `a`

of type `b`

.

modifyAttribute :: f b -> (b -> b) -> a -> aSource

setAttribute :: f b -> b -> a -> aSource

with :: a -> [Assignment a] -> aSource

Apply a sequence of attribute assignments to an object (applied left-to-right).