HGL-3.2.0.2: A simple graphics library based on X11 or Win32Source codeContentsIndex
Graphics.HGL.Draw.Monad
Portabilitynon-portable (requires concurrency)
Stabilityprovisional
Maintainerlibraries@haskell.org
Description
The Draw monad, with graphical objects as a special case.
Synopsis
type Graphic = Draw ()
data Draw a
ioToDraw :: IO a -> Draw a
bracket :: Draw a -> (a -> Draw b) -> (a -> Draw c) -> Draw c
bracket_ :: Draw a -> (a -> Draw b) -> Draw c -> Draw c
Documentation
type Graphic = Draw ()Source
An abstract representation of an image.
data Draw a Source
Monad for sequential construction of images.
ioToDraw :: IO a -> Draw aSource
Embed an IO action in a drawing action.
bracketSource
::
=> Draw aa post-operation, to be performed on exit from the bracket, whether normal or by an exception.
-> a -> Draw bthe drawing action inside the bracket.
-> a -> Draw c
-> Draw c
Wrap a drawing action in initialization and finalization actions.
bracket_Source
::
=> Draw aa post-operation, to be performed on exit from the bracket, whether normal or by an exception.
-> a -> Draw bthe drawing action inside the bracket.
-> Draw c
-> Draw c
A variant of bracket in which the inner drawing action does not use the result of the pre-operation.
Produced by Haddock version 2.6.0