Maintainer | diagrams-discuss@googlegroups.com |
---|---|
Safe Haskell | Safe-Inferred |
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 "committment" (to certainly be
used, overriding merely recommended values), along with
corresponding Semigroup
and Monoid
instances.
- data Recommend a
- getRecommend :: Recommend a -> a
Documentation
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 Recommend
ed values.
getRecommend :: Recommend a -> aSource
Extract the value of type a
wrapped in Recommend a
.