Revision 5b11f8db htest/Test/Ganeti/BasicTypes.hs
b/htest/Test/Ganeti/BasicTypes.hs | ||
---|---|---|
73 | 73 |
|
74 | 74 |
-- | Tests the applicative composition law (pure (.) <*> u <*> v <*> w |
75 | 75 |
-- = u <*> (v <*> w)). |
76 |
prop_applicative_composition :: (Result (Fun Int Int))
|
|
77 |
-> (Result (Fun Int Int))
|
|
76 |
prop_applicative_composition :: Result (Fun Int Int)
|
|
77 |
-> Result (Fun Int Int)
|
|
78 | 78 |
-> Result Int |
79 | 79 |
-> Property |
80 | 80 |
prop_applicative_composition u v w = |
... | ... | |
85 | 85 |
-- | Tests the applicative homomorphism law (pure f <*> pure x = pure (f x)). |
86 | 86 |
prop_applicative_homomorphism :: Fun Int Int -> Int -> Property |
87 | 87 |
prop_applicative_homomorphism (Fun _ f) x = |
88 |
((pure f <*> pure x)::Result Int) ==? |
|
89 |
(pure (f x)) |
|
88 |
((pure f <*> pure x)::Result Int) ==? pure (f x) |
|
90 | 89 |
|
91 | 90 |
-- | Tests the applicative interchange law (u <*> pure y = pure ($ y) <*> u). |
92 | 91 |
prop_applicative_interchange :: Result (Fun Int Int) |
Also available in: Unified diff