chalmers-lava2000-1.6.1: Hardware description EDSL

Safe HaskellNone
LanguageHaskell98

Lava.Property

Documentation

data Gen a #

Instances

Monad Gen # 

Methods

(>>=) :: Gen a -> (a -> Gen b) -> Gen b #

(>>) :: Gen a -> Gen b -> Gen b #

return :: a -> Gen a #

fail :: String -> Gen a #

Functor Gen # 

Methods

fmap :: (a -> b) -> Gen a -> Gen b #

(<$) :: a -> Gen b -> Gen a #

Applicative Gen # 

Methods

pure :: a -> Gen a #

(<*>) :: Gen (a -> b) -> Gen a -> Gen b #

(*>) :: Gen a -> Gen b -> Gen b #

(<*) :: Gen a -> Gen b -> Gen a #

Checkable a => Checkable (Gen a) # 

Methods

property :: Gen a -> Property #

generate :: Gen a -> IO a #

class ChoiceWithSig a #

Minimal complete definition

ifThenElseWithSig

Instances

ChoiceWithSig Bool # 

Methods

ifThenElseWithSig :: Choice b => Signal Bool -> (b, b) -> b

class Fresh a where #

Minimal complete definition

fresh

Methods

fresh :: Gen a #

Instances

Fresh () # 

Methods

fresh :: Gen () #

ConstructiveSig a => Fresh (Signal a) # 

Methods

fresh :: Gen (Signal a) #

(CoFresh a, Choice b, Fresh b) => Fresh (a -> b) # 

Methods

fresh :: Gen (a -> b) #

(Fresh a, Fresh b) => Fresh (a, b) # 

Methods

fresh :: Gen (a, b) #

(Fresh a, Fresh b, Fresh c) => Fresh (a, b, c) # 

Methods

fresh :: Gen (a, b, c) #

(Fresh a, Fresh b, Fresh c, Fresh d) => Fresh (a, b, c, d) # 

Methods

fresh :: Gen (a, b, c, d) #

(Fresh a, Fresh b, Fresh c, Fresh d, Fresh e) => Fresh (a, b, c, d, e) # 

Methods

fresh :: Gen (a, b, c, d, e) #

(Fresh a, Fresh b, Fresh c, Fresh d, Fresh e, Fresh f) => Fresh (a, b, c, d, e, f) # 

Methods

fresh :: Gen (a, b, c, d, e, f) #

(Fresh a, Fresh b, Fresh c, Fresh d, Fresh e, Fresh f, Fresh g) => Fresh (a, b, c, d, e, f, g) # 

Methods

fresh :: Gen (a, b, c, d, e, f, g) #

class CoFresh a where #

Minimal complete definition

cofresh

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen (a -> b) #

Instances

CoFresh () # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen (() -> b) #

CoFresh a => CoFresh [a] # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen ([a] -> b) #

ChoiceWithSig a => CoFresh (Signal a) # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen (Signal a -> b) #

(Finite a, CoFresh b) => CoFresh (a -> b) # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen ((a -> b) -> b) #

(CoFresh a, CoFresh b) => CoFresh (a, b) # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen ((a, b) -> b) #

(CoFresh a, CoFresh b, CoFresh c) => CoFresh (a, b, c) # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen ((a, b, c) -> b) #

(CoFresh a, CoFresh b, CoFresh c, CoFresh d) => CoFresh (a, b, c, d) # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen ((a, b, c, d) -> b) #

(CoFresh a, CoFresh b, CoFresh c, CoFresh d, CoFresh e) => CoFresh (a, b, c, d, e) # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen ((a, b, c, d, e) -> b) #

(CoFresh a, CoFresh b, CoFresh c, CoFresh d, CoFresh e, CoFresh f) => CoFresh (a, b, c, d, e, f) # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen ((a, b, c, d, e, f) -> b) #

(CoFresh a, CoFresh b, CoFresh c, CoFresh d, CoFresh e, CoFresh f, CoFresh g) => CoFresh (a, b, c, d, e, f, g) # 

Methods

cofresh :: (Choice b, Fresh b) => Gen b -> Gen ((a, b, c, d, e, f, g) -> b) #

double :: Gen a -> Gen (a, a) #

triple :: Gen a -> Gen (a, a, a) #

list :: Fresh a => Int -> Gen [a] #

listOf :: Int -> Gen a -> Gen [a] #

results :: Int -> Gen (a -> b) -> Gen (a -> [b]) #

sequential :: (CoFresh a, Fresh b, Choice b) => Int -> Gen (a -> b) #

forAll :: (ShowModel a, Checkable b) => Gen a -> (a -> b) -> Property #

newtype Property #

Constructors

P (Gen ([Signal Bool], Model -> [[String]])) 

Instances

class Checkable a where #

Minimal complete definition

property

Methods

property :: a -> Property #

Instances

Checkable Bool # 

Methods

property :: Bool -> Property #

Checkable Property # 
Checkable a => Checkable [a] # 

Methods

property :: [a] -> Property #

Checkable a => Checkable (Signal a) # 

Methods

property :: Signal a -> Property #

Checkable a => Checkable (Gen a) # 

Methods

property :: Gen a -> Property #

(Fresh a, ShowModel a, Checkable b) => Checkable (a -> b) # 

Methods

property :: (a -> b) -> Property #

class ShowModel a where #

Minimal complete definition

showModel

Methods

showModel :: Model -> a -> [String] #

Instances

ShowModel () # 

Methods

showModel :: Model -> () -> [String] #

ShowModel a => ShowModel [a] # 

Methods

showModel :: Model -> [a] -> [String] #

ShowModel (Signal a) # 

Methods

showModel :: Model -> Signal a -> [String] #

ShowModel (a -> b) # 

Methods

showModel :: Model -> (a -> b) -> [String] #

(ShowModel a, ShowModel b) => ShowModel (a, b) # 

Methods

showModel :: Model -> (a, b) -> [String] #

(ShowModel a, ShowModel b, ShowModel c) => ShowModel (a, b, c) # 

Methods

showModel :: Model -> (a, b, c) -> [String] #

(ShowModel a, ShowModel b, ShowModel c, ShowModel d) => ShowModel (a, b, c, d) # 

Methods

showModel :: Model -> (a, b, c, d) -> [String] #

(ShowModel a, ShowModel b, ShowModel c, ShowModel d, ShowModel e) => ShowModel (a, b, c, d, e) # 

Methods

showModel :: Model -> (a, b, c, d, e) -> [String] #

(ShowModel a, ShowModel b, ShowModel c, ShowModel d, ShowModel e, ShowModel f) => ShowModel (a, b, c, d, e, f) # 

Methods

showModel :: Model -> (a, b, c, d, e, f) -> [String] #

(ShowModel a, ShowModel b, ShowModel c, ShowModel d, ShowModel e, ShowModel f, ShowModel g) => ShowModel (a, b, c, d, e, f, g) # 

Methods

showModel :: Model -> (a, b, c, d, e, f, g) -> [String] #

type Model = [(String, [String])] #

properties :: Checkable a => a -> IO ([Signal Bool], Model -> [[String]]) #