úÎuÊm≠     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ(c) Sjoerd Visscher 2014 BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portable TrustworthyKQV9´/ Variant of / that does multiplication of the constants for <*> and addition for <|>.aA variant of Test.QuickCheck.Gen, with failure and a count of the number of recursive positions.8Return a generator of values of a given depth. Returns ‰M if there are no values of that depth or deeper. The depth is the number of  calls. Natural transformations flips the <|> operator from Š.An  changes the way an  unfolds.JLift a computation from the argument unfolder to the constructed unfolder.iUnfolders provide a way to unfold data structures. The methods have default implementations in terms of Š, but you can implement s to act on recursive positions of the data structure, or simply to provide a faster implementation than 'foldr (( |) . f) empty'.'Choose one of the values from the list.DChoose one of the values from the list and apply the given function.Given a number n, return a number between '0' and 'n - 1'.If an unfolder is monadic,  can be implemented in terms of . If an unfolder is monadic,  can be implemented in terms of .!(If a datatype is enumerable, we can use y to generate a value. This is the function to use if you want to unfold a datatype that has no type arguments (has kind *)."IIf a datatype is also bounded, we can choose between all possible values. 'boundedEnum = between minBound maxBound## uses ± to generate a value. It chooses between the lower bound and one of the higher values. This means that f.e. breadth-first unfolding and arbitrary will prefer lower values.$ )boundedEnumD = betweenD minBound maxBound%5Run an unfolding function with one argument using an %, given a way to run the transformer.&6Run an unfolding function with two arguments using an %, given a way to run the transformer.'8Run an unfolding function with three arguments using an %, given a way to run the transformer.(!Apply a certain function of type  f a -> f a to the result of a . The depth is passed as ‹E, so you can apply a different function at each depth. Because of a forall(, the function needs to be wrapped in a   constructor. See )) for an example how to use this function.) Limit the depth of an unfolding.*VChange the order of unfolding to be breadth-first, by maximum depth of the components.+ZChange the order of unfolding to be breadth-first, by the sum of depths of the components.-"Don't choose but return all items..Derived instance./Derived instance.0Derived instance.1Derived instance.2Derived instance.3Derived instance.4Derived instance.5Derived instance.6Derived instance.7Derived instance.8Derived instance.9Derived instance.:Always choose the first item.;"Don't choose but return all items.<Derived instance.=Derived instance.>Choose randomly.F"Reverse the list passed to choose.INApplies a certain function depending on the depth at every recursive position.K,Choose between values of a given depth only.OqLimit the depth of the generated data structure by dividing the given size by the number of recursive positions.S@Unfolds to a constant numeric value. Useful for counting shapes.-  !"#$%&'()*+,- !#"$,%&'  ()*+    (c) Sjoerd Visscher 2014 BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe7<NSThXác%Data structures that can be unfolded.For example, given a data type 7data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)a suitable instance would be Šinstance Unfoldable Tree where unfold fa = choose [ pure Empty , Leaf <$> fa , Node <$> unfold fa <*> fa <*> unfold fa ])i.e. it follows closely the instance for Œ1, but instead of matching on an input value, we  from a list of all cases. Instead of manually writing the c instance, you can add a deriving " to your datatype and declare an c* instance without giving a definition for d.;For example the previous example can be simplified to just: ˜{-# LANGUAGE DeriveGeneric #-} import GHC.Generics data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a) deriving Generic1 instance Unfoldable Treed`Given a way to generate elements, return a way to generate structures containing those elements.e#Unfold the structure, always using () as elements.f?Breadth-first unfold, which orders the result by the number of  calls.g1Unfold the structure breadth-first, always using () as elements.hunfoldrC builds a data structure from a seed value. It can be specified as: /unfoldr f z == fromList (Data.List.unfoldr f z)i½Create a data structure using the list as input. This can fail because there might not be a data structure with the same number of element positions as the number of elements in the list.j$Always choose the first constructor.k#Always choose the last constructor.l$Generate all the values depth-first.m8Generate all the values upto a given depth, depth-first.n&Generate all the values breadth-first.o=Generate a random value, can be used as default instance for Ž.pEProvides a QuickCheck generator, can be used as default instance for .cdefghijklmnopcddefghijklmnopcdd(c) Sjoerd Visscher 2014 BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafem‹ },Data structures with 2 type arguments (kind  * -> * -> *) that can be unfolded.For example, given a data type =data Tree a b = Empty | Leaf a | Node (Tree a b) b (Tree a b)a suitable instance would be ›instance Biunfoldable Tree where biunfold fa fb = choose [ pure Empty , Leaf <$> fa , Node <$> biunfold fa fb <*> fb <*> biunfold fa fb ])i.e. it follows closely the instance for  Bitraversable1, but instead of matching on an input value, we  from a list of all cases.~`Given a way to generate elements, return a way to generate structures containing those elements.#Unfold the structure, always using () as elements.€?Breadth-first unfold, which orders the result by the number of  calls.1Unfold the structure breadth-first, always using () as elements.‚ biunfoldr+ builds a data structure from a seed value.ƒ¿Create a data structure using the lists as input. This can fail because there might not be a data structure with the same number of element positions as the number of elements in the lists.„=Generate a random value, can be used as default instance for Ž.…EProvides a QuickCheck generator, can be used as default instance for . }~€‚ƒ„… }~€‚ƒ„…}~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€mn‚ƒ„…†‡…†ˆ‰Š‹…Œ…Ž‘’“”•'unfoldable-0.9.6-2JjX6B30QfGLhnOc7NXjuN Data.UnfolderData.UnfoldableData.Biunfoldable Data.FunctorConstantNumConst getNumConstArbSplitBFSgetBFSWithRec getWithRecNTgetNTDualAgetDualAUnfolderTransformerliftNthsizegetNthRandom getRandomUnfolderchoose chooseMap chooseIntchooseMonadDefaultchooseMapMonadDefaultbetween boundedEnumbetweenD boundedEnumDalaala2ala3withRec limitDepthbfsbfsBySumarbUnit $fUnfolderSeq$fUnfolderWriterT$fUnfolderReaderT$fUnfolderStateT$fUnfolderRWST$fUnfolderMaybeT$fUnfolderListT$fUnfolderExceptT$fUnfolderLift$fUnfolderBackwards$fUnfolderReverse$fUnfolderCompose$fUnfolderProduct$fUnfolderMaybe $fUnfolder[]$fUnfolderWrappedArrow$fUnfolderWrappedMonad$fUnfolderRandom$fMonadPlusRandom$fAlternativeRandom $fUnfolderNth$fAlternativeNth$fApplicativeNth $fFunctorNth$fUnfolderTransformerDualA$fUnfolderDualA$fAlternativeDualA$fUnfolderTransformerWithRec$fUnfolderWithRec$fUnfolderTransformerBFS $fUnfolderBFS$fAlternativeBFS$fApplicativeBFS $fFunctorBFS $fUnfolderArb$fAlternativeArb$fApplicativeArb $fFunctorArb$fUnfolderNumConst$fAlternativeNumConst$fApplicativeNumConst$fFunctorNumConst$fFunctorRandom$fApplicativeRandom $fMonadRandom $fEqDualA $fShowDualA$fFunctorDualA$fApplicativeDualA$fFunctorWithRec$fApplicativeWithRec$fAlternativeWithRec $fEqNumConst$fShowNumConst Unfoldableunfoldunfold_unfoldBF unfoldBF_unfoldrfromListleftMost rightMost allDepthFirst allToDepthallBreadthFirst randomDefaultarbitraryDefault$fUnfoldableTree$fUnfoldableSeq$fUnfoldableReverse$fUnfoldableCompose$fUnfoldableSum$fUnfoldableProduct$fUnfoldableConstant$fUnfoldableIdentity$fUnfoldable(,)$fUnfoldableEither$fUnfoldableMaybe$fUnfoldable[] Biunfoldablebiunfold biunfold_ biunfoldBF biunfoldBF_ biunfoldr fromLists$fBiunfoldableConstant$fBiunfoldable(,)$fBiunfoldableEitherbaseGHC.BaseNothing Alternativeghc-prim GHC.TypesIntData.Traversable Traversable GHC.GenericsGeneric1!random-1.1-LLUGZ7T9DqQ5vN0Jbcd0We System.Random(QuickCheck-2.11.3-E9Q5I9wxgdm1jw5FzS21j6Test.QuickCheck.Arbitrary Arbitrary