h*X8M       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                           !!!!!!!!!!!"""""""""####$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%&&''''''''''''((((((((((((()))))))))))) ) * * * * * * * * * * * * * + + + + + + + + + + + + , - - - . / / / / / / 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 233.10.3.02 Safe-Inferredcabal-install-solverLike assert, but only enabled with -fdebug-expensive-assertions. This function can be used for expensive assertions that should only be turned on during testing or debugging. Safe-Inferred6-<.c;de:kfghijlmnopq&rs' tuvw(x)yz{|}~* +,/ 012345789#$%=> !?WZ@ABCDEFGHIJXYK]^_LMOPQRST[\UV`a"N6-<.c;de:kfghijlmnopq&rs' tuvw(x)yz{|}~* +,/ 012345789#$%=> !?WZ@ABCDEFGHIJXYK]^_LMOPQRST[\UV`a"N Safe-Inferred<cabal-install-solverConstruct an edge-labeled graph;This is a simple adaptation of the definition in Data.Graph   Safe-Inferred Safe-Inferred9:; cabal-install-solverSort the list so that values satisfying the predicate are first.cabal-install-solver>Sort the list so that keys satisfying the predicate are first.cabal-install-solverWill partition the list according to the predicate. If there is any element that satisfies the predicate, then only the elements satisfying the predicate are returned. Otherwise, the rest is returned.cabal-install-solver Variant of ? that takes a predicate on the keys rather than on the values. Safe-Inferred# cabal-install-solver3Version range. Consists of a lower and upper bound.cabal-install-solverPreliminary type for versions.cabal-install-solver#String representation of a version.cabal-install-solver)String representation of a version range.cabal-install-solverUnconstrained version range.cabal-install-solver&Version range fixing a single version.cabal-install-solverIntersect two version ranges.cabal-install-solverUnion of two version ranges.cabal-install-solverSimplify a version range.cabal-install-solver+Checking a version against a version range.   Safe-Inferred9:;)r cabal-install-solver-An association list that is sorted by weight.Each element has a key (k ), value (v), and weight (w). All operations that add elements or modify weights stably sort the elements by weight.cabal-install-solverO(N).cabal-install-solverO(1) . Return True if the  WeightedPSQ contains zero or one elements.cabal-install-solverO(1). Return the elements in order.cabal-install-solver O(N log N).cabal-install-solverO(N). Return the weights in order.cabal-install-solverO(N). Return the keys in order.cabal-install-solverO(N). Return the value associated with the first occurrence of the give key, if it exists.cabal-install-solver O(N log N). Update the weights.cabal-install-solverO(N). Update the values.cabal-install-solverO(N)9. Traverse and update values in some applicative functor.cabal-install-solverO((N + M) log (N + M)). Combine two  WeightedPSQ5s, preserving all elements. Elements from the first  WeightedPSQ come before elements in the second when they have the same weight.cabal-install-solverO(N). Return the prefix of values ending with the first element that satisfies p, or all elements if none satisfy p.    Safe-Inferred9</cabal-install-solver(Fine-grained dependencies for a package.Typically used as ComponentDeps [Dependency], to represent the list of dependencies for each named component within a package.cabal-install-solver"Dependency for a single component.cabal-install-solverComponent of a package.cabal-install-solverZip two  together by , using  as the neutral element when a  is present only in one.cabal-install-solver?Keep only selected components (and their associated deps info).cabal-install-solver2ComponentDeps containing library dependencies onlycabal-install-solver1ComponentDeps containing setup dependencies only.cabal-install-solver%ComponentDeps for installed packages.We assume that installed packages only record their library dependencies.cabal-install-solverAll dependencies of a package.This is just a synonym for  , but perhaps a use of  is more obvious than a use of  0, and moreover this avoids introducing lots of #ifdefs for 7.10 just for the use of  .cabal-install-solver/All dependencies except the setup dependencies.Prior to the introduction of setup dependencies in version 1.24 this would have been _all_ dependencies.cabal-install-solverLibrary dependencies proper only. (Includes dependencies of internal libraries.)cabal-install-solverList componentscabal-install-solverSetup dependencies.cabal-install-solver1Select dependencies satisfying a given predicate.  Safe-Inferred<5} cabal-install-solver Source of a PackageConstraint.cabal-install-solverMain config file, which is ~.cabalconfig by default.cabal-install-solverLocal cabal.project filecabal-install-solver5User config file, which is ./cabal.config by default.cabal-install-solver#Flag specified on the command line.cabal-install-solver$Target specified by the user, e.g., cabal install package-0.1.0.0 implies package==0.1.0.0.cabal-install-solverInternal requirement to use installed versions of packages like ghc-prim.cabal-install-solverInternal constraint used by  cabal freeze.cabal-install-solverConstraint specified by a config file, a command line flag, or a user target, when a more specific source is not known.cabal-install-solver.The source of the constraint is not specified.cabal-install-solverAn internal constraint due to compatibility issues with the Setup.hs command line interface requires a minimum lower bound on Cabalcabal-install-solverAn internal constraint due to compatibility issues with the Setup.hs command line interface requires a maximum upper bound on Cabalcabal-install-solverDescription of a .    Safe-Inferred5  Safe-Inferred6xcabal-install-solverWhether we prefer an installed version of a package or simply the latest version.  Safe-Inferred7<7cabal-install-solverNote: this is total map.cabal-install-solver+String representation of an OptionalStanza.cabal-install-solverConvert a list of ! into the corresponding Cabal's  + which records what components are enabled. Safe-Inferred9cabal-install-solver?Subclass of packages that have specific versioned dependencies.So for example a not-yet-configured package has dependencies on version ranges, not specific versions. A configured or an already installed package depends on exact versions. Some operations or data structures (like dependency graphs) only make sense on this subclass of package types.(c) David Himmelstrup 2005, Bjorn Bringert 2007, Duncan Coutts 2008cabal-devel@haskell.orgportable Safe-Inferred9<Dcabal-install-solver>The collection of information about packages from one or more  PackageDBs.;It can be searched efficiently by package name and version. cabal-install-solverLookup a name in the index to get all packages that match that name case-sensitively.cabal-install-solver*Build an index out of a bunch of packages.6If there are duplicates, later ones mask earlier ones.cabal-install-solverMerge two indexes.Packages from the second mask packages of the same exact name (case-sensitively) from the first. cabal-install-solver4Elements in the second list mask those in the first.cabal-install-solverOverride-merge of two indexes.Packages from the second mask packages of the same exact name (case-sensitively) from the first.cabal-install-solver(Inserts a single package into the index.8This is equivalent to (but slightly quicker than) using   or  with a singleton index. cabal-install-solverInternal delete helper.cabal-install-solver(Removes a single package from the index.cabal-install-solverRemoves all packages with this (case-sensitive) name from the index.cabal-install-solver?Removes all packages satisfying this dependency from the index.cabal-install-solver$Get all the packages from the index.cabal-install-solver$Get all the packages from the index.3They are grouped by package name, case-sensitively.cabal-install-solver-Does a lookup by package id (name & version).Since multiple package DBs mask each other case-sensitively by package name, then we get back at most one package.cabal-install-solver-Does a case-sensitive search by package name.cabal-install-solverDoes a case-sensitive search by package name and a range of versions.We get back any number of versions of the specified package name, all satisfying the version range constraint.cabal-install-solver/Does a case-insensitive search by package name.If there is only one package that compares case-insensitively to this name then the search is unambiguous and we get back all versions of that package. If several match case-insensitively but one matches exactly then it is also unambiguous.If however several match case-insensitively and none match exactly then we have an ambiguous result, and we get back all the versions of all the packages. The list of ambiguous results is split by exact package name. So it is a non-empty list of non-empty lists.cabal-install-solver9Does a case-insensitive substring search by package name.That is, all packages that contain the given string in their name. Safe-InferredOcabal-install-solverQualified package name.cabal-install-solver9A qualified entity. Pairs a package path with the entity.cabal-install-solver/Qualifier of a package within a namespace (see )cabal-install-solver&Top-level dependency in this namespacecabal-install-solver0Any dependency on base is considered independent*This makes it possible to have base shims.cabal-install-solverSetup dependencyBy rights setup dependencies ought to be nestable; after all, the setup dependencies of a package might themselves have setup dependencies, which are independent from everything else. However, this very quickly leads to infinite search trees in the solver. Therefore we limit ourselves to a single qualifier (within a given namespace).cabal-install-solver3If we depend on an executable from a package (via  build-tools), we should solve for the dependencies of that package separately (since we're not going to actually try to link it.) We qualify for EACH package separately; e.g., Exe pn1 pn2 qualifies the  build-tools dependency on pn2 from package pn1. (If we tracked only pn1, that would require a consistent dependency resolution for all of the depended upon executables from a package; if we tracked only pn2, that would require us to pick only one version of an executable over the entire install plan.)cabal-install-solverTop-level namespacePackage choices in different namespaces are considered completely independent by the solver.cabal-install-solverThe default namespacecabal-install-solver'A namespace for a specific build targetcabal-install-solverA package path consists of a namespace and a package path inside that namespace. cabal-install-solverPretty-prints a namespace. The result is either empty or ends in a period, so it can be prepended onto a qualifier.cabal-install-solverPretty-prints a qualifier. The result is either empty or ends in a period, so it can be prepended onto a package name.NOTE: the base qualifier is for a dependency _on_ base; the qualifier is there to make sure different dependencies on base are all independent. So we want to print something like "A.base" , where the "A." part is the qualifier and "base"+ is the actual dependency (which, for the Base qualifier, will always be base).cabal-install-solver'Pretty-prints a qualified package name.cabal-install-solver2String representation of a qualified package name. Safe-Inferred<Vcabal-install-solverA package constraint consists of a scope plus a property that must hold for all packages within that scope.cabal-install-solver6A package property is a logical predicate on packages.cabal-install-solverDetermines to what packages and in what contexts a constraint applies.cabal-install-solverA scope that applies when the given package is used as a build target. In other words, the scope applies iff a goal has a top-level qualifier and its namespace matches the given package name. A namespace is considered to match a package name when it is either the default namespace (for --no-independent-goals) or it is an independent namespace with the given package name (for --independent-goals).cabal-install-solver2The package with the specified name and qualifier.cabal-install-solverThe package with the specified name when it has a setup qualifier.cabal-install-solver=The package with the specified name regardless of qualifier.cabal-install-solverConstructor for a common use case: the constraint applies to the package with the specified name when that package is a top-level dependency in the default namespace.cabal-install-solver= 2.0' excluded some version of x.cabal-install-solverAny other conflict.cabal-install-solverThe set of variables involved in a solver conflict, each paired with details about the conflict. cabal-install-solver-The set of variables involved in the conflict Safe-Inferred%&9cabal-install-solver/Reason why a goal is being added to a goal set.cabal-install-solverA goal is just a solver variable paired with a reason. The reason is only used for tracing.cabal-install-solverA map containing reverse dependencies between qualified package names.cabal-install-solver(Options for goal qualification (used in ) See also defaultQualifyOptionscabal-install-solverDo we have a version of base relying on another version of base?cabal-install-solverThe reason that a dependency is active. It identifies the package and any flag and stanza choices that introduced the dependency. It contains everything needed for creating ConflictSets or describing conflicts in solver log messages.cabal-install-solverA component that can be depended upon by another package, i.e., a library or an executable.cabal-install-solverAn exposed component within a package. This type is used to represent build-depends and build-tool-depends dependencies.cabal-install-solverA dependency (constraint) associates a package name with a constrained instance. It can also represent other types of dependencies, such as dependencies on language extensions.cabal-install-solver!dependency on a package componentcabal-install-solver"dependency on a language extensioncabal-install-solver dependency on a language versioncabal-install-solver"dependency on a pkg-config packagecabal-install-solverA + labeled with the reason it was introduced. intentionally has no . instance because the type variable is used both to record the dependencies as well as who's doing the depending; having a . instance makes bugs where we don't distinguish these two far too likely. (By rights # ought to have two type variables.)cabal-install-solverFlagged dependencies can either be plain dependency constraints, or flag-dependent dependency trees.cabal-install-solver4Dependencies which are conditional on a flag choice.cabal-install-solverDependencies which are conditional on whether or not a stanza (e.g., a test suite or benchmark) is enabled.cabal-install-solver9Dependencies which are always enabled, for the component comp.cabal-install-solverFlagged dependencies is the modular solver's view of a packages dependencies: rather than having the dependencies indexed by component, each dependency defines what component it is in.Note that each dependency is associated with a Component. We must know what component the dependencies belong to, or else we won't be able to construct fine-grained reverse dependencies.cabal-install-solverConstrained instance. It represents the allowed instances for a package, which can be either a fixed instance or a version range.cabal-install-solver/Conservatively flatten out flagged dependencies&NOTE: We do not filter out duplicates.cabal-install-solver2Print the reason that a dependency was introduced.cabal-install-solver+Apply built-in rules for package qualifiersAlthough the behaviour of  depends on the , it is important that these  are _static_. Qualification does NOT depend on flag assignment; in other words, it behaves the same no matter which choices the solver makes (modulo the global ); we rely on this in linkDeps (see comment there).NOTE: It's the _dependencies_ of a package that may or may not be independent from the package itself. Package flag choices must of course be consistent.cabal-install-solver*Remove qualifiers from set of dependencies:This is used during link validation: when we link package Q.A to Q'.A, then all dependencies Q.B need to be linked to Q'.B. In order to compute what to link these dependencies to, we need to requalify Q.B to become Q'.B; we do this by first removing all qualifiers and then calling  again.cabal-install-solver(Compute a singleton conflict set from a cabal-install-solver Convert a  to a 5 that can be used when the goal leads to a conflict.cabal-install-solver Convert a  to a  containing the reason that the conflict occurred, namely the conflict set variables caused a conflict by introducing the given package goal. See the documentation for  GoalConflict.This function currently only specifies the reason for the conflict in the simple case where the  does not involve any flags or stanzas. Otherwise, it falls back to calling .cabal-install-solverThis function returns the solver variables responsible for the dependency. It drops the values chosen for flag and stanza variables, which are only needed for log messages.cabal-install-solver Convert a  to a  specifying that the conflict occurred because the conflict set variables introduced a problematic version constraint. See the documentation for VersionConstraintConflict.This function currently only specifies the reason for the conflict in the simple case where the  does not involve any flags or stanzas. Otherwise, it falls back to calling .cabal-install-solver Convert a  to a  specifying that the conflict occurred because the conflict set variables introduced a version of a package that was excluded by a version constraint. See the documentation for VersionConflict.This function currently only specifies the reason for the conflict in the simple case where the  does not involve any flags or stanzas. Otherwise, it falls back to calling .55 Safe-Inferred9:; cabal-install-solverFunctor for the tree type. a! is the type of nodes' children. d and c have the same meaning as in .cabal-install-solverInformation about a dependency involved in a conflict, for error messages.cabal-install-solverA package option is a package instance with an optional linking annotationThe modular solver has a number of package goals to solve for, and can only pick a single package version for a single goal. In order to allow to install multiple versions of the same package as part of a single solution the solver uses qualified goals. For example, 0.P and 1.P$ might both be qualified goals for P4, allowing to pick a difference version of package P for 0.P and 1.P.Linking is an essential part of this story. In addition to picking a specific version for 1.P%, the solver can also decide to link 1.P to 0.P! (or vice versa). It means that 1.P and 0.P really must be the very same package (and hence must have the same build time configuration, and their dependencies must also be the exact same).See  7http://www.well-typed.com/blog/2015/03/qualified-goals/ for details.cabal-install-solverType of the search tree. Inlining the choice nodes for now. Weights on package, flag, and stanza choices control the traversal order.%The tree can hold additional data on  nodes (type d) and choice nodes (type c). For example, during the final traversal, choice nodes contain the variables that introduced the choices, and 2 nodes contain the assignments for all variables.TODO: The weight type should be changed from [Double] to Double to avoid giving too much weight to preferences that are applied later.cabal-install-solver2Choose a version for a package (or choose to link)cabal-install-solverChoose a value for a flagThe Bool is the default value.cabal-install-solver(Choose whether or not to enable a stanzacabal-install-solver Choose which choice to make next Invariants:PSQ should never be empty+For each choice we additionally record the  why we are introducing that goal into tree. Note that most of the time we are working with Tree QGoalReason7; in that case, we must have the invariant that the  cached in the ,  or  directly below a 0 node must equal the reason recorded on that  node.cabal-install-solver"We're done -- we found a solution!cabal-install-solver:We failed to find a solution in this path through the treecabal-install-solverDetermines whether a tree is active, i.e., isn't a failure node.cabal-install-solverApproximates the number of active choices that are available in a node. Note that we count goal choices as having one choice, always.cabal-install-solverCatamorphism on trees.cabal-install-solverParamorphism on trees.cabal-install-solverAnamorphism on trees.<< Safe-Inferredcabal-install-solverWhether a component is made unbuildable by a "buildable: False" field.cabal-install-solver:Whether a component is visible in the current environment.cabal-install-solverInfo associated with each library and executable in a package instance.cabal-install-solverInfo associated with a package instance. Currently, dependencies, component names, flags and failure reasons. The component map records whether any components are unbuildable in the current environment (compiler, os, arch, and global flag constraints). Packages that have a failure reason recorded for them are disabled globally, for reasons external to the solver. We currently use this for shadowing which essentially is a GHC limitation, and for installed packages that are broken.cabal-install-solverAn index contains information about package instances. This is a nested dictionary. Package names are mapped to instances, which in turn is mapped to info.   Safe-Inferredcabal-install-solver2Find and reject any nodes with cyclic dependencies cabal-install-solverGiven the reverse dependency map from a node in the tree, check if the solution is cyclic. If it is, return the conflict set containing all decisions that could potentially break the cycle.TODO: The conflict set should also contain flag and stanza variables. Safe-Inferredcabal-install-solver$A (partial) assignment of variables.cabal-install-solverA (partial) package assignment. Qualified package names are associated with instances.cabal-install-solver6Delivers an ordered list of fully configured packages.TODO: This function is (sort of) ok. However, there's an open bug w.r.t. unqualification. There might be several different instances of one package version chosen by the solver, which will lead to clashes. Safe-InferredP cabal-install-solver,Set of packages that must be linked togetherA LinkGroup is between several qualified package names. In the validation state, we maintain a map vsLinks from qualified package names to link groups. There is an invariant that for all members of a link group, vsLinks must map to the same link group. The function updateLinkGroup can be used to re-establish this invariant after creating or expanding a LinkGroup. cabal-install-solver*The name of the package of this link group cabal-install-solverThe canonical member of this link group (the one where we picked a concrete instance). Once we have picked a canonical member, all other packages must link to this one.We may not know this yet (if we are constructing link groups for dependencies) cabal-install-solverThe members of the link group cabal-install-solverThe set of variables that should be added to the conflict set if something goes wrong with this link set (in addition to the members of the link group itself)cabal-install-solverValidate linked packages Verify that linked packages haveLinked dependencies,Equal flag assignmentsEqual stanza assignments cabal-install-solver(Link the dependencies of linked parents.When we decide to link one package against another we walk through the package's direct dependencies and make sure that they're all linked to each other by merging their link groups (or creating new singleton link groups if they don't have link groups yet). We do not need to do this recursively, because having the direct dependencies in a link group means that we must have already made or will make sooner or later a link choice for one of these as well, and cover their dependencies at that point. cabal-install-solverLink dependencies that we discover after making a flag or stanza choice.When we make a flag choice for a package, then new dependencies for that package might become available. If the package under consideration is in a non-trivial link group, then these new dependencies have to be linked as well. In linkNewDeps, we compute such new dependencies and make sure they are linked. cabal-install-solverVerify that all packages in the link group agree on flag assignmentsFor the given flag and the link group, obtain all assignments for the flag that have already been made for link group members, and check that they are equal. cabal-install-solverVerify that all packages in the link group agree on stanza assignmentsFor the given stanza and the link group, obtain all assignments for the stanza that have already been made for link group members, and check that they are equal.This function closely mirrors  . cabal-install-solverInvariant for the set of link groups: every element in the link group must be pointing to the same link group cabal-install-solverPackage version of this group;This is only known once we have picked a canonical element. cabal-install-solver3Creates a link group that contains a single member. Safe-Inferredcabal-install-solverPer-package preferences on the version. It is a soft constraint that the DependencyResolver: should try to respect where possible. It consists of an  which says if we prefer versions of packages that are already installed. It also has (possibly multiple) PackageVersionPreferences which are suggested constraints on the version number. The resolver should try to use package versions that satisfy the maximum number of the suggested version constraints.It is not specified if preferences on some packages are more important than others. (c) Iaki Garca Etxebarria 2016BSD-likecabal-devel@haskell.orgportable Safe-Inferred7<Ccabal-install-solver9The list of packages installed in the system visible to  pkg-config6. This is an opaque datatype, to be constructed with  and queried with pkgConfigPkgPresent.cabal-install-solverIf an entry is X, this means that the package seems to be present, but we don't know the exact version (because parsing of the version number failed).cabal-install-solver2For when we could not run pkg-config successfully.cabal-install-solverQuery pkg-config for the list of installed packages, together with their versions. Return a ! encapsulating this information.cabal-install-solver Create a  from a list of (packageName, version) pairs.cabal-install-solverCheck whether a given package range is satisfiable in the given  pkg-config database.cabal-install-solver&Query the version of a package in the  pkg-config database. Nothing6 indicates the package is not in the database, while  Just Nothing indicates that the package is in the database, but its version is not known.cabal-install-solverQuery pkg-config for the locations of pkg-config's package files. Use this to monitor for changes in the pkg-config DB. Safe-Inferred cabal-install-solver#The information needed to create a  node. cabal-install-solver#Version ranges paired with origins. cabal-install-solverMergedPkgDep records constraints about the instances that can still be chosen, and in the extreme case fixes a concrete instance. Otherwise, it is a list of version ranges paired with the goals / variables that introduced them. It also records whether a package is a build-tool dependency, for each reason that it was introduced.It is important to store the component name with the version constraint, for error messages, because whether something is a build-tool dependency affects its qualifier, which affects which constraint is applied. cabal-install-solverMap from component name to one of the reasons that the component is required. cabal-install-solver. If the first log leads to failure, continue with the second.cabal-install-solverO(1)1. Create a log with one message before a failure.cabal-install-solverO(1)1. Create a log with one message before a success.cabal-install-solverO(1). Prepend a message to a log.cabal-install-solverO(1) . Prepend the given message and  to the log, and insert % before the failure if the log fails.  # Safe-InferredHcabal-install-solver.Information about a dependency solver failure.cabal-install-solverPostprocesses a log file. This function discards all log messages and avoids calling ( if the log isn't needed (specified by keepLog), for efficiency.$ Safe-Inferred<cabal-install-solverShould we consider all packages we know about, or only those that have constraints explicitly placed on them or which are goals?% Safe-Inferred* cabal-install-solverThe state that is read and written while exploring the search tree. cabal-install-solverThis function takes the variable we're currently considering, a last conflict set and a list of children's logs. Each log yields either a solution or a conflict set. The result is a combined log for the parent node that has explored a prefix of the children.We can stop traversing the children's logs if we find an individual conflict set that does not contain the current variable. In this case, we can just lift the conflict set to the current level, because the current level cannot possibly have contributed to this conflict, so no other choice at the current level would avoid the conflict.If any of the children might contain a successful solution, we can return it immediately. If all children contain conflict sets, we can take the union as the combined conflict set.The last conflict set corresponds to the justification that we have to choose this goal at all. There is a reason why we have introduced the goal in the first place, and this reason is in conflict with the (virtual) option not to choose anything for the current variable. See also the comments for  .We can also skip a child if it does not resolve any of the conflicts paired with the current variable in the previous child's conflict set.   takes a function to determine whether a child can be skipped. If the child can be skipped, the function returns a new conflict set to be merged with the previous conflict set. cabal-install-solverCreates a failing ConflictSetLog representing a backjump. It inserts a "backjumping" message, checks whether the backjump limit has been reached, and increments the backjump count. cabal-install-solverLike , except that it only applies the input function when the backjump limit has not been reached. cabal-install-solverRecord complete assignments on  nodes. cabal-install-solverA tree traversal that simultaneously propagates conflict sets up the tree from the leaves and creates a log. cabal-install-solverBuild a conflict set corresponding to the (virtual) option not to choose a solution for a goal at all.In the solver, the set of goals is not statically determined, but depends on the choices we make. Therefore, when dealing with conflict sets, we always have to consider that we could perhaps make choices that would avoid the existence of the goal completely.Whenever we actually introduce a choice in the tree, we have already established that the goal cannot be avoided. This is tracked in the "goal reason". The choice to avoid the goal therefore is a conflict between the goal itself and its goal reason. We build this set here, and pass it to the  $ function as the last conflict set.This has two effects:In a situation where there are no choices available at all (this happens if an unknown package is requested), the last conflict set becomes the actual conflict set.In a situation where all of the children's conflict sets contain the current variable, the goal reason of the current node will be added to the conflict set.cabal-install-solver Interface.Takes as an argument a limit on allowed backjumps. If the limit is X, then infinitely many backjumps are allowed. If the limit is 'Just 0', backtracking is completely disabled. cabal-install-solverFunction that determines whether the given choice could resolve the given conflict. It indicates false by returning Y<, with the new conflicts to be added to the conflict set.cabal-install-solver5Function that logs the given choice that was skipped.cabal-install-solverThe current variable.cabal-install-solverConflict set representing the reason that the goal was introduced.cabal-install-solverList of children's logs.& Safe-Inferred cabal-install-solverInformation needed about a dependency before it is converted into a Goal. cabal-install-solver(Datatype that encodes what to build next cabal-install-solverbuild a goal choice node cabal-install-solverbuild a node for this goal cabal-install-solver$build a tree for a concrete instance cabal-install-solver!Map of available linking targets. cabal-install-solverThe state needed to build the search tree without creating any linked nodes. cabal-install-solver1information about packages and their dependencies cabal-install-solverset of all package goals, completed and open, with reverse dependencies cabal-install-solver0set of still open goals (flag and package goals) cabal-install-solverkind of node to generate next cabal-install-solverqualification options cabal-install-solverAll state needed to build and link the search tree. It has a type variable because the linking phase doesn't need to know about the state used to build the tree. cabal-install-solver7Extend the set of open goals with the new goals listed.We also adjust the map of overall goals, and keep track of the reverse dependencies of each of the goals. cabal-install-solverGiven the current scope, qualify all the package names in the given set of dependencies and then extend the set of open goals accordingly. cabal-install-solver"Introduce link nodes into the treeLinking is a phase that adapts package choice nodes and adds the option to link wherever appropriate: Package goals are called "related" if they are for the same instance of the same package (but have different prefixes). A link option is available in a package choice node whenever we can choose an instance that has already been chosen for a related goal at a higher position in the tree. We only create link options for related goals that are not themselves linked, because the choice to link to a linked goal is the same as the choice to link to the target of that goal's linking.The code here proceeds by maintaining a finite map recording choices that have been made at higher positions in the tree. For each pair of package name and instance, it stores the prefixes at which we have made a choice for this package instance. Whenever we make an unlinked choice, we extend the map. Whenever we find a choice, we look into the map in order to find out what link options we have to add.5A separate tree traversal would be simpler. However,   creates linked nodes from existing unlinked nodes, which leads to sharing between the nodes. If we copied the nodes when they were full trees of type 'Tree () QGoalReason', then the sharing would cause a space leak during exploration of the tree. Instead, we only copy the  , which is relatively small, while the tree is being constructed. See ,https://github.com/haskell/cabal/issues/2899cabal-install-solverInterface to the tree builder. Just takes an index and a list of package names, and computes the initial state and then the tree from there. cabal-install-solverCloses a goal, i.e., removes all the extraneous information that we need only during the build phase.cabal-install-solverPairs each element of a list with the list resulting from removal of that element from the original list.' Safe-Inferred<cabal-install-solverThe solver can produce references to existing packages or packages we plan to install. Unlike  ConfiguredId we don't yet know the   for planned packages, because it's not the solver's job to compute them.( Safe-Inferred<vcabal-install-solverAn  is a pre-existing installed package specified by the dependency solver.) Safe-Inferred7<"cabal-install-solverWe sometimes need to override the .cabal file in the tarball with the newer one from the package index.cabal-install-solverA package description along with the location of the package sources.cabal-install-solverNote, this field is lazy, e.g. when reading in hackage index we parse only what we need, not whole index.* Safe-Inferred< cabal-install-solverA   is a package specified by the dependency solver. It will get elaborated into a ConfiguredPackage or even an ElaboratedConfiguredPackage.NB:  s are essentially always with UnresolvedPkgLoc, but for symmetry we have the parameter. (Maybe it can be removed.)  + Safe-Inferred< cabal-install-solverThe dependency resolver picks either pre-existing installed packages or it picks source packages along with package configuration.This is like the 45 but with fewer cases.  , Safe-Inferredm cabal-install-solverA dependency resolver is a function that works out an installation plan given the set of installed and available packages and a set of deps to solve for.The reason for this interface is because there are dozens of approaches to solving the package dependency problem and we want to make it easy to swap in alternatives.  - Safe-Inferred cabal-install-solverConvert both the installed package index and the source package index into one uniform solver index.We use allPackagesBySourcePackageId for the installed package index because that returns us several instances of the same package and version in order of preference. This allows us in principle to "shadow" packages if there are several installed packages of the same version. There are currently some shortcomings in both GHC and Cabal in resolving these situations. However, the right thing to do is to fix the problem there, so for now, shadowing is only activated if explicitly requested. cabal-install-solverConvert a Cabal installed package index to the simpler, more uniform index format of the solver. cabal-install-solverExtract/recover the package ID from an installed package info, and convert it to a solver's I. cabal-install-solverConvert a single installed package into the solver-specific format. cabal-install-solverConvert dependencies specified by an installed package id into flagged dependencies of the solver.May return Nothing if the package can't be found in the index. That indicates that the original package having this dependency is broken and should be ignored. cabal-install-solverConvert a cabal-install source package index to the simpler, more uniform index format of the solver. cabal-install-solverConvert a single source package into the solver-specific format. cabal-install-solver;Convert a generic package description to a solver-specific . cabal-install-solverApplies the given predicate (for example, testing buildability or visibility) to the given component and environment. Values are combined with AND. This function returns X when the result cannot be determined before dependency solving. Additionally, this function only considers flags that are set by unqualified flag constraints, and it doesn't check the intra-package dependencies of a component. cabal-install-solver-Create a flagged dependency tree from a list fds! of flagged dependencies, using f to form the tree node (f will be something like  Stanza sn). cabal-install-solverConvert flag information. Automatic flags are now considered weak unless strong flags have been selected explicitly. cabal-install-solverConvert condition trees to flagged dependencies. Mutually recursive with  . See  : for an explanation of all arguments preceding the input  . cabal-install-solverMerge  dependencies that apply to the same library or build-tool. This function should be able to merge any two dependencies that can be merged by extractCommon, in order to prevent the exponential growth of dependencies.Note that this function can merge dependencies that have different DependencyReasons, which can make the DependencyReasons less precise. This loss of precision only affects performance and log messages, not correctness. However, when   is only called on dependencies at a single location in the dependency tree, the only difference between DependencyReasons should be flags that have value FlagBoth. Adding extra flags with value FlagBoth should not affect performance, since they are not added to the conflict set. The only downside is the possibility of the log incorrectly saying that the flag contributed to excluding a specific version of a dependency. For example, if +-flagA introduces pkg >=2 and +-flagB introduces pkg <5, the merged dependency would mean that + -flagA and +-flagB introduce pkg >=2 && <5, which would incorrectly imply that +/-flagA excludes pkg-6. cabal-install-solver-Branch interpreter. Mutually recursive with  .Here, we try to simplify one of Cabal's condition tree branches into the solver's flagged dependency format, which is weaker. Condition trees can contain complex logical expression composed from flag choices and special flags (such as architecture, or compiler flavour). We try to evaluate the special flags and subsequently simplify to a tree that only depends on simple flag choices.*This function takes a number of arguments: A map of flag values that have already been chosen. It allows convBranch to avoid creating nested FlaggedDeps that are controlled by the same flag and avoid creating DependencyReasons with conflicting values for the same flag.The DependencyReason calculated at this point in the tree of conditionals. The flag values in the DependencyReason are similar to the values in the map above, except for the use of FlagBoth./Some pre dependency-solving known information ( ,   ,  ) for os(), arch() and impl() variables,The package name  which this condition tree came from, so that we can correctly associate flag()< variables with the correct package name qualifier,The flag defaults " so that we can populate  dependencies with ,The name of the component  so we can record where the fine-grained information about where the component came from (see  ), andA selector to extract the  ! from the leaves of the   (which actually contains the needed dependency information.)The set of package names which should be considered internal dependencies, and thus not handled as dependencies. cabal-install-solver4Merge DependencyReasons by unioning their variables. cabal-install-solverConvert a Cabal dependency on a set of library components (from a single package) to solver-specific dependencies. cabal-install-solverConvert a Cabal dependency on an executable (build-tools) to a solver-specific dependency. cabal-install-solverConvert setup dependencies  . Safe-Inferred cabal-install-solver)Converts from the solver specific result CP QPN into a  5, which can then be converted into the install plan.  / Safe-Inferred cabal-install-solverVariables used by the dependency solver. This type is similar to the internal Var type.  0 Safe-Inferred" cabal-install-solver9Monad used internally in enforceSingleInstanceRestrictionFor each package instance we record the goal for which we picked a concrete instance. The SIR means that for any package instance there can only be one. cabal-install-solver%Update the weights of children under  nodes.   takes a list of weight-calculating functions in order to avoid sorting the package choices multiple times. Each function takes the package name, sorted list of children's versions, and package option.   prepends the new weights to the existing weights, which gives precedence to preferences that are applied later. cabal-install-solver*Prefer to link packages whenever possible. cabal-install-solverTraversal that tries to establish package stanza enable/disable preferences. Works by reordering the branches of stanza choices. Note that this works on packages lower in the path as well as at the top level. This is because stanza preferences apply to local packages only and for local packages, a single version is fixed, which means (for now) that all stanza preferences must be uniform at all levels. Further, even when we can have multiple versions of the same package, the build plan will be more efficient if we can attempt to keep stanza preferences aligned at all levels. cabal-install-solverHelper function that tries to enforce a single package constraint on a given instance for a P-node. Translates the constraint into a tree-transformer that either leaves the subtree untouched, or replaces it with an appropriate failure node. cabal-install-solverHelper function that tries to enforce a single package constraint on a given flag setting for an F-node. Translates the constraint into a tree-transformer that either leaves the subtree untouched, or replaces it with an appropriate failure node. cabal-install-solverHelper function that tries to enforce a single package constraint on a given flag setting for an F-node. Translates the constraint into a tree-transformer that either leaves the subtree untouched, or replaces it with an appropriate failure node. cabal-install-solverTraversal that tries to establish various kinds of user constraints. Works by selectively disabling choices that have been ruled out by global user constraints. cabal-install-solverTransformation that tries to enforce the rule that manual flags can only be set by the user.If there are no constraints on a manual flag, this function prunes all but the default value. If there are constraints, then the flag is allowed to have the values specified by the constraints. Note that the type used for flag values doesn't need to be Bool.This function makes an exception for the case where there are multiple goals for a single package (with different qualifiers), and flag constraints for manual flag x only apply to some of those goals. In that case, we allow the unconstrained goals to use the default value for x OR any of the values in the constraints on x (even though the constraints don't apply), in order to allow the unconstrained goals to be linked to the constrained goals. See  ,https://github.com/haskell/cabal/issues/4299. Removing the single instance restriction (SIR) would also fix #4299, so we may want to remove this exception and only let the user toggle manual flags if we remove the SIR.This function does not enforce any of the constraints, since that is done by  . cabal-install-solverRequire installed packages. cabal-install-solverAvoid reinstalls.This is a tricky strategy. If a package version is installed already and the same version is available from a repo, the repo version will never be chosen. This would result in a reinstall (either destructively, or potentially, shadowing). The old instance won't be visible or even present anymore, but other packages might have depended on it.TODO: It would be better to actually check the reverse dependencies of installed packages. If they're not depended on, then reinstalling should be fine. Even if they are, perhaps this should just result in trying to reinstall those other packages as well. However, doing this all neatly in one pass would require to change the builder, or at least to change the goal set after building. cabal-install-solverRequire all packages to be mentioned in a constraint or as a goal. cabal-install-solver+Sort all goals using the provided function. cabal-install-solverReduce the branching degree of the search tree by removing all choices after the first successful choice at each level. The returned tree is the minimal subtree containing the path to the first backjump. cabal-install-solverAlways choose the first goal in the list next, abandoning all other choices.This is unnecessary for the default search strategy, because it descends only into the first goal choice anyway, but may still make sense to just reduce the tree size a bit. cabal-install-solverTransformation that tries to make a decision on base as early as possible by pruning all other goals when base is available. In nearly all cases, there's a single choice for the base package. Also, fixing base early should lead to better error messages. cabal-install-solverDeal with setup and build-tool-depends dependencies after regular dependencies, so we will link setup/exe dependencies against package dependencies when possible cabal-install-solverTransformation that tries to avoid making weak flag choices early. Weak flags are trivial flags (not influencing dependencies) or such flags that are explicitly declared to be weak in the index. cabal-install-solver?Transformation that prefers goals with lower branching degrees.When a goal choice node has at least one goal with zero or one children, this function prunes all other goals. This transformation can help the solver find a solution in fewer steps by allowing it to backtrack sooner when it is exploring a subtree with no solutions. However, each step is more expensive. cabal-install-solver)Enforce ghc's single instance restrictionFrom the solver's perspective, this means that for any package instance (that is, package name + package version) there can be at most one qualified goal resolving to that instance (there may be other goals _linking_ to that instance however).  1 Safe-Inferred' cabal-install-solverWhether to remove all choices after the first successful choice at each level in the search tree. cabal-install-solver'Various options for the modular solver. cabal-install-solverRun all solver phases.)In principle, we have a valid tree after validationPhase, which means that every * node should correspond to valid solution.There is one exception, though, and that is cycle detection, which has been added relatively recently. Cycles are only removed directly before exploration. cabal-install-solver.Dump solver tree to a file (in debugging mode) This only does something if the debug-tracetree configure argument was given; otherwise this is just the identity function. cabal-install-solver=Replace all goal reasons with a dummy goal reason in the treeThis is useful for debugging (when experimenting with the impact of GRs) cabal-install-solversolver parameterscabal-install-solver"all available packages as an indexcabal-install-solveravailable pkg-config pkgscabal-install-solver preferencescabal-install-solverglobal constraintscabal-install-solver global goals cabal-install-solver Output filecabal-install-solver-Function to summarize the tree before dumping  2 Safe-Inferred7 cabal-install-solverTies the two worlds together: classic cabal-install vs. the modular solver. Performs the necessary translations before and after. cabal-install-solverRun 67 and then produce a summarized log to display in the error case.When there is no solution, we produce the error message by rerunning the solver but making it prefer the goals from the final conflict set from the first run (or a subset of the final conflict set with --minimize-conflict-set). We also set the backjump limit to 0, so that the log stops at the first backjump and is relatively short. Preferring goals from the final conflict set increases the probability that the log to the first backjump contains package, flag, and stanza choices that are relevant to the final failure. The solver shouldn't need to choose any packages that aren't in the final conflict set. (For every variable in the final conflict set, the final conflict set should also contain the variable that introduced that variable. The solver can then follow that chain of variables in reverse order from the user target to the conflict.) However, it is possible that the conflict set contains unnecessary variables.Producing an error message when the solver reaches the backjump limit is more complicated. There is no final conflict set, so we create one for the minimal subtree containing the path that the solver took to the first backjump. This conflict set helps explain why the solver reached the backjump limit, because the first backjump contributes to reaching the backjump limit. Additionally, the solver is much more likely to be able to finish traversing this subtree before the backjump limit, since its size is linear (not exponential) in the number of goal choices. We create it by pruning all children after the first successful child under each node in the original tree, so that there is at most one valid choice at each level. Then we use the final conflict set from that run to generate an error message, as in the case where the solver found that there was no solution.Using the full log from a rerun of the solver ensures that the log is complete, i.e., it shows the whole chain of dependencies from the user targets to the conflicting packages. cabal-install-solverTry to remove variables from the given conflict set to create a minimal conflict set.Minimal means that no proper subset of the conflict set is also a conflict set, though there may be other possible conflict sets with fewer variables. This function minimizes the input by trying to remove one variable at a time. It only makes one pass over the variables, so it runs the solver at most N times when given a conflict set of size N. Only one pass is necessary, because every superset of a conflict set is also a conflict set, meaning that failing to remove variable X from a conflict set in one step means that X cannot be removed from any subset of that conflict set in a subsequent step.Example steps:Start with {A, B, C}. Try to remove A from {A, B, C} and fail. Try to remove B from {A, B, C} and succeed. Try to remove C from {A, C} and fail. Return {A, C}'This function can fail for two reasons: The solver can reach the backjump limit on any run. In this case the returned RetryLog ends with BackjumpLimitReached. TODO: Consider applying the backjump limit to all solver runs combined, instead of each individual run. For example, 10 runs with 10 backjumps each should count as 100 backjumps.Since this function works by rerunning the solver, it is possible for the solver to add new unnecessary variables to the conflict set. This function discards the result from any run that adds new variables to the conflict set, but the end result may not be completely minimized. cabal-install-solverGoal ordering that chooses goals contained in the conflict set before other goals. cabal-install-solver0Goal ordering that chooses the given goal first.  89:;<=8>?8>@8AB89C89D89E8FG8FH8IJ8KL8KM8KN8KO;PQ;PR8FS89T89U89V89W8XY8Z[8\]8I^8I_8I`8Ia8bc89d89e89f89g89h89i89j89k8Kl8Km;Pn8op8Iq8Ir89s8tu89v8Fw;Px8yz8I{8o|8I}8~88X8\898888989;89;;;;88888;8I;;;888888989;88;88;;;8889888888888888888K8K8K8K8K8K;P8o8o8o8o8o8o8o8o8o8o8o8o8o8o8o8o8o8o8I8I8I8I8I8I8I8I8F8F8F8F;P;P;P;P;P;P8y8y8o8o8o8o8o8o8o8o8o8o8o8o8o8o8I8I8I8I8I8~8~8~8989898889898989898989898~8888888888888888888888;P;P;P8888989898989898989898989898989898F888888888>8>8>8>8>8>8>8>8>8>8>8>8>8>8>8>8>8>8>8>8>8>8>8~8~8~8~88I8I8I8I8I8I888888888888888y8y8888888888888888888888888888888888A8A8A8A8A8A8A8A8A8A8A8A88b8b8b88888888D??                @                                                                                                           !!!!!!!!!!!"""""""""####$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ $ $ $ $ $ $ $ $ % & & ' ' ' ' ' ' ' ' ' ' ' ' ( ( ( ( ( ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) ) ) ) ) ) ) * * * * * * * * * * * * * + + + + + + + + + + + + , - - - . / / / / / / 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 172 8                                    ! ! % % % % % % % & & & & & & & & & & & & & & & & &   - - - - - - - - - - - -   -         - - - - 0 0 0 0 0 0 1 1 2 2 2 2 4cabal-install-solver-3.10.3.0-7nvP90ZYgwqExRXxXwBy9X"Distribution.Solver.Compat.Prelude#Distribution.Solver.Modular.Package(Distribution.Solver.Modular.LabeledGraph#Distribution.Client.Utils.Assertion(Distribution.Solver.Modular.MessageUtilsDistribution.Solver.Modular.PSQ#Distribution.Solver.Modular.Version'Distribution.Solver.Modular.WeightedPSQ'Distribution.Solver.Types.ComponentDeps*Distribution.Solver.Types.ConstraintSourceDistribution.Solver.Types.Flag-Distribution.Solver.Types.InstalledPreference(Distribution.Solver.Types.OptionalStanza*Distribution.Solver.Types.PackageFixedDeps&Distribution.Solver.Types.PackageIndex%Distribution.Solver.Types.PackagePath+Distribution.Solver.Types.PackageConstraint2Distribution.Solver.Types.LabeledPackageConstraint&Distribution.Solver.Modular.Configured Distribution.Solver.Modular.FlagDistribution.Solver.Modular.Var'Distribution.Solver.Modular.ConflictSet&Distribution.Solver.Modular.Dependency Distribution.Solver.Modular.Tree!Distribution.Solver.Modular.Index"Distribution.Solver.Modular.Cycles&Distribution.Solver.Modular.Assignment#Distribution.Solver.Modular.Linking,Distribution.Solver.Types.PackagePreferences%Distribution.Solver.Types.PkgConfigDb$Distribution.Solver.Modular.Validate"Distribution.Solver.Types.Progress#Distribution.Solver.Modular.Message$Distribution.Solver.Modular.RetryLogDistribution.Solver.Modular.Log"Distribution.Solver.Types.Settings#Distribution.Solver.Modular.Explore#Distribution.Solver.Modular.Builder"Distribution.Solver.Types.SolverId+Distribution.Solver.Types.InstSolverPackage'Distribution.Solver.Types.SourcePackage'Distribution.Solver.Types.SolverPackage)Distribution.Solver.Types.ResolverPackage,Distribution.Solver.Types.DependencyResolver+Distribution.Solver.Modular.IndexConversion0Distribution.Solver.Modular.ConfiguredConversion"Distribution.Solver.Types.Variable&Distribution.Solver.Modular.Preference"Distribution.Solver.Modular.SolverDistribution.Solver.Modularcabal-install-solver InstallPlan PlanPackageD.S.Modular.SolversolvebaseGHC.Base++ghc-primGHC.PrimseqGHC.Listfilterzip System.IOprint otherwisemap$GHC.Num fromInteger-GHC.Real fromRationalGHC.EnumenumFrom enumFromThen enumFromToenumFromThenTo GHC.Classes==>=negate>>=>>fmapreturnControl.Monad.Failfail Control.Arrowfirst Data.String fromString fromIntegral realToFrac toInteger toRational Control.Monadguard<>memptymappendmconcatjoin<*>pure*>BoundedEnumEq GHC.FloatFloating FractionalIntegralMonad Data.DataDataFunctorNumOrdGHC.ReadReadReal RealFloatRealFracGHC.ShowShowData.Typeable.InternalTypeable MonadFailIsString Applicative Data.FoldableFoldableData.Traversable Traversable GHC.GenericsGeneric SemigroupMonoid GHC.TypesBoolStringCharDoubleFloatIntGHC.IntInt8Int16Int32Int64 ghc-bignumGHC.Num.IntegerInteger GHC.MaybeMaybeOrderingRational~IOWordGHC.WordWord8Word16Word32Word64 Data.EitherEitherVoidNonEmptyFalseNothingJustTrueLeftRightLTEQGTData.Ord comparing Data.OldList intercalate,Cabal-syntax-3.10.3.0-3TLq44vQAUeAzR2joBndZPDistribution.Types.PackageName PackageName<$traverse sequenceAtoListfoldMapfoldrfoldlfoldl'nulllengthelemmaximumminimumsumproductminBoundmaxBoundsuccpredtoEnumfromEnum/=piexplogsqrt**logBasesincostanasinacosatansinhcoshtanhasinhacoshatanh/recipquotremdivmodquotRemdivMod+*abssignumcompare<<=>maxmin readsPrecreadList floatRadix floatDigits floatRange decodeFloat encodeFloatexponent significand scaleFloatisNaN isInfiniteisDenormalizedisNegativeZeroisIEEEatan2properFractiontruncateroundceilingfloor showsPrecshowshowListliftA2<*:|GHC.Exception.Type SomeException MonadPlusmzeromplus Alternativeempty<|>somemanyShowSText.ParserCombinators.ReadPReadS Data.ProxyProxyData.Functor.ConstConstgetConst Data.TypeableTypeRep Exception toException fromExceptiondisplayExceptionGHC.IO.ExceptionIOError IOExceptionGHC.IOFilePathExitCode ExitSuccess ExitFailureData.Functor.IdentityIdentity runIdentitybinary-0.8.9.1Data.Binary.ClassBinaryputgetputListcontainers-0.6.7Data.Set.InternalSetData.Map.InternalMapdeepseq-1.4.8.1Control.DeepSeqNFDatarnfDistribution.Utils.Structured StructuredDistribution.Compat.NonEmptySet NonEmptySetdeepseqnubnubBy&&||notGHC.ErrerrorerrorWithoutStackTrace undefinedabsurdvacuous=<<whenliftMliftM2apordidconst.flip$!untilasTypeOfsubtract Data.MaybemaybeisJust isNothing fromMaybe maybeToList listToMaybe catMaybesmapMaybescanlscanl1scanrscanr1iteraterepeat replicatecycle takeWhile dropWhiletakedropsplitAtspanbreakreverselookup!!zip3zipWithzipWith3unzipunzip3showsshowChar showString showParenGHC.Charchrevenodd^^^gcdlcm Data.Tuplefstsndcurryuncurry Data.Functor<$>void Data.Functionon GHC.UnicodeisSpaceisUpperisAlpha isAlphaNumisDigittoUppertoLower readParenlexeitherpartitionEithers Text.Readreads readMaybe traverse_for_ sequence_concat concatMapandoranyallnotElemfindtypeRep dropWhileEnd isPrefixOf isSuffixOf intersperse partitionsortsortByunfoldrlinesunlineswordsunwords userErrorcatchthrowIOevaluateioErrorputCharputStrputStrLngetChargetLine getContentsinteractreadFile writeFile appendFilereadLnreadIOforfilterMfoldMunless System.ExitexitWith exitFailure exitSuccessData.List.NonEmptynonEmptyheadtaillastinitforcepretty-1.1.3.6Text.PrettyPrint.HughesPJ<+>Distribution.Compat.ExceptiontryIOcatchIO catchExitDistribution.Compat.SemigroupgmappendgmemptyDistribution.Compat.Prelude<<>> genericRnffoldr1foldl1trace traceShowId traceShowDistribution.Types.PackageId PackageIdPackageIdentifier Distribution.Types.PkgconfigName PkgconfigNamepkgName pkgVersionunPkgconfigNamemkPkgconfigName unPackageName mkPackageName Data.GraphVertexexpensiveAssertGraphgraphFromEdgesgraphFromEdges' transposeGbuildGverticesedges forgetLabelstopSortshowUnsupportedExtensionshowUnsupportedLanguageallKnownExtensionsmostSimilarElement cutoffRange withinRangePSQkeysmapKeys mapWithKeyfromListconssnoccasePSQ sortByKeys maximumBy minimumByprefer preferByKeys filterIfAnyfilterIfAnyByKeys filterKeys isZeroOrOne firstOnlyunion$fEqPSQ $fShowPSQ $fFunctorPSQ $fFoldablePSQ$fTraversablePSQVRVershowVershowVRanyVReqVR.&&..||. simplifyVRcheckVR WeightedPSQweightsmapWeightsWithKeytraverseWithKey takeUntil$fEqWeightedPSQ$fShowWeightedPSQ$fFunctorWeightedPSQ$fFoldableWeightedPSQ$fTraversableWeightedPSQ ComponentDeps ComponentDep Component ComponentLibComponentSubLib ComponentFLib ComponentExe ComponentTestComponentBenchComponentSetupcomponentNameToComponent singletoninsert filterDepsfromLibraryDeps fromSetupDeps fromInstalledflatDeps nonSetupDeps libraryDeps components setupDepsselect$fPrettyComponent$fStructuredComponent$fBinaryComponent$fStructuredComponentDeps$fBinaryComponentDeps$fTraversableComponentDeps$fFoldableComponentDeps$fSemigroupComponentDeps$fMonoidComponentDeps$fShowComponentDeps$fFunctorComponentDeps$fEqComponentDeps$fOrdComponentDeps$fGenericComponentDeps$fShowComponent $fEqComponent$fOrdComponent$fGenericComponentConstraintSourceConstraintSourceMainConfigConstraintSourceProjectConfigConstraintSourceUserConfigConstraintSourceCommandlineFlagConstraintSourceUserTarget%ConstraintSourceNonUpgradeablePackageConstraintSourceFreeze"ConstraintSourceConfigFlagOrTargetConstraintSourceUnknownConstraintSetupCabalMinVersionConstraintSetupCabalMaxVersionshowConstraintSource$fStructuredConstraintSource$fBinaryConstraintSource$fEqConstraintSource$fShowConstraintSource$fGenericConstraintSourceFlagTypeManual Automatic $fEqFlagType$fShowFlagTypeInstalledPreferencePreferInstalled PreferLatest PreferOldest$fShowInstalledPreferenceOptionalStanzaMapOptionalStanzaSetOptionalStanza TestStanzas BenchStanzas showStanza showStanzas enableStanzasoptStanzaSetFromListoptStanzaSetToListoptStanzaSetInsertoptStanzaSetMemberoptStanzaSetSingletonoptStanzaSetIntersectionoptStanzaSetNulloptStanzaSetIsSubsetoptStanzaTabulateoptStanzaIndexoptStanzaLookupoptStanzaKeysFilteredByValue$fStructuredOptionalStanza$fBinaryOptionalStanza$fMonoidOptionalStanzaSet$fSemigroupOptionalStanzaSet$fStructuredOptionalStanzaSet$fBinaryOptionalStanzaSet$fStructuredOptionalStanzaMap$fBinaryOptionalStanzaMap$fEqOptionalStanzaMap$fOrdOptionalStanzaMap$fShowOptionalStanzaMap$fGenericOptionalStanzaMap$fEqOptionalStanzaSet$fOrdOptionalStanzaSet$fShowOptionalStanzaSet$fEqOptionalStanza$fOrdOptionalStanza$fEnumOptionalStanza$fBoundedOptionalStanza$fShowOptionalStanza$fGenericOptionalStanzaPackageFixedDepsdepends&$fPackageFixedDepsInstalledPackageInfo SearchResultNone Unambiguous Ambiguous PackageIndexmergeoverridedeletePackageIddeletePackageNamedeleteDependency allPackagesallPackagesByNameelemByPackageIdelemByPackageNamelookupPackageIdlookupPackageNamelookupDependency searchByNamesearchByNameSubstringsearchWithPredicate$fBinaryPackageIndex$fMonoidPackageIndex$fSemigroupPackageIndex$fEqPackageIndex$fShowPackageIndex$fReadPackageIndex$fFunctorPackageIndex$fGenericPackageIndexQPN QualifiedQ Qualifier QualToplevelQualBase QualSetupQualExe NamespaceDefaultNamespace Independent PackagePath dispQualifierdispQPNshowQPN $fEqQualified$fOrdQualified$fShowQualified$fEqPackagePath$fOrdPackagePath$fShowPackagePath $fEqQualifier$fOrdQualifier$fShowQualifier $fEqNamespace$fOrdNamespace$fShowNamespacePackageConstraintPackagePropertyPackagePropertyVersionPackagePropertyInstalledPackagePropertySourcePackagePropertyFlagsPackagePropertyStanzasConstraintScope ScopeTargetScopeQualifiedScopeAnySetupQualifierScopeAnyQualifier scopeToplevelscopeToPackageNameconstraintScopeMatchesdispPackagePropertydispPackageConstraintshowPackageConstraintpackageConstraintToDependency$fStructuredPackageProperty$fBinaryPackageProperty$fEqPackageConstraint$fShowPackageConstraint$fEqPackageProperty$fShowPackageProperty$fGenericPackageProperty$fEqConstraintScope$fShowConstraintScopeLabeledPackageConstraintunlabelPackageConstraintPIILocInstInRepoQPVPNunPNshowIshowPIinstI primaryPPsetupPPmakeIndependent$fEqPI$fOrdPI$fShowPI $fFunctorPI$fEqI$fOrdI$fShowI$fEqLoc$fOrdLoc $fShowLocCP FlagValueFlagTrue FlagFalseFlagBoth WeakOrTrivialunWeakOrTrivialQSNSNQFNFlagInfoFInfofdefaultfmanualfweakStanzaFlagFNmkFlag showQFNBool showQSNBool showFlagValue showSBoolshowQFNshowQSN $fEqFlagValue$fShowFlagValue $fEqFInfo $fShowFInfo$fEqWeakOrTrivial$fOrdWeakOrTrivial$fShowWeakOrTrivial$fEqSN$fOrdSN$fShowSN $fFunctorSN$fEqFN$fOrdFN$fShowFN $fFunctorFNVarPFSshowVarvarPN$fEqVar$fOrdVar $fShowVar $fFunctorVar ConflictMapOrderedVersionRangeConflict GoalConflictVersionConstraintConflictVersionConflict OtherConflict ConflictSetshowConflictSetshowCSSortedByFrequencyshowCSWithFrequencytoSetunionsdeletesingletonWithConflictsizemember$fOrdOrderedVersionRange$fOrdConflictSet$fEqConflictSet$fShowConflictSet $fEqConflict $fOrdConflict$fShowConflict$fEqOrderedVersionRange$fShowOrderedVersionRange QGoalReason GoalReasonUserGoalDependencyGoalGoal RevDepMapQualifyOptionsQO qoBaseShimqoSetupIndependentDependencyReasonExposedComponent ExposedLib ExposedExe PkgComponentDepExtLangPkgLDep FlaggedDepFlaggedSimple FlaggedDepsCIFixed ConstrainedflattenFlaggedDepsshowDependencyReason qualifyDeps unqualifyDeps goalToVarvarToConflictSetgoalReasonToConflictSet#goalReasonToConflictSetWithConflictdependencyReasonToConflictSet:dependencyReasonToConflictSetWithVersionConstraintConflict0dependencyReasonToConflictSetWithVersionConflict$fEqGoal $fShowGoal $fFunctorGoal$fEqGoalReason$fShowGoalReason$fFunctorGoalReason$fShowQualifyOptions$fFunctorDependencyReason$fEqDependencyReason$fShowDependencyReason $fFunctorDep$fEqPkgComponent$fOrdPkgComponent$fFunctorPkgComponent$fShowPkgComponent$fEqExposedComponent$fOrdExposedComponent$fShowExposedComponent$fEqCI$fShowCI EndoTreeTravTreeTravTreeFPChoiceFFChoiceFSChoiceF GoalChoiceFDoneFFailFConflictingDep FailReasonUnsupportedExtensionUnsupportedLanguageMissingPkgconfigPackage(NewPackageDoesNotMatchExistingConstraintConflictingConstraints$NewPackageIsMissingRequiredComponent%NewPackageHasPrivateRequiredComponent)NewPackageHasUnbuildableRequiredComponentPackageRequiresMissingComponentPackageRequiresPrivateComponent#PackageRequiresUnbuildableComponent CannotInstallCannotReinstall NotExplicitShadowedBrokenUnknownPackageGlobalConstraintVersionGlobalConstraintInstalledGlobalConstraintSourceGlobalConstraintFlag ManualFlagMalformedFlagChoiceMalformedStanzaChoiceEmptyGoalChoiceBackjumpMultipleInstancesDependenciesNotLinkedCyclicDependenciesUnsupportedSpecVerPOptionTreePChoiceFChoiceSChoice GoalChoiceDoneFailWeightinninnMactivezeroOrOneChoicescatatravparaana$fFunctorTreeF$fFoldableTreeF$fTraversableTreeF$fEqFailReason$fShowFailReason$fEqConflictingDep$fShowConflictingDep $fEqPOption $fShowPOption IsBuildable IsVisible ComponentInfo compIsVisiblecompIsBuildablePInfoIndexmkIndexdefaultQualifyOptions$fShowComponentInfo$fEqIsBuildable$fShowIsBuildable $fEqIsVisible$fShowIsVisibledetectCyclesPhase$fIsNodeRevDepMapNode AssignmentA SAssignment FAssignment PAssignmenttoCPs$fShowAssignment$fEqAssignmentvalidateLinking$$fMonadStateValidateStateUpdateState$fFunctorUpdateState$fApplicativeUpdateState$fMonadUpdateState$fShowLinkGroup $fEqLinkGroupPackagePreferences PkgConfigDb NoPkgConfigDbreadPkgConfigDbpkgConfigDbFromListpkgConfigPkgIsPresentpkgConfigDbPkgVersiongetPkgConfigDbDirs$fStructuredPkgConfigDb$fBinaryPkgConfigDb$fShowPkgConfigDb$fGenericPkgConfigDb validateTree$fFunctorValidate$fApplicativeValidate$fMonadValidate"$fMonadReaderValidateStateValidateProgressStep foldProgress$fAlternativeProgress$fApplicativeProgress$fMonadProgress$fFunctorProgressMessageEnterLeaveTryPTryFTrySNextSkipSuccessFailure showMessagesRetryLog toProgress fromProgress mapFailureretryfailWith succeedWith continueWithtryWith SolverFailureExhaustiveSearchBackjumpLimitReacheddisplayLogMessagesSolveExecutablesEnableBackjumpingOnlyConstrainedOnlyConstrainedNoneOnlyConstrainedAllAllowBootLibInstalls StrongFlags ShadowPkgsAvoidReinstallsIndependentGoalsMinimizeConflictSetFineGrainedConflictsCountConflicts ReorderGoals$fStructuredReorderGoals$fBinaryReorderGoals$fStructuredCountConflicts$fBinaryCountConflicts $fStructuredFineGrainedConflicts$fBinaryFineGrainedConflicts$fStructuredMinimizeConflictSet$fBinaryMinimizeConflictSet$fStructuredIndependentGoals$fBinaryIndependentGoals$fStructuredPreferOldest$fBinaryPreferOldest$fStructuredAvoidReinstalls$fBinaryAvoidReinstalls$fStructuredShadowPkgs$fBinaryShadowPkgs$fStructuredStrongFlags$fBinaryStrongFlags $fStructuredAllowBootLibInstalls$fBinaryAllowBootLibInstalls$fParsecOnlyConstrained$fPrettyOnlyConstrained$fStructuredOnlyConstrained$fBinaryOnlyConstrained$fStructuredSolveExecutables$fBinarySolveExecutables$fBooleanFlagSolveExecutables$fEqSolveExecutables$fGenericSolveExecutables$fShowSolveExecutables$fBooleanFlagEnableBackjumping$fEqEnableBackjumping$fGenericEnableBackjumping$fShowEnableBackjumping$fEqOnlyConstrained$fGenericOnlyConstrained$fShowOnlyConstrained!$fBooleanFlagAllowBootLibInstalls$fEqAllowBootLibInstalls$fGenericAllowBootLibInstalls$fShowAllowBootLibInstalls$fBooleanFlagStrongFlags$fEqStrongFlags$fGenericStrongFlags$fShowStrongFlags$fBooleanFlagShadowPkgs$fEqShadowPkgs$fGenericShadowPkgs$fShowShadowPkgs$fBooleanFlagAvoidReinstalls$fEqAvoidReinstalls$fGenericAvoidReinstalls$fShowAvoidReinstalls$fBooleanFlagPreferOldest$fEqPreferOldest$fGenericPreferOldest$fShowPreferOldest$fBooleanFlagIndependentGoals$fEqIndependentGoals$fGenericIndependentGoals$fShowIndependentGoals $fBooleanFlagMinimizeConflictSet$fEqMinimizeConflictSet$fGenericMinimizeConflictSet$fShowMinimizeConflictSet!$fBooleanFlagFineGrainedConflicts$fEqFineGrainedConflicts$fGenericFineGrainedConflicts$fShowFineGrainedConflicts$fBooleanFlagCountConflicts$fEqCountConflicts$fGenericCountConflicts$fShowCountConflicts$fBooleanFlagReorderGoals$fEqReorderGoals$fGenericReorderGoals$fShowReorderGoalsbackjumpAndExplore buildTreesplitsSolverId PreExistingId PlannedId solverSrcId solverInstId$fPackageSolverId$fShowSolverId$fStructuredSolverId$fBinarySolverId $fEqSolverId $fOrdSolverId$fGenericSolverIdInstSolverPackageinstSolverPkgIPIinstSolverPkgLibDepsinstSolverPkgExeDeps$fHasUnitIdInstSolverPackage%$fHasMungedPackageIdInstSolverPackage$fPackageInstSolverPackage$fStructuredInstSolverPackage$fBinaryInstSolverPackage$fEqInstSolverPackage$fShowInstSolverPackage$fGenericInstSolverPackagePackageDescriptionOverride SourcePackagesrcpkgPackageIdsrcpkgDescription srcpkgSourcesrcpkgDescrOverride$fPackageSourcePackage$fStructuredSourcePackage$fBinarySourcePackage$fEqSourcePackage$fShowSourcePackage$fGenericSourcePackage SolverPackagesolverPkgSourcesolverPkgFlagssolverPkgStanzassolverPkgLibDepssolverPkgExeDeps$fPackageSolverPackage$fStructuredSolverPackage$fBinarySolverPackage$fEqSolverPackage$fShowSolverPackage$fGenericSolverPackageResolverPackage PreExisting ConfiguredresolverPackageLibDepsresolverPackageExeDeps$fIsNodeResolverPackage$fPackageResolverPackage$fStructuredResolverPackage$fBinaryResolverPackage$fEqResolverPackage$fShowResolverPackage$fGenericResolverPackageDependencyResolverconvPIs$fEqSimpleFlaggedDepKey$fOrdSimpleFlaggedDepKeyconvCPVariable PackageVarFlagVar StanzaVar $fEqVariable$fShowVariable preferLinkedpreferPackagePreferencesenforcePackageConstraintsenforceManualFlagsrequireInstalledavoidReinstallsonlyConstrained sortGoalspruneAfterFirstSuccess firstGoalpreferBaseGoalChoicedeferSetupExeChoicesdeferWeakFlagChoicespreferReallyEasyGoalChoices enforceSingleInstanceRestrictionPruneAfterFirstSuccess SolverConfig reorderGoalscountConflictsfineGrainedConflictsminimizeConflictSetindependentGoals shadowPkgs strongFlagsallowBootLibInstalls maxBackjumpsenableBackjumpingsolveExecutables goalOrdersolverVerbositymodularResolverfold)Distribution.Types.ComponentRequestedSpecComponentRequestedSpec mergeBuckets dispNamespacedispConstraintScopePIdPVconflictSetToMap findCycles LinkGroup lgPackagelgCanon lgMemberslgBlamelinkDeps linkNewDeps verifyFlag' verifyStanza' lgInvariant lgInstance lgSingletonVROrigin MergedPkgDepComponentDependencyReasonsPkgDepPPreAssignment PreAssignment ValidateStatecheckComponentsInNewPackageextractAllDepsextractNewDepsextendextendWithPackageChoice#createConflictSetForVersionConflictextendRequiredComponentsMergedPackageConflict showConflicts ExploreStatebackjumpavoidSet logBackjumpretryNoSolutionassign exploreLogOpenGoal BuildTypeGoalsOneGoalInstance LinkingState BuildStateindexrdepsopennextqualifyOptionsLinker extendOpenscopedExtendOpen addLinkingcloseDistribution.Types.UnitIdUnitIdconvIPI'convIdconvIPconvIPIdconvSPI'convSPconvGPDtestConditionForComponentprefixflagInfo convCondTree convBranchDistribution.Types.CondTreeCondTreemergeSimpleDepsDistribution.SystemOSArchDistribution.Compiler CompilerInfoDistribution.Types.BuildInfo BuildInfounionDRs convLibDeps convExeDepconvSetupBuildInfo EnforceSIR addWeightspreferPackageStanzaPreferencesprocessPackageConstraintPprocessPackageConstraintFprocessPackageConstraintS traceTree _removeGRsolve'tryToMinimizeConflictSetpreferGoalsFromConflictSet preferGoal