Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
class Primitive a where Source
A Primitive
is the smallest thing can can be rendered in your graphics
system. Some examples are points, lines, triangles and other shapes.
The monad in which rendering calls will take place.
The type of the graphics transformation.
The datatype that holds cached resources such as references to windows, shaders, etc.
data Element m r t where Source
Element is an existential type that can be used to enclose
instances of Primitive in order to contain them all in a heterogeneous list.
m
, r
and t
must be shared with all Primitive instances stored in
the heterogeneous list of Elements.
class Composite a m r t where Source
A Composite
is a type that can be broken down into a list of
transformed primitives.
composite :: a -> [(t, Element m r t)] Source
Break down a Composite
into a heterogeneous list of transformed
primitives.
Composite a m r t => Composite [a] m r t Source | A list is a composite by compositing each element and concatenating the result. |
Composite a m r t => Composite (Maybe a) m r t Source | A Maybe is a composite if its contained type is composite. The result is is the composite of its contained type or an empty list. |
(Monoid t, Composite a m r t) => Composite (t, a) m r t Source | A tuple is a composite if its right type is a composite and the left type is the transform and the transform is a Monoid. In this case the result is the right type transformed by the left type. |
Monoid t => Composite (Element m r t) m r t Source | Any Element is a composite of itself if its transform type is a monoid. |