reflex-0.5: Higher-order Functional Reactive Programming

Safe HaskellNone
LanguageHaskell98

Reflex.Dynamic.TH

Contents

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.

Deprecated functions

qDyn :: Q Exp -> Q Exp Source #

Deprecated: Instead of $(qDyn x), use return $(qDynPure x)

Like qDynPure, but wraps its result monadically using return. This is no longer necessary, due to Dynamic being an instance of Functor.

mkDyn :: QuasiQuoter Source #

Deprecated: Instead of [mkDyn| x |], use return [mkDynPure| x |]

Like mkDynPure, but wraps its result monadically using return. This is no longer necessary, due to Dynamic being an instance of Functor.