h$>J-?      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Safe-Inferred None-.>?xhaskus-utils-data"Bottom-up traversal (catamorphism)yhaskus-utils-data6Bottom-up traversal with original value (paramorphism)zhaskus-utils-dataPerform a top-down traversalRight: stop the traversal ("right" value obtained) Left: continue the traversal recursively on the new value !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLSMNOPQRYTUVWXZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~wxvyuz !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLSMNOPQRYTUVWXtsrqponmlkjihgfdebc`a]^_Z[\{|}~ Safe-Inferred57 chaskus-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-InferredIhaskus-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-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: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/ /    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% 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)>None./>?)Vhaskus-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-/2>?, 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-.2-.3-.4-.5-.6-.7-.8-.9-.:-.;-.<-.=-.>-.?-.@-.A-.B-.C-.D-.E-.F-.G-.H-.I-.J-.K-.L-.M-.N-.O-.P-.Q-.R-.S-.T-.U-.V-.W-.X-.Y-.Z-.[-.\-.]-.^-._-.`-.a-.b-.c-.d-.e-.f-.g-.h-.i-.j-.klmnopqrstuvwxyz{|}~*                                                                Z                                                                    ,haskus-utils-data-1.4-LCv74a5OkN0G7dhkLyWAW8Haskus.Utils.ListHaskus.Utils.FunctorHaskus.Utils.InfListHaskus.Utils.MaybeHaskus.Utils.MonadHaskus.Utils.TupleHaskus.Utils.HListHaskus.Utils.EitherHaskus.Utils.MapHaskus.Utils.Map.StrictbaseGHC.Base++ Data.FoldablefindnotElemelemfoldl' Data.OldListsortOnsortBysortgroupByzip7zip6zip5zip4 partition transpose intersperse intersect\\deleteBynubBynub isSuffixOf isPrefixOf stripPrefixGHC.ListzipWithzip3repeattailhead.recursion-schemes-5.2.2-9cAkx3aL5Rz4boBSUFq2eWData.Functor.Foldable cotransverse transversecataAzygoHistoPreprocoelgotelgotmfutumapomanamhistomzygomparamcatagchronochrono distGHisto distHistoghistohisto distGApoTdistGApodistApogapo distZygoTgzygodistZygozygorefixhoist distGFutudistFutugfutufutugrefoldghylodistAnagunfoldganadistCatagfoldgcatarefoldunfoldfoldhylo distParaTdistParaBasegprepropreprogparaparacataproject Recursivegpostpropostproapoanaembed Corecursive 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 ExtractTupletupleNSolouncurry3uncurry4uncurry5uncurry6uncurry7take4 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 liftCompareRead1liftReadListPrec liftReadPrec liftReadsPrec liftReadListShow1 liftShowsPrec liftShowListEq2liftEq2Ord2 liftCompare2Read2liftReadListPrec2 liftReadPrec2liftReadsPrec2 liftReadList2Show2liftShowsPrec2 liftShowList2 Data.Functiononcontainers-0.6.2.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 mergeWithKeydisjointintersectionWithKeyintersectionWith 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 isNothingisJustmaybeghc-prim GHC.TypesFalsewhen Control.Monadunless GHC.ClassesnotanyallorandguardjoinMonadreturn>>=>>Functorfmap<$Control.Monad.Fail MonadFailfailData.TraversablemapMsequenceControl.Monad.IO.ClassMonadIOliftIOmfilter<$!> replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterMforMmsum sequence_forM_mapM_ Data.FunctorvoidapliftM5liftM4liftM3liftM2liftM=<< MonadPlusmzeromplustransformers-0.5.6.2Control.Monad.Trans.Class MonadTranslift Data.Tuplefstsndswapuncurrycurry