!@%\      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{| } ~         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[Safe&'Xb7 haskus-utils%Dynamic type with Eq and Ord instance$Can be used as Map keys for instance9 haskus-utilsCreate a DynEq value*toDynEq (10 :: Int) == toDynEq (12 :: Int)False*toDynEq (10 :: Int) <= toDynEq (12 :: Int)True%toDynEq (10 :: Int) /= toDynEq "Test"True: haskus-utilsEGet a value from a DynEq or the default one if the type doesn't match; haskus-utils,Get a value from a DynEq if the type matches\]^_`abcd789:;789:;Safe0> haskus-utils)Embed bytes in a C array, return an Addr#? haskus-utils~A quasiquoter for raw string literals - that is, string literals that don't recognise the standard escape sequences (such as '\n'). Basically, they make your code more readable by freeing you from the responsibility to escape backslashes. They are useful when working with regular expressions, DOS/Windows paths and markup languages (such as XML).Don't forget the LANGUAGE QuasiQuotes2 pragma if you're using this module in your code.Usage: _:set -XQuasiQuotes import Haskus.Utils.Embed let s = [raw|\\w+\@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}|] sw"\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}" > [raw|C:\Windows\SYSTEM|] ++ [raw|\user32.dll|] "C:\\Windows\\SYSTEM\\user32.dll"1Multiline raw string literals are also supported:  multiline :: String multiline = [raw|<HTML> <HEAD> <TITLE>Auto-generated html formated source</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> </HEAD> <BODY LINK="0000ff\" VLINK=\"4800080" BGCOLOR="#ffffff"> <P> </P> <PRE>|] Caveat: since the "|]"r character sequence is used to terminate the quasiquotation, you can't use it inside the raw string literal. Use @E if you want to embed that character sequence inside the raw string.@ haskus-utils A variant of ? that interprets the "|~]" sequence as "|]", "|~~]" as "|~]" and, in general, "|~^n]" as  "|~^(n-1)]" for n >= 1.Usage: [rawQ||~]|~]|]"|]|]"  [rawQ||~~]|]"|~]" [rawQ||~~~~]|]"|~~~]">?@>?@None@ A haskus-utilsCompose functions(+1) >.> (*7) <| 114B haskus-utilsCompose functions(+1) <.< (*7) <| 18C haskus-utilsApply a function 5 |> (*2)10D haskus-utilsApply a function (*2) <| 510E haskus-utilsApply a function in a FunctorJust 5 ||> (*2)Just 10F haskus-utilsApply a function in a Functor(*2) <|| Just 5Just 10G haskus-utilsApply a function in a FunctorJust [5] |||> (*2) Just [10]H haskus-utilsApply a function in a Functor(*2) <||| Just [5] Just [10]I haskus-utils!Composition of catMaybes and forMLlet f x = if x > 3 then putStrLn "OK" >> return (Just x) else return NothingforMaybeM [0..5] fOKOK[4,5]J haskus-utilsforM_ with interspersed action4intersperseM_ (putStr ", ") ["1","2","3","4"] putStr 1, 2, 3, 4K haskus-utilsIFast for-loop in a Monad (more efficient than forM_ [0..n] for instance).#forLoopM_ (0::Word) (<5) (+1) print01234L haskus-utils)Fast fort-loop with an accumulated result<let f acc n = acc ++ (if n == 0 then "" else ", ") ++ show n forLoop (0::Word) (<5) (+1) "" f"0, 1, 2, 3, 4" "! efghijklmnopqrstuvwxyz{|}~ABCDEFGHIJKL)"! ABCDEFGH  I  JKLA9 B9 C0D0E0F0G0H0None,.>EHIUVXkR#P haskus-utilsA type t is maybe indexable in the arrayQ haskus-utilsA type t is indexable in the arrayR haskus-utils The type t with index n is indexable in the arrayS haskus-utilsheterogeneous arrayT haskus-utils Empty arrayU haskus-utils Empty arrayV haskus-utilsGet an element by indexW haskus-utilsGet first elementX haskus-utilsSet an element by indexY haskus-utils<Get an element by type (select the first one with this type)Z haskus-utils<Set an element by type (select the first one with this type)[ haskus-utils<Get an element by type (select the first one with this type)\ haskus-utils!Append a value to an array (O(n))] haskus-utils"Prepend a value to an array (O(n))^ haskus-utils Concat arrays_ haskus-utilsDrop the last element` haskus-utilsDrop the first elementa haskus-utilsCompose HArrayTMNOPQRSTUVWXYZ[\]^_`aSRQPTUVWXYZ[\]^_`MNOaSafeUb haskus-utils%Return the GCD of a list of integrals gcds [2,4,8]2c haskus-utils%Return the LCM of a list of integrals lcms [2,3,5]30bcbcNone*14EX_g e haskus-utils.Additional cached transformed and read values.f haskus-utilsHA value that can be read with IO. The last read can be cached in it too.We store both the read value (type s) and a pure modifier function (s -> a). By doing this we can easily compare a read value to the cached one without performing extra computations. The functor instance compose with the modifier function.9The supposedly costly modifier function is applied lazilyg haskus-utilsIO accessor + modifier functionh haskus-utils.Additional cached transformed and read values.i haskus-utils0Check if the MonadVar cache needs to be updated.\Invariably produce an MonadVar with cached values or Nothing if the old one hasn't changed.j haskus-utilsMCheck if the MonadVar cache needs to be updated. Return the updated MonadVar.2Invariably produce an MonadVar with cached values.k haskus-utilsJUpdate an MonadVar without comparing to the cache even if it is available.2Invariably produce an MonadVar with cached values.l haskus-utils2Check if the MonadVarNE cache needs to be updated.m haskus-utilsQCheck if the MonadVarNE cache needs to be updated. Return the updated MonadVarNE defghijklm fghkijdelmNone*14EX_r p haskus-utils Monadic listq haskus-utilsMonadic rose treer haskus-utilsMonadic stream with cachewBoth the structure and the values may be monadically dependent. The last monadic values read can be stored in a cache.s haskus-utils Pure streamt haskus-utilsMonadic streamu haskus-utilsPretty-show an MonadStreamv haskus-utilsPretty-show some MonadStreamsw haskus-utilsCUpdate a MonadStream recursively. Reuse cached values when possiblex haskus-utilsCUpdate a MonadStream recursively. Reuse cached values when possibley haskus-utilsJUpdate a MonadStream forest recursively. Reuse cached values when possiblez haskus-utils'Update a MonadStream forest recursively pqrtsuvwxyz rtsqpuvwxyz None*4ESX_~$ | haskus-utilsCached control-flow~ haskus-utils#Cached control-flow as an MonadTree haskus-utilsAMonadic context when performing an update (e.g. withSnapshot ctx) haskus-utilsMonadFlow Functor haskus-utilsRun an MonadFlow haskus-utilsEmit a pure value haskus-utilsGet a variable in IOUse $ to clearly limit the variable scope haskus-utils0Read and use an IO variable in a delimited scope haskus-utils!Create a cache from an MonadFlow./Execute the MonadFlow once to get cached values haskus-utils!Create a cache from an MonadFlow.JThis is the pure version: IO dependent nodes may not have any cached value haskus-utilsUpdate a cached MonadFlow haskus-utilsUpdate a cached MonadFlow|}~|}~ None .>EHUVXz haskus-utils Multi-state haskus-utilsMulti-state monad transformer,States are stacked in a heterogeneous array. haskus-utils Run MState haskus-utilsEvaluate MState haskus-utilsExecute MState haskus-utilsSet a value in the state haskus-utilsGet a value in the state haskus-utilsTry to get a value in the state haskus-utilsModify a value in the state haskus-utils,Modify a value in the state (strict version) haskus-utils(Execute an action with an extended state haskus-utils-Lift a multi-state into an HArray transformer haskus-utilsCompose MStateT haskus-utilsCompose MStateTSafeZ haskus-utils%Execute an STM transaction atomically haskus-utilsRead a TVar in an IO monad haskus-utilsWrite a TVar in an IO monad haskus-utilsSwap a TVar in an IO monad haskus-utilsCreate a broadcast channel haskus-utils Create a TVar haskus-utilsCreate a TMVar!#$%&'()*+,-./0123456!#%$0&/.)-+'(*,654213 None  haskus-utilsSetter for a future value haskus-utilsFuture value of type a haskus-utilsCreate a Future and its source haskus-utils in  haskus-utils Set a future haskus-utilsSet a future in IO haskus-utils Set a future'Return False if it has already been set haskus-utilsWait for a future haskus-utils Poll a future haskus-utils in  Safe haskus-utilsSnapshot state haskus-utilsNo snapshot active haskus-utilsSnapshot active haskus-utilsExiting the snapshot haskus-utilsSnapshot context haskus-utilsSnapshot state haskus-utils$Variable updaters (on snapshot exit) haskus-utilsA snapshot variable haskus-utilsSnapshot context haskus-utils=Snapshot value (during snapshot) or current value (otherwise) haskus-utilsNext value (during snapshot) haskus-utilsCreate a new snapshot context haskus-utilsCreate a new snapshot context haskus-utilsCreate a new SnapVar haskus-utilsCreate a new SnapVar haskus-utilsWrite a SnapVar haskus-utilsLSnapVar updater (on snapshot exit, for variable written during the snapshot) haskus-utilsWrite a SnapVar haskus-utilsRead a SnapVar haskus-utilsRead a SnapVar haskus-utilsModify a SnapVar haskus-utilsModify a SnapVar haskus-utils(Read the snapshot value of the variable.!Must be used in the context of a  haskus-utils(Read the snapshot value of the variable.!Must be used in the context of a  haskus-utilsUse a snapshot SafeNoneX_b haskus-utilsA node in the listEvery list has a marker node whose value is Nothing. Its nodePrev links to the last node and its nodeNext links to the first node. haskus-utilsA double linked-list haskus-utils Get value associated with a node haskus-utilsEmpty node singleton haskus-utils*Remove all the elements of the list (O(1)) haskus-utilsCreate a singleton list haskus-utilsIndicate if the list is empty haskus-utils/Count the number of elements in the list (0(n)) haskus-utilsGet the first element if any haskus-utilsGet the last element if any haskus-utilsGet the previous element if any haskus-utilsGet the next element if any haskus-utilsDelete a element of the list haskus-utils)Insert a node between two adjacent nodes. haskus-utilsAppend an element to the list haskus-utilsAppend an element to the list haskus-utilsPrepend an element to the list haskus-utilsPrepend an element to the list haskus-utils Insert an element before another haskus-utilsInsert an element after another haskus-utilsConvert into a list (O(n)) haskus-utils#Convert into a reversed list (O(n)) haskus-utilsCreate from a list haskus-utils(Only keep element matching the criterium haskus-utils3Find the first node matching the predicate (if any) haskus-utilsGet the node from its index haskus-utils5Take (and remove) up to n elements in the list (O(n))Noneö haskus-utils@A node contains a value and two lists of incoming/outgoing edges haskus-utilsDeep-first graph traversalubefore is executed when the node is entered after is executed when the node is leaved children gets node's children haskus-utilsBreadth-first graph traversalsvisit is executed when the node is entered. If False is returned, the traversal ends children gets node's children haskus-utilsCreate a graph node haskus-utilsLink two nodes together None, haskus-utils STM hashmap haskus-utilsIndicate if the map is empty haskus-utils%Get the number of elements in the map haskus-utils)Lookup an element in the map from its key haskus-utilsCheck if a key is in the map haskus-utils Check if a key is not in the map haskus-utilsCreate an empty map haskus-utils(Create a map containing a single element haskus-utilsInsert an element in the map haskus-utilsCreate a new TMap from a list haskus-utilsDelete an element from the map haskus-utilsCreate a list of (key,value) haskus-utils Get values haskus-utilsGet keys haskus-utilsUnsafe lookup in the mapNone,> haskus-utilsSTM Set haskus-utilsIndicate if the set is empty haskus-utilsNumber of elements in the set haskus-utils!Check if an element is in the set haskus-utils%Check if an element is not in the set haskus-utilsCreate an empty set haskus-utils(Create a set containing a single element haskus-utilsInsert an element in a set haskus-utilsDelete an element from a set haskus-utilsConvert a set into a list haskus-utilsCreate a set from a list haskus-utilsGet the set elements haskus-utilsGet the set as a ListT stream haskus-utilsPerform a set union haskus-utils+Apply a function to each element in the setNone  haskus-utilsPath in the tree haskus-utilsA STM mutable tree haskus-utilsNode identifier haskus-utils Node value  haskus-utilsChildren  haskus-utilsParent  haskus-utilsCreate a singleton node  haskus-utils Add a child  haskus-utilsDetach a child haskus-utilsEAttach a child a node (detaching it from a previous one if necessary) haskus-utils Follow a path from a parent node            None =>?HPVX_`!4 haskus-utilsReduction result haskus-utilsPredicated data }data T data NT type family RuleT e p a s :: * where RuleT e p a T = a RuleT e p a NT = Rule e p a data PD t = PD { p1 :: RuleT () Bool Int t , p2 :: RuleT () Bool String t } deriving instance Eq (PD T) deriving instance Show (PD T) deriving instance Ord (PD T) deriving instance Eq (PD NT) deriving instance Show (PD NT) deriving instance Ord (PD NT) instance Predicated (PD NT) where type PredErr (PD NT) = () type Pred (PD NT) = Bool type PredTerm (PD NT) = PD T liftTerminal (PD a b) = PD (liftTerminal a) (liftTerminal b) reducePredicates oracle (PD a b) = initP PD PD |> (B) reducePredicates oracle a) |> (Bp reducePredicates oracle b) |> resultP getTerminals (PD as bs) = [ PD a b | a <- getTerminals as , b <- getTerminals bs ] getPredicates (PD a b) = concat [ getPredicates a , getPredicates b ]  haskus-utils Error type haskus-utilsPredicate type haskus-utils Terminal type haskus-utils$Build a non terminal from a terminal haskus-utilsReduce predicates haskus-utilsSimplify predicates haskus-utils Get possible resulting terminals haskus-utilsGet used predicates haskus-utilsYA rule can produce some "a"s (one or more if it diverges), depending on the constraints.$ haskus-utils$A constraint is a boolean expressionp is the predicate type% haskus-utilsPredicate value& haskus-utilsIs the predicate valid' haskus-utils Logic not( haskus-utils Logic and) haskus-utilsLogic or* haskus-utils Logic xor+ haskus-utilsConstant, haskus-utilsError- haskus-utilsPredicate oracle. haskus-utilsPredicate state/ haskus-utils Set predicate0 haskus-utilsUnset predicate1 haskus-utilsUndefined predicate2 haskus-utils!Invalid predicate (can't be used)3 haskus-utils#Ask an oracle if a predicate is set4 haskus-utils%Ask an oracle if a predicate is unset5 haskus-utils)Ask an oracle if a predicate is undefined6 haskus-utils'Ask an oracle if a predicate is invalid7 haskus-utilsCheck the state of a predicate8 haskus-utilsGet predicate state9 haskus-utilsCreate an oracle from a list: haskus-utils9Get a list of valid and defined predicates from an oracle; haskus-utils?Combine two oracles TODO: check that there is no contradiction< haskus-utilsGAdd predicates to an oracle TODO: check that there is no contradiction= haskus-utilsOracle that always answer Undef> haskus-utilsReduce a constraint%data P = A | B deriving (Show,Eq,Ord)$let c = And [IsValid A, Predicate B]5let oracle = makeOracle [(A,InvalidPred),(B,SetPred)]constraintSimplify oracle c CBool False1let oracle = makeOracle [(A,SetPred),(B,SetPred)]constraintSimplify oracle c CBool True3let oracle = makeOracle [(A,SetPred),(B,UnsetPred)]constraintSimplify oracle c CBool False haskus-utils=Check that a constraint is evaluated to a given boolean value haskus-utils0Check that a constraint is evaluated to an error haskus-utils#Get predicates used in a constraint haskus-utilsGet constraint terminals? haskus-utilsOptimize/simplify a constraint@ haskus-utilsSimplify a rule given an oracle haskus-utils Reduce a rule haskus-utils Get possible resulting terminals haskus-utilsGet predicates used in a ruleA haskus-utilsFConstraint checking that a predicated value evaluates to some terminalB haskus-utilsCompose reduction resultsWe reuse the MatchResult data type: * a "terminal" on the left can be used to build either a terminal or a non terminal * a "non terminal" on the left can only be used to build a non terminalC haskus-utilsIInitialise a reduction result (typically with two functions/constructors)D haskus-utils#Fixup result (see initP and applyP)E haskus-utils3Create a table of predicates that return a terminal6# !"$'+%*)(&,-./0123456789:;<=>?@ABCDE6./012-9:=;345678<$'+%*)(&,?># !"@AECBDSafe$X haskus-utilsiValue with Eq/Ord instances uniquely based on time field indicating the time the value was last written.This can be used with IOVar/IOTree which use Eq instances to detect value changes. It can be useful for values that we don't want to structurally compare (because it is too costly or because we can't)t5 should be SystemTime (fast to query monotonic clock)XYXY !"#$%&'&(&)*+*,*-*.*/*01213456789:;<:;=:;>:;?:;@ABCABDABEFGHFGIFGJFKLFKMFKNFKOFKPFKQFKRFKSFKTFKUFKVFWXFWYFWZFW[FW\FW]^^_`abcdefghijklmnopqrsstuvwxyz{|}~                       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abccdefghifjfkflfmfnfofopqrpqstuvtuwtuxtuytuztu{tu|tu}tu~tututututututututututututututututututututtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt          'haskus-utils-1.5-I3Y7yFFycqPJBIIDGn5GRZHaskus.Utils.FlowHaskus.Utils.STMHaskus.Utils.DynamicHaskus.Utils.EmbedHaskus.Utils.HArrayHaskus.Utils.MathsHaskus.Utils.MonadVarHaskus.Utils.MonadStreamHaskus.Utils.MonadFlowHaskus.Utils.MultiStateHaskus.Utils.STM.FutureHaskus.Utils.STM.SnapVarHaskus.Utils.STM.TEqHaskus.Utils.STM.TListHaskus.Utils.STM.TGraphHaskus.Utils.STM.TMapHaskus.Utils.STM.TSetHaskus.Utils.STM.TTreeHaskus.Utils.SolverHaskus.Utils.TimedValuebase Control.MonadguardGHC.BasejoinControl.Monad.IO.ClassliftIOMonadIOunless replicateM_ replicateMfoldM_foldMforever<=<>=>filterMData.TraversableforMsequencemapM GHC.Conc.Sync writeTVarreadTVarnewTVarretrySTMTVar Data.FoldableforM_mapM_ Data.Functorvoidwhentransformers-0.5.5.0Control.Monad.Trans.Classlift#extra-1.6.20-7TGvP85AdiDAqdgTQSOeVeControl.Monad.ExtraifMunlessMwhenMwhileMloopM,haskus-utils-data-1.2-KBJpS7iTSiv6TfMyKR37OvHaskus.Utils.Monad liftWith2liftWith MonadInIO stm-2.5.0.0Control.Concurrent.STM.TVarswapTVar modifyTVar' modifyTVarControl.Concurrent.STM.TMVar isEmptyTMVar swapTMVar tryReadTMVar readTMVar tryPutTMVarputTMVar tryTakeTMVar takeTMVarnewEmptyTMVarIO newEmptyTMVarTMVarControl.Concurrent.STM.TChan cloneTChandupTChan readTChan writeTChannewBroadcastTChanTChanDynEqtoDynEq fromDynEqfromDynEqMaybe $fOrdDynEq $fEqDynEq embedBytesrawrawQ>.><.<|><|||><|||||><||| forMaybeM intersperseM_ forLoopM_forLoopHArrayT runHArrayTHArrayTryIndexT HArrayIndexT HArrayIndexHArray emptyHArray singleHArray getHArrayN getHArray0 setHArrayN getHArrayT setHArrayT tryGetHArrayT appendHArray prependHArray concatHArray initHArray tailHArray>~:~>gcdslcms MonadVarNEMonadVarCachedMonadVarupdateMonadVarMaybeupdateMonadVarupdateMonadVarForceupdateMonadVarNEMaybeupdateMonadVarNE$fFunctorMonadVar$fFunctorMonadVarNE MonadList MonadTree MonadStream PureStreamshowMonadStreamshowMonadStreamsupdateMonadStreamupdateMonadStreamMaybeupdateMonadStreamsMaybeupdateMonadStreams$fFunctorMonadStreamCachedMonadFlow cachedTree cachedContext MonadFlow MonadFlowF MonadEmit MonadRead MonadWith runMonadFlowemitMrunMwithMcacheMonadFlowcacheMonadFlowPureupdateCachedMonadFlowupdateCachedMonadFlowMaybemonadFlowToMonadTree$fFunctorMonadFlowF$fFunctorCachedMonadFlowMStateMStateT runMState evalMState execMStatemSetmGetmTryGetmModifymModify'mWith liftMStateT>~:>>:> atomically readTVarIO writeTVarIO swapTVarIOnewBroadcastTChanIO newTVarIO newTMVarIO FutureSourceFuture newFuture newFutureIO setFuture setFutureIO setFuture' waitFuture pollFuture pollFutureIO SnapContextSnapVarnewSnapContextIOnewSnapContext newSnapVarIO newSnapVar writeSnapVarwriteSnapVarIO readSnapVar readSnapVarIO modifySnapVarmodifySnapVarIOreadSnapshotIO readSnapshot withSnapshotTEqteq $fTEqTVarTNodeTListvalueempty deleteAll singletonnulllengthfirstlastprevnextdeleteappendappend_prependprepend_ insertBefore insertAftertoList toReverseListfromListfilterfindindextake nodeValue nodeEdgeIn nodeEdgeOut deepFirst breadthFirstlinkToTMapKeysizelookupmember notMemberinsertelemskeys!TSetElementstreamunionsmap TTreePathTTreetreeKey treeValue treeChildren treeParentaddChild detachChild attachChildtreeFollowPath MatchResultNoMatchMatch DontMatch MatchFail MatchDiverge PredicatedPredErrPredPredTerm liftTerminalreducePredicatessimplifyPredicates getTerminals getPredicatesRuleTerminalOrderedNonTerminal NonTerminalFail Constraint PredicateIsValidNotAndOrXorCBoolCErr PredOracle PredStateSetPred UnsetPred UndefPred InvalidPred predIsSet predIsUnset predIsUndef predIsInvalidpredIs predState makeOracleoraclePredicates oracleUnionpredAdd emptyOracleconstraintSimplifyconstraintOptimize ruleSimplifyevalsToapplyPinitPresultPcreatePredicateTable$fFunctorConstraint $fFunctorRule$fFunctorMatchResult$fPredicated(,)$fPredicatedConstraint$fPredicatedRule$fShowPredState $fEqPredState$fOrdPredState$fShowConstraint$fEqConstraint$fOrdConstraint $fShowRule$fEqRule $fOrdRule$fShowMatchResult$fEqMatchResult$fOrdMatchResult TimedValue$fOrdTimedValue$fEqTimedValue Data.DynamictoDynData.Typeable.InternalTypeable dynTypeRepdynAppdynApply fromDynamicfromDynDynamic-haskus-utils-types-1.5-Ey3ChkeJKhMJ20wX0gLjL3Haskus.Utils.Types.ListRemoveMember/haskus-utils-variant-3.0-3jXsz64a7HG5SmWb0IXKUiHaskus.Utils.Variant.Excepts sequenceErunBothEveitherToExceptsvariantToExceptsfinallyEonEonE_ catchDieE catchEvalE catchAllEcatchLiftRight catchLiftLeft catchRemove catchLiftBothcatchEsuccessEfailureEthrowEprependEappendEliftE mapExceptsevalE withExcepts withExcepts_ injectExceptsrunE_runEExceptsHaskus.Utils.Variant.VEitherveitherProduct veitherCont veitherAppendveitherPrepend veitherLift veitherBimapveitherToValueveitherToEitherveitherToVariantveitherFromVariantVLeftVRightVEither VEitherLiftHaskus.Utils.VariantvariantToTuplevariantFromEithervariantToEithervariantFromValuevariantToValuejoinVariantUnsafeflattenVariantproductVariant nubVariant liftVariantprependVariant appendVariant reduceVarianttraverseVariant_traverseVariant alterVariantfoldMapVariantfoldMapVariantFirstMfoldMapVariantFirstfoldMapVariantAtMfoldMapVariantAt mapNubVariant mapVariantmapVariantFirstMmapVariantFirstfromVariantMaybe fromVariant' fromVariantfromVariantFirstpopVariantMaybe popVariant splitVariant toVariant' toVariantmapVariantHeadTailvariantHeadTailconstBindVariant bindVariant mapVariantAtM mapVariantAtpopVariantHead popVariantAtfromVariantHead fromVariantAt toVariantTail toVariantHead toVariantAt variantSize variantIndex showsVariantVVSilentVMaybeVariant PopVariant popVariant' SplitVariant:<:<<: