HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulemonoid-extras-0.7.0.2Haskell2010

Data.Monoid.Recommend

A type for representing values with an additional bit saying whether the value is "just a recommendation" (to be used only if nothing better comes along) or a "commitment" (to certainly be used, overriding merely recommended values), along with corresponding Semigroup and Monoid instances.

  • 1 type
  • 1 value
datadata Recommend a
#

A value of type Recommend a consists of a value of type a wrapped up in one of two constructors. The Recommend constructor indicates a "non-committal recommendation"---that is, the given value should be used if no other/better values are available. The Commit constructor indicates a "commitment"---a value which should definitely be used, overriding any Recommended values.

Constructors

Instances10Functor, Foldable, Traversable, Eq, Data, Ord, …