-- | -- Module: WildBind.Description -- Description: Types about ActionDescription -- Maintainer: Toshio Ito <debug.ito@gmail.com> -- module WildBind.Description ( ActionDescription , Describable (..) ) where import Data.Text (Text) -- | Human-readable description of an action. 'ActionDescription' is -- used to describe the current binding to the user. type ActionDescription = Text -- | Class for something describable. class Describable d where describe :: d -> ActionDescription -- | @since 0.1.1.0 instance (Describable a, Describable b) => Describable (Either a b) where describe :: Either a b -> ActionDescription describe = forall a c b. (a -> c) -> (b -> c) -> Either a b -> c either forall d. Describable d => d -> ActionDescription describe forall d. Describable d => d -> ActionDescription describe