reflex-0.8.1.1: Higher-order Functional Reactive Programming
Safe HaskellNone
LanguageHaskell2010

Reflex.Dynamic.TH

Description

Template Haskell helper functions for building complex Dynamic values.

Synopsis

Documentation

qDynPure :: Q Exp -> Q Exp Source #

Quote a Dynamic expression. Within the quoted expression, you can use $(unqDyn [| x |]) to refer to any expression x of type Dynamic t a; the unquoted result will be of type a

unqDyn :: Q Exp -> Q Exp Source #

Antiquote a Dynamic expression. This can only be used inside of a qDyn quotation.

mkDynPure :: QuasiQuoter Source #

Create a Dynamic value using other Dynamics as inputs. The result is sometimes more concise and readable than the equivalent Applicative-based expression. For example:

[mkDyn| $x + $v * $t + 1/2 * $a * $t ^ 2 |]

would have a very cumbersome Applicative encoding.