Copyright | (c) Conal Elliott 2007 |
---|---|
License | BSD3 |
Maintainer | conal@conal.net |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Generic titling (labeling).
Documentation
Provide a title on a value. If you can title polymorphically, please
instantiate Title_f
instead of Title. Then you'll automatically
get a Title
for each type instance, thanks to this rule.
instance Title_f f => Title (f a) where title = title_f
To handle ambiguity for types like ([] Char)
-- aka String
, this
module is compiled with OverlappingInstances
and
UndecidableInstances
. The more specific instance (yours) wins.
In defining your instance, you might want to use the String instance,
e.g., title ttl ""
.