andM -package:tasty-silver
A version of
and lifted to a monad. Retains the
short-circuiting behaviour.
andM [Just True,Just False,undefined] == Just False
andM [Just True,Just True ,undefined] == undefined
\xs -> Just (and xs) == andM (map Just xs)
A generalization of
andM to
Foldable instances. Retains
the short-circuiting behaviour.
short-circuit
and for values of type Monad m => m Bool
Monadic version of
and.
>>> andM [Just True, Just False]
Just False
>>> andM [Just True]
Just True
>>> andM [Just True, Just False, Nothing]
Just False
>>> andM [Just True, Nothing]
Nothing
>>> andM [putTextLn "1" >> pure True, putTextLn "2" >> pure False, putTextLn "3" >> pure True]
1
2
False
Isomorphic to
(a, Maybe b), it’s also the pattern
functor for non-empty lists.
Add a fixed landmark message to the error context. A landmark message
is always sure to be reported, even if there is a lot of context. It
also doesn't count toward the maximum number of contexts reported.
Type intended to be used with
Parseable, with instances that
implement a non-greedy parse of the module name, including top-level
pragmas. This means that a parse error that comes after the module
header won't be returned. If the
Maybe value is
Nothing,
then this means that there was no module header.
Creates a pixmap and a mask bitmap which are returned and renders a
pixbuf and its corresponding thresholded alpha mask to them. This is
merely a convenience function; applications that need to render
pixbufs with dither offsets or to given drawables should use
drawPixbuf, and
pixbufRenderThresholdAlpha.
The pixmap that is created uses the
Colormap specified by
colormap. This colormap must match the colormap of the window where
the pixmap will eventually be used or an error will result.
If the pixbuf does not have an alpha channel, then the returned mask
will be
Nothing.
Removed in Gtk3.
Equivalent to
decodeImage, but also provide potential metadatas
present in the given file and the palettes if the format provides
them.
Same as
decodeBitmap but also extracts metadata and provide
separated palette.
Return the gif image with metadata and palette. The palette is only
returned for the first image of an animation and has no transparency.
Same as
decodePng but also extract meta datas present in the
files.
Equivalent to decodeTga but with metdata and palette if any