!)c      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab SafeM cdefghijklmNone,-=>?@ACHSUVX~haskus-utils-data"Bottom-up traversal (catamorphism)haskus-utils-data6Bottom-up traversal with original value (paramorphism)haskus-utils-dataPerform a top-down traversalmRight: stop the traversal ("right" value obtained) Left: continue the traversal recursively on the new valuenopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLSRQPONMYXWVUT[Z]\_^`abcdefghijklmnopqrstuvwxyz{|}~l}~|{ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLSRQPONMYXWVUT[Z]\_^zyxwvutsrqponmljkhifgcde`abSafe46ihaskus-utils-dataAn infinite listhaskus-utils-dataConvert to a standard listhaskus-utils-dataTake for infinite listhaskus-utils-dataRepeat for infinite listhaskus-utils-dataReplicate for infinite listSafeXWhaskus-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-dataaApply some operation repeatedly, producing an element of output and the remainder of the list.haskus-utils-data\Split 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-dataAPick 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:set -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/ /   SafeYQ      !"#$% Safe[}&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW  !"#$%Safe_`ahaskus-utils-dataFlipped Xhaskus-utils-dataFlipped haskus-utils-datafromMaybe in a Monadhaskus-utils-data3Get the head of the list if the latter is not emptyYZ[\]^_X`abcSafeHSVX_~ 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 d. As an example: IwhileM $ 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 d# as a seed for the next loop or e to abort the loop. Floop (\x -> if x < 10 then Left $ x * 2 else Right $ show x) 1 == "16"haskus-utils-dataA monadic version of , where the predicate returns d# as a seed for the next loop or e to abort the loop.haskus-utils-dataLike e$, but where the test can be monadic.haskus-utils-dataLike f$, but where the test can be monadic.haskus-utils-dataLike if$, but where the test can be monadic.haskus-utils-dataLike g$, but where the test can be monadic.haskus-utils-data A version of h; 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 i; 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 j; 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 k; 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)<lmnopqrstuvwxyzf{|}~eNone-.=>?@ACFHUVXk<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 tupleNone,.1=>?@ACHUVXkR )haskus-utils-data!Convert between hlists and tuples*haskus-utils-data*Convert an heterogeneous list into a tuple+haskus-utils-data*Convert a tuple into an heterogeneous list0haskus-utils-data+Like HFoldl but only use types, not values!TIt allows us to foldl over a list of types, without any associated hlist of values.4haskus-utils-data+Like HFoldr but only use types, not values!TIt allows us to foldr over a list of types, without any associated hlist of values.8haskus-utils-dataGApply the function identified by the data type f from type a to type b.;haskus-utils-dataHeterogeneous list>haskus-utils-dataHead?haskus-utils-dataTail@haskus-utils-dataLength)*+,-./0123456789:;=<>?@;=<>?@:4501)*+89./6723,-<2                  ! " # $ % & '( ') '* '+ ',-./-./01201301401501601701801901:01;01<01=01>01?01@01A01B01C01D01E01F01G01H01I01J01K01L01M01N01O01P01Q01R01S01T01U01V01W01X01Y01Z01[01\01]01^01_01`01a01b01c01d01e01f01g01h01i01j01k01l01m01m01n01n01o01opqrstuvwxyz{|}~*      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno pq pr ps pt pu pv pw px py pz p{ |} |~ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [      !"#$%&'()*+,-. /012222222222222222222222222222222222 2 2 2222222222 2!2"2#2) 34 56 57 58 3 39 3: 3; 3< 3= 3> 3?-@A B CD-EF G H I J CK L M N O P Q R S TU TV WX WY CZ C[ C\ C] C^ C_ C` Ca Cb Cc Cd Ce Cf Tg h i j k lm n o p q r s t u v wxyzxy{ |} |~ | | |,haskus-utils-data-1.3-4CZ1s2ySi0mB6gXACUfdz3Haskus.Utils.ListHaskus.Utils.TupleHaskus.Utils.FunctorHaskus.Utils.InfListHaskus.Utils.MaybeHaskus.Utils.MonadHaskus.Utils.HListHaskus.Utils.EitherHaskus.Utils.MapHaskus.Utils.Map.StrictbaseGHC.Base++ Data.FoldablefindnotElemelemfoldl' Data.OldListsortOnsortBysortgroupByzip7zip6zip5zip4 partition transpose intersperse intersect\\deleteBynubBynub isSuffixOf isPrefixOf stripPrefixGHC.ListzipWithzip3repeattailheadghc-prim GHC.TupleUnit.recursion-schemes-5.1.3-4RmMqkzPKHjINJr8Um3SiqData.Functor.Foldable cotransverse transversecataAzygoHistoPreprocoelgotelgotmhistomcatagchronochrono distGHisto distHistoghistohisto distGApoTdistGApodistApogapo distZygoTgzygodistZygozygohoistNuhoistMurefixhoistunfix distGFutudistFutugfutufutugrefoldghylodistAnagunfoldganadistCatagfoldgcatarefoldunfoldfoldhylo distParaTdistParaBasegprepropreprogparaparacataproject Recursivegpostpropostproapoanaembed CorecursiveFixMuNu 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(,)Unit$fTupleConsa(,,,,)(,,,,,)$fTupleConsa(,,,)(,,,,)$fTupleConsa(,,)(,,,)$fTupleConsa(,)(,,)$fTupleConsaUnit(,)$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$fReorderTupleUnitUnit $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 $fShowHList0$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.EitherEitherLeftRight fromRightfromLeftisRightisLeftpartitionEithersrightsleftseitherData.Functor.Classes showsBinary1 showsUnary1 showsUnary readsBinary1 readsUnary1 readsUnaryshowsBinaryWithshowsUnaryWithreadBinaryWithreadsBinaryWith readUnaryWithreadsUnaryWithreadData readsData showsPrec2liftReadListPrec2DefaultliftReadList2Default readPrec2 readsPrec2compare2eq2 showsPrec1liftReadListPrecDefaultliftReadListDefault readPrec1 readsPrec1compare1eq1Eq1liftEqOrd1 liftCompareRead1 liftReadsPrec liftReadList liftReadPrecliftReadListPrecShow1 liftShowsPrec liftShowListEq2liftEq2Ord2 liftCompare2Read2liftReadsPrec2 liftReadList2 liftReadPrec2liftReadListPrec2Show2liftShowsPrec2 liftShowList2 repeatedly Data.Functiononcontainers-0.6.0.1Data.Map foldWithKeyinsertLookupWithKey'insertWithKey' insertWith'$Data.Map.Internal.DeprecatedShowTree showTreeWithshowTreeData.Map.Internal.DebugvalidData.Map.Internal splitRoot deleteFindMax deleteFindMin splitLookupfromDistinctDescListfromDistinctAscListfromDescListWithKeyfromAscListWithKeyfromDescListWithfromAscListWith fromDescList fromAscList toDescList toAscListfromListWithKey fromListWithfromListfromSetkeysSetassocskeyselemsfoldMapWithKey foldlWithKey' foldlWithKey foldrWithKey' foldrWithKeyfoldlfoldr'foldrmapKeysMonotonic mapKeysWithmapKeysmapAccumRWithKeymapAccumWithKeymapAccumtraverseWithKey mapWithKeymapmapEitherWithKey mapEithertraverseMaybeWithKeymapMaybeWithKeymapMaybepartitionWithKey spanAntitonedropWhileAntitonetakeWhileAntitone filterWithKeyfilterisProperSubmapOfByisProperSubmapOf isSubmapOfBy isSubmapOf mergeWithKeyintersectionWithKeyintersectionWith restrictKeys intersectiondifferenceWithKeydifferenceWith withoutKeys difference unionWithKey unionWithunion unionsWithunionsmaxViewminViewmaxViewWithKeyminViewWithKeyupdateMaxWithKeyupdateMinWithKey updateMax updateMin deleteMax deleteMinfindMax lookupMaxfindMin lookupMindeleteAtupdateAtelemAt lookupIndex findIndexalterFalterupdateLookupWithKey updateWithKeyupdate adjustWithKeyadjustdeleteinsertLookupWithKey insertWithKey insertWithinsert singletonemptylookupGElookupLElookupGTlookupLTfindWithDefault notMembermemberlookupsizenull!?!MapData.Map.Strict.Internal Data.Maybe fromMaybe GHC.MaybeMaybeNothingJust catMaybes listToMaybe maybeToListfromJust isNothingisJustmaybe GHC.TypesFalsewhen Control.Monadunless GHC.ClassesnotanyallorandguardjoinMonad>>=>>returnfailFunctorfmapData.TraversablemapMsequenceControl.Monad.IO.ClassMonadIOliftIOmfilter<$!> replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterMforMmsum sequence_forM_mapM_ Data.FunctorvoidapliftM5liftM4liftM3liftM2liftM=<< MonadPlusmzeromplustransformers-0.5.5.0Control.Monad.Trans.Class MonadTranslift Data.Tuplefstsndswapuncurrycurry