tamarin-prover-utils-1.2.2: Utility library for the tamarin prover.

Copyright | (c) 2012 Simon Meier
License | GPL v3 (see LICENSE)
Maintainer | Simon Meier <iridcode@gmail.com>
Safe Haskell | Safe
Language | Haskell98

Extension.Data.Monoid

Description

A variant of Data.Monoid that also exports '(<>)' for `mappend`.

Synopsis

- module Data.Monoid
- newtype MinMax a = MinMax {
  - getMinMax :: Maybe (a, a)
  }
- minMaxSingleton :: a -> MinMax a

# Documentation

module Data.Monoid

newtype MinMax a #

A newtype wrapper around `Maybe` that returns a tuple of the minimum and maximum value encountered, if there was any.

Constructors

MinMax |
Fields getMinMax :: Maybe (a, a)

Instances

Ord a => Monoid (MinMax a) # |
Methods mempty :: MinMax a # mappend :: MinMax a -> MinMax a -> MinMax a # mconcat :: [MinMax a] -> MinMax a #

minMaxSingleton :: a -> MinMax a #

Construct a `MinMax` value from a singleton value.