h*?=-      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1.5  Safe-Inferred  Safe-Inferred/0!{haskus-utils-data"Bottom-up traversal (catamorphism)|haskus-utils-data6Bottom-up traversal with original value (paramorphism)}haskus-utils-dataPerform a top-down traversalRight: stop the traversal ("right" value obtained) Left: continue the traversal recursively on the new valuez{y|x} "!#$%&(')*+,-12830./45679:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\wvutsrqponmlkjighefcd`ab]^_~z{y|x} "!#$%&(')*+,-12830./45679:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\wvutsrqponmlkjighefcd`ab]^_~ Safe-Inferred9; haskus-utils-dataAn infinite listhaskus-utils-dataConvert to a standard listhaskus-utils-dataTake for infinite listhaskus-utils-dataRepeat for infinite listhaskus-utils-dataReplicate for infinite list Safe-Inferredhaskus-utils-dataSafely index into a list[0,1,2,3] `at` 10Nothing[0,1,2,3] `at` 2Just 2haskus-utils-dataUnsafe a[0,1,2,3] `unsafeAt` 22haskus-utils-data?Check that a list has the given length (support infinite lists)haskus-utils-data Replicatehaskus-utils-dataTakehaskus-utils-dataLengthhaskus-utils-dataDrophaskus-utils-dataApply some operation repeatedly, producing an element of output and the remainder of the list.haskus-utils-dataSplit a list into chunks of a given size. The last chunk may contain fewer than n elements.chunksOf 3 "my test"["my ","tes","t"]chunksOf 3 "mytest" ["myt","est"] chunksOf 8 ""[] > chunksOf 0 "test" undefinedhaskus-utils-dataPick each element and return the element and the rest of the listpick1 [1,2,3,4]1[(1,[2,3,4]),(2,[1,3,4]),(3,[1,2,4]),(4,[1,2,3])]haskus-utils-data'Get members of a bounded enum in a list:seti -XTypeApplications9data Letters = A | B | C | D deriving (Bounded,Enum,Show)enumList @Letters [A,B,C,D]haskus-utils-data1Zip left with something extracted from each valuezipLeftWith odd [0..5]:[(False,0),(True,1),(False,2),(True,3),(False,4),(True,5)]haskus-utils-data2Zip right with something extracted from each valuezipRightWith odd [0..5]:[(0,False),(1,True),(2,False),(3,True),(4,False),(5,True)]haskus-utils-data A version of nub8 where the equality is done on some extracted value. nubOn f is equivalent to  nubBy ((==)  f):, but has the performance advantage of only evaluating f, once for each element in the input list.haskus-utils-data A version of group4 where the equality is done on some extracted value.haskus-utils-data n xs( returns a tuple where first element is xs prefix of length n1 and second element is the remainder of the list: splitAt 6 "Hello World!" == ("Hello ","World!") splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5]) splitAt 1 [1,2,3] == ([1],[2,3]) splitAt 3 [1,2,3] == ([1,2,3],[]) splitAt 4 [1,2,3] == ([1,2,3],[]) splitAt 0 [1,2,3] == ([],[1,2,3]) splitAt (-1) [1,2,3] == ([],[1,2,3])It is equivalent to ( n xs,  n xs) when n is not _|_ (splitAt _|_ xs = _|_).haskus-utils-dataBreak a list into pieces separated by the first list argument, consuming the delimiter. An empty delimiter is invalid, and will cause an error to be raised. splitOn "\r\n" "a\r\nb\r\nd\r\ne" == ["a","b","d","e"] splitOn "aaa" "aaaXaaaXaaaXaaa" == ["","X","X","X",""] splitOn "x" "x" == ["",""] splitOn "x" "" == [""] \s x -> s /= "" ==> intercalate s (splitOn s x) == x \c x -> splitOn [c] x == split (==c) xhaskus-utils-dataSplits a list into components delimited by separators, where the predicate returns True for a separator element. The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. split (== 'a') "aabbaca" == ["","","bb","c",""] split (== 'a') "" == [""] split (== ':') "::xyz:abc::123::" == ["","","xyz","abc","","123","",""] split (== ',') "my,list,here" == ["my","list","here"]haskus-utils-dataFind the first instance of needle in haystack=. The first element of the returned tuple is the prefix of haystack before needle. is matched. The second is the remainder of haystack6, starting with the match. If you want the remainder without the match, use  stripInfix. breakOn "::" "a::b::c" == ("a", "::b::c") breakOn "/" "foobar" == ("foobar", "") \needle haystack -> let (prefix,match) = breakOn needle haystack in prefix ++ match == haystack/    /      Safe-Inferred  Safe-Inferred Safe-Inferredhaskus-utils-dataFlipped haskus-utils-dataFlipped haskus-utils-datafromMaybe in a Monadhaskus-utils-data3Get the head of the list if the latter is not empty Safe-Inferred&3 haskus-utils-data0Lift with*-like functions into IO (alloca, etc.)haskus-utils-data0Lift with*-like functions into IO (alloca, etc.)haskus-utils-data+Keep running an operation until it becomes . As an example: whileM $ do sleep 0.1; notM $ doesFileExist "foo.txt" readFile "foo.txt" 8If you need some state persisted between each test, use .haskus-utils-data1A looping operation, where the predicate returns # as a seed for the next loop or  to abort the loop. loop (\x -> if x < 10 then Left $ x * 2 else Right $ show x) 1 == "16"haskus-utils-dataA monadic version of , where the predicate returns # as a seed for the next loop or  to abort the loop.haskus-utils-dataLike $, but where the test can be monadic.haskus-utils-dataLike $, but where the test can be monadic.haskus-utils-dataLike if$, but where the test can be monadic.haskus-utils-dataLike $, but where the test can be monadic.haskus-utils-data A version of ; lifted to a monad. Retains the short-circuiting behaviour. anyM Just [False,True ,undefined] == Just True anyM Just [False,False,undefined] == undefined \(f :: Int -> Maybe Bool) xs -> anyM f xs == orM (map f xs)haskus-utils-data A version of ; lifted to a monad. Retains the short-circuiting behaviour. allM Just [True,False,undefined] == Just False allM Just [True,True ,undefined] == undefined \(f :: Int -> Maybe Bool) xs -> anyM f xs == orM (map f xs)haskus-utils-data A version of ; lifted to a monad. Retains the short-circuiting behaviour. orM [Just False,Just True ,undefined] == Just True orM [Just False,Just False,undefined] == undefined \xs -> Just (or xs) == orM (map Just xs)haskus-utils-data A version of ; lifted to a monad. Retains the short-circuiting behaviour. andM [Just True,Just False,undefined] == Just False andM [Just True,Just True ,undefined] == undefined \xs -> Just (and xs) == andM (map Just xs)> Safe-Inferred 01* haskus-utils-data Unboxed tupleTODO: put this family into GHChaskus-utils-data Boxed tupleTODO: put this family into GHChaskus-utils-dataCreate a Tuplehaskus-utils-dataCreate a Tuplehaskus-utils-dataReorder tuple elementshaskus-utils-dataReorder tuple elementshaskus-utils-data Extract a tuple value staticallyhaskus-utils-data)Extract a tuple value by type-level indexhaskus-utils-dataUncurry3haskus-utils-dataUncurry4haskus-utils-dataUncurry5haskus-utils-dataUncurry6haskus-utils-dataUncurry7haskus-utils-dataTake specialised for quadruplehaskus-utils-datatoList for quadruplehaskus-utils-dataGet first element of the tuple Safe-Inferred/16- haskus-utils-data!Convert between hlists and tupleshaskus-utils-data*Convert an heterogeneous list into a tuplehaskus-utils-data*Convert a tuple into an heterogeneous listhaskus-utils-data+Like HFoldl but only use types, not values!It allows us to foldl over a list of types, without any associated hlist of values.haskus-utils-data+Like HFoldr but only use types, not values!It allows us to foldr over a list of types, without any associated hlist of values.haskus-utils-dataApply the function identified by the data type f from type a to type b.haskus-utils-dataHeterogeneous listhaskus-utils-dataHeadhaskus-utils-dataTailhaskus-utils-dataLength2            ! " # $ % & ' ( ) * + , - . / 0 1 234534634734834934:34;34<34=34>34?34@34A34B34C34D34E34F34G34H34I34J34K34L34M34N34O34P34Q34R34S34T34U34V34W34X34Y34Z34[34\34]34^34_34`34a34b34c34d34e34f34g34h34i34j34k34l34m34n34o34p34qrstuvwxyz{|}~                                                                F&*                                                                   ,haskus-utils-data-1.5-IZLna9R6HbWK2qO053KBfoHaskus.Utils.ListHaskus.Utils.TupleHaskus.Utils.FunctorHaskus.Utils.InfListHaskus.Utils.MaybeHaskus.Utils.MonadHaskus.Utils.HListhaskus-utils-dataHaskus.Utils.EitherHaskus.Utils.MapHaskus.Utils.Map.StrictbaseGHC.Base++ghc-primGHC.Tuple.PrimSoloMkSolo GHC.TupleGHC.Listheadtailrepeatzip3zipWith Data.Foldablefoldl'elemnotElemfind Data.OldList stripPrefix isPrefixOf isSuffixOfnubnubBydeleteBy\\ intersect intersperse transpose partitionzip4zip5zip6zip7groupBysortsortBysortOn.recursion-schemes-5.2.3-6eBF5NqJTcy4NueHzl55qPData.Functor.Foldable Corecursiveembedanaapopostprogpostpro RecursiveprojectcataparagparapreprogpreproBasedistPara distParaThylofoldunfoldrefoldgcatagfolddistCataganagunfolddistAnaghylogrefoldfutugfutudistFutu distGFutuhoistrefixzygodistZygogzygo distZygoTgapodistApodistGApo distGApoThistoghisto distHisto distGHistochronogchronomcatamparamzygomhistomanamapomfutuelgotcoelgotzygoHistoPreprocataA transverse cotransverse HCorecursivehembedhana HRecursivehprojecthcata HTraversable htraverse HFoldablehfoldMapHFunctorhfmap HGCoalgebraM HGCoalgebra HCoalgebraM HCoalgebra HGAlgebraM HGAlgebra HAlgebraMHAlgebraHBaseNatM~> RCoAlgebraRAlgebra CoAlgebraAlgebra TopDownStopT BottomUpOrigT BottomUpTbottomUp bottomUpOrig topDownStophhylohcataMhlambekhparahparaMhanaM hcolambekhapohapoMhhyloMInfList:>toListtake replicate$fFunctorInfList$fFoldableInfListatunsafeAt checkLengthlengthdropchunksOfpick1enumList zipLeftWith zipRightWithnubOngroupOnsplitAtsplitOnsplitbreakOn onNothing onNothingM fromMaybeM headMaybe MonadInIOliftWith liftWith2whileMlooploopMwhenMunlessMifMnotManyMallMorMandM$fMonadInIOStateT $fMonadInIOIOTuple#TypeRepsTupleTupleContupleCon ReorderTuple tupleReorder TupleCons tupleCons TupleTail tupleTail ExtractTupletupleNuncurry3uncurry4uncurry5uncurry6uncurry7take4 fromTuple4 tupleHead$fTupleTail(,,,,,)(,,,,)$fTupleTail(,,,,)(,,,)$fTupleTail(,,,)(,,)$fTupleTail(,,)(,)$fTupleTail(,)Solo$fTupleConsa(,,,,)(,,,,,)$fTupleConsa(,,,)(,,,,)$fTupleConsa(,,)(,,,)$fTupleConsa(,)(,,)$fTupleConsaSolo(,)$fReorderTuple(,,,,,,)(,,,,,,)$fReorderTuple(,,,,,,)(,,,,,,)0$fReorderTuple(,,,,,,)(,,,,,,)1$fReorderTuple(,,,,,,)(,,,,,,)2$fReorderTuple(,,,,,,)(,,,,,,)3$fReorderTuple(,,,,,,)(,,,,,,)4$fReorderTuple(,,,,,,)(,,,,,,)5$fReorderTuple(,,,,,)(,,,,,)$fReorderTuple(,,,,,)(,,,,,)0$fReorderTuple(,,,,,)(,,,,,)1$fReorderTuple(,,,,,)(,,,,,)2$fReorderTuple(,,,,,)(,,,,,)3$fReorderTuple(,,,,,)(,,,,,)4$fReorderTuple(,,,,)(,,,,)$fReorderTuple(,,,,)(,,,,)0$fReorderTuple(,,,,)(,,,,)1$fReorderTuple(,,,,)(,,,,)2$fReorderTuple(,,,,)(,,,,)3$fReorderTuple(,,,)(,,,)$fReorderTuple(,,,)(,,,)0$fReorderTuple(,,,)(,,,)1$fReorderTuple(,,,)(,,,)2$fReorderTuple(,,)(,,)$fReorderTuple(,,)(,,)0$fReorderTuple(,,)(,,)1$fReorderTuple(,,)(,,)2$fReorderTuple(,,)(,,)3$fReorderTuple(,)(,)$$fReorderTuple(,,,,,,,,,)(,,,,,,,,,)"$fReorderTuple(,,,,,,,,)(,,,,,,,,) $fReorderTuple(,,,,,,,)(,,,,,,,)$fReorderTuple(,,,,,,)(,,,,,,)6$fReorderTuple(,,,,,)(,,,,,)5$fReorderTuple(,,,,)(,,,,)4$fReorderTuple(,,,)(,,,)3$fReorderTuple(,,)(,,)4$fReorderTuple(,)(,)0$fReorderTupleSoloSolo $fTupleCon: $fTupleCon:0 $fTupleCon:1 $fTupleCon:2 $fTupleCon:3 $fTupleCon:4 $fTupleCon[]$fExtractTuple7:$fExtractTuple6:$fExtractTuple5:$fExtractTuple4:$fExtractTuple3:$fExtractTuple2:$fExtractTuple1:$fExtractTuple0:$fExtractTuple6:0$fExtractTuple5:0$fExtractTuple4:0$fExtractTuple3:0$fExtractTuple2:0$fExtractTuple1:0$fExtractTuple0:0$fExtractTuple5:1$fExtractTuple4:1$fExtractTuple3:1$fExtractTuple2:1$fExtractTuple1:1$fExtractTuple0:1$fExtractTuple4:2$fExtractTuple3:2$fExtractTuple2:2$fExtractTuple1:2$fExtractTuple0:2$fExtractTuple3:3$fExtractTuple2:3$fExtractTuple1:3$fExtractTuple0:3$fExtractTuple2:4$fExtractTuple1:4$fExtractTuple0:4$fExtractTuple1:5$fExtractTuple0:5$fExtractTuple0:6HTuplehToTuple hFromTupleHReversehReverseHZipListhZipListHFoldl'hFoldl'HFoldlhFoldlHFoldr'hFoldr'HFoldrhFoldrApplyapplyhAppendHListHConsHNilhHeadhTailhLength $fShowHList $fShowHList: $fShowHList[]$fHAppendList:l'$fHAppendList[]l2 $fHFoldrfv:r'$fHFoldrfv[]v'$fHFoldr'fv:r'$fHFoldr'fv[]v'$fHFoldlfz[]z' $fHFoldlfz:r$fHFoldl'fz[]z' $fHFoldl'fz:r $fHZipList:::$fHZipList[][][] $fHRevApp:l'z$fHRevApp[]l2l2$fHReversexssx $fHTuple: $fHTuple:0 $fHTuple:1 $fHTuple:2 $fHTuple:3 $fHTuple:4 $fHTuple:5 $fHTuple:6 $fHTuple:7 $fHTuple:8 $fHTuple:9 $fHTuple:10 $fHTuple[] $fOrdHList $fOrdHList0 $fEqHList $fEqHList0 Data.EitherEitherRightLefteitherleftsrightspartitionEithersisLeftisRightfromLeft fromRightData.Functor.ClassesShow2liftShowsPrec2 liftShowList2Read2liftReadsPrec2 liftReadList2 liftReadPrec2liftReadListPrec2Ord2 liftCompare2Eq2liftEq2Show1 liftShowsPrec liftShowListRead1 liftReadsPrec liftReadList liftReadPrecliftReadListPrecOrd1 liftCompareEq1liftEqeq1compare1 readsPrec1 readPrec1liftReadListDefaultliftReadListPrecDefault showsPrec1eq2compare2 readsPrec2 readPrec2liftReadList2DefaultliftReadListPrec2Default showsPrec2 readsDatareadDatareadsUnaryWith readUnaryWithreadsBinaryWithreadBinaryWithshowsUnaryWithshowsBinaryWith readsUnary readsUnary1 readsBinary1 showsUnary showsUnary1 showsBinary1 repeatedly Data.Functiononcontainers-0.6.7Data.Map.InternalMap!elemsassocsfoldrmapfilterfoldlfromListemptymapMaybenullfoldr'lookupadjustData.Map findIndexdeleteunioninsert singletonsizefindMin deleteMinalterminView insertWith!?composeupdateLookupWithKey$Data.Map.Internal.DeprecatedShowTreeshowTree showTreeWith insertWithKeyinsertLookupWithKeymember notMemberlookupLTlookupGTlookupLElookupGEalterFdisjoint lookupMin lookupMaxfindMax deleteMaxunions difference intersection toAscList toDescList fromAscList fromDescListfromDistinctAscListfromDistinctDescList lookupIndexelemAtdeleteAttakeWhileAntitonedropWhileAntitone spanAntitone deleteFindMin deleteFindMaxmaxView splitRootData.Map.Internal.DebugvalidupdatefindWithDefault adjustWithKey updateWithKeyupdateAt updateMin updateMaxupdateMinWithKeyupdateMaxWithKeyminViewWithKeymaxViewWithKey unionsWith unionWith unionWithKey withoutKeysdifferenceWithdifferenceWithKey restrictKeysintersectionWithintersectionWithKey mergeWithKey isSubmapOf isSubmapOfByisProperSubmapOfisProperSubmapOfBy filterWithKeypartitionWithKeymapMaybeWithKeytraverseMaybeWithKey mapEithermapEitherWithKey mapWithKeytraverseWithKeymapAccummapAccumWithKeymapAccumRWithKeymapKeys mapKeysWithmapKeysMonotonic foldrWithKey foldrWithKey' foldlWithKey foldlWithKey'foldMapWithKeykeyskeysSetargSetfromSet fromArgSet fromListWithfromListWithKeyfromAscListWithfromDescListWithfromAscListWithKeyfromDescListWithKey splitLookup insertWith'insertWithKey'insertLookupWithKey' foldWithKeyData.Map.Strict.Internal Data.Maybe fromMaybe GHC.MaybeMaybeNothingJustmaybeisJust isNothingfromJust maybeToList listToMaybe catMaybes GHC.TypesFalsewhen Control.Monadunless GHC.ClassesnotanyallorandFunctorfmap<$Monadreturn>>>>= MonadPlusmzeromplusControl.Monad.Fail MonadFailfailjoinData.TraversablemapMsequenceforMforeverliftMguard=<<liftM2liftM3liftM4liftM5ap Data.FunctorvoidmapM_forM_ sequence_msumfilterM>=><=< mapAndUnzipMzipWithM zipWithM_foldMfoldM_ replicateM replicateM_<$!>mfilterControl.Monad.IO.ClassMonadIOliftIOtransformers-0.6.1.0Control.Monad.Trans.Class MonadTranslift Data.Tupleswapfstuncurrysndcurry