TypeCompose-0.5: Type composition classes & instancesSource codeContentsIndex
Data.Title
Portabilityportable
Stabilityexperimental
Maintainerconal@conal.net
Description
Generic titling (labeling).
Synopsis
class Title u where
title :: String -> u -> u
class Title_f f where
title_f :: String -> f a -> f a
Documentation
class Title u whereSource

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 "".

Methods
title :: String -> u -> uSource
show/hide Instances
Title String
Title a => Title (CxMonoid a)
Title b => Title (a -> b)
class Title_f f whereSource
Methods
title_f :: String -> f a -> f aSource
title for all applications of f
show/hide Instances
Title_f IO
Title o => Title_f (Flip (->) o)
Title_f g => Title_f (g :. f)
Produced by Haddock version 2.3.0