From 7001a61e8fa105cd51715e471d0a682bf23528fd Mon Sep 17 00:00:00 2001 From: Julien Tanguy Date: Wed, 6 May 2015 11:15:04 +0200 Subject: Nixify package & documentation Added quickcheck helper --- test/Crypto/Macaroon/Instances.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/Crypto/Macaroon/Instances.hs b/test/Crypto/Macaroon/Instances.hs index 5d4b062..4e2f39f 100644 --- a/test/Crypto/Macaroon/Instances.hs +++ b/test/Crypto/Macaroon/Instances.hs @@ -23,6 +23,12 @@ import Test.Tasty.QuickCheck import Crypto.Macaroon + +-- | Adjust the size parameter, by transforming it with the given +-- function. +scale :: (Int -> Int) -> Gen a -> Gen a +scale f g = sized (\n -> resize (f n) g) + newtype Url = Url { unUrl :: BS.ByteString } deriving (Show) instance Arbitrary Url where -- cgit v1.2.3