Copyright | Written by David Himmelstrup |
---|---|
License | Unlicense |
Maintainer | lemmih@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
With animations defined as SVG images over time, it is unfortunately quite easy to write inefficient code where expensive expressions are re-evaluated for every frame even if nothing has changed. This get around this issue, this module defines a global key-value table that can store expensive expressions such that they are evaluated only once.
There is currently no way to clear values from the table and it is your own responsibility to not consume all available memory.
Documentation
Keys can either by any boxed object with identity (to be compared with StableNames) or a primitive type with an Eq instance.