lol-0.6.0.0: A library for lattice cryptography.

Copyright(c) Eric Crockett 2011-2017
Chris Peikert 2011-2017
LicenseGPL-2
Maintainerecrockett0@email.com
Stabilityexperimental
PortabilityPOSIX \( \def\C{\mathbb{C}} \)
Safe HaskellSafe
LanguageHaskell2010

Crypto.Lol.Utils.GenArgs

Description

Classes used to generate arguments for tests and benchmarks. This is analagous to Arbitrary in quickcheck, except it can also be used with criterion.

Synopsis

Documentation

type family ResultOf a where ... Source #

Type of the output of a fully-applied function.

Equations

ResultOf (a -> b) = ResultOf b 
ResultOf a = a 

class GenArgs fun where Source #

Generalization of Testable from QuickCheck: generates function inputs

Minimal complete definition

genArgs

Methods

genArgs :: MonadRandom rnd => fun -> rnd (ResultOf fun) Source #

Instances

(Random a, GenArgs b) => GenArgs (a -> b) Source #

Generate arguments to a function.

Methods

genArgs :: MonadRandom rnd => (a -> b) -> rnd (ResultOf (a -> b)) Source #