- getRandom :: Random a => AnyEv a
- getRandomR :: Random a => (a, a) -> AnyEv a
- inferRecordUpdaters :: Name -> Q [Dec]
Random numbers
getRandomR :: Random a => (a, a) -> AnyEv aSource
Get a random number inside the range.
TH helpers
inferRecordUpdaters :: Name -> Q [Dec]Source
Infer updating functions for a record. Given a data declaration
of data Foo = Foo {bar :: String, baz :: Int}
then $(inferRecordUpdaters ''Foo)
will define functions a_bar :: String -> Foo -> Foo
, withBar :: Update String a -> Update Foo a
,
etc. that can be used as convenience updaters.