monomer-1.0.0.0: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Monomer.Helper

Description

Helper functions used across the library. Do not belong to any specifig module and are not directly exported.

Synopsis

Documentation

maybeConcat :: Monoid a => [a] -> Maybe a Source #

Concats a list of Monoids or returns Nothing if empty.

seqLast :: Seq a -> a Source #

Returns the last item in a sequence. Unsafe, fails if sequence is empty.

seqStartsWith :: Eq a => Seq a -> Seq a -> Bool Source #

Checks if the first sequence is a prefix of the second.

seqCatMaybes :: Seq (Maybe a) -> Seq a Source #

Filters Nothing instances out of a Seq, and removes the Just wrapper.

maxNumericValue :: RealFloat a => a Source #

Returns the maximum value of a given floating type.

clamp :: Ord a => a -> a -> a -> a Source #

Restricts a value to a given range.