k_5,      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                              !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     !!!!"""############$$$%&&''''''''(-)portableStable/Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>No unliteration. : takes a filename (for error reports), and transforms the K given string, to eliminate the literate comments from the program text. *+portable experimentallibraries@haskell.org@Return a string describing the usage of a command, derived from ? the header (first argument) and the options described by the  second argument. EProcess the command-line, and return the list of values that matched (and those that didn't). The arguments are:  The order requirements (see +)  The option descriptions (see +) 9 The actual command line arguments (presumably got from  System.Environment.getArgs). += returns a triple consisting of the option arguments, a list .of non-options, and a list of error messages. This is almost the same as +, but returns a quadruple Econsisting of the option arguments, a list of non-options, a list of 4unrecognized options, and a list of error messages. @Describes whether an option takes an argument or not, and if so 3 how the argument is injected into a value of type a. Each + describes a single option. The arguments to + are: ! list of short option characters & list of long option strings (without "--")  argument descriptor  explanation of option for user .What to do with options following non-options  portable provisionallibraries@haskell.org"portablealpha%Isaac Jones <ijones@syntaxpolice.org>#Parser with simple error reporting   portablealpha%Isaac Jones <ijones@syntaxpolice.org>   portablealpha%Isaac Jones <ijones@syntaxpolice.org>,- for 1s is really really slow so for the Text instance G what we do is make a simple table indexed off the first letter in the > extension name. The extension names actually cover the range 'A'-'U' 1 pretty densely and the biggest bucket is 7 so it's not too bad. We just do % a linear search within each bucket. EThis gives an order of magnitude improvement in parsing speed, and it'll F also allow us to do case insensitive matches in future if we prefer. ?This represents language extensions beyond Haskell 98 that are B supported by some implementations, usually in some special mode. 6 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP6 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP.portablealpha%Isaac Jones <ijones@syntaxpolice.org>5 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP5 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP3How strict to be when classifying strings into the d and S enums. KThe reason we have multiple ways to do the classification is because there , are two situations where we need to do it. LFor parsing os and arch names in .cabal files we really want everyone to be L referring to the same or or arch by the same name. Variety is not a virtue  in this case. We don't mind about case though. For the System.Info.os/5arch different Haskell implementations use different  names for the same or/3arch. Also they tend to distinguish versions of an  os/arch which we just don't care about. The @ classification allows us to recognise aliases that are already L in common use but it allows us to distinguish them from the canonical name 9 which enables us to warn about such deprecated aliases. QRSTUVWXYZ[\]^_`abcdefghijklmnodefghijklmnoQSTUVWXYZ[\]^_`abcRportablealpha%Isaac Jones <ijones@syntaxpolice.org>u/Does this version fall within the given range? pqrstuvwxyz{|}~xyz{|}~qrstupvw portablealpha%Isaac Jones <ijones@syntaxpolice.org>@This datatype indicates the license under which your package is D released. It is also wise to add your license to each source file $ using the license-file field. The   constructor ? is not actually a license, but states that you are not giving E anyone else a license to use or distribute your work. The comments D below are general guidelines. Please read the licenses themselves B and consult a lawyer if you are unsure of your rights to release  the software.   portablealpha%Isaac Jones <ijones@syntaxpolice.org>@Subclass of packages that have specific versioned dependencies. HSo for example a not-yet-configured package has dependencies on version M ranges, not specific versions. A configured or an already installed package E depends on exact versions. Some operations or data structures (like H dependency graphs) only make sense on this subclass of package types. ,Class of things that can be identified by a   ITypes in this class are all notions of a package. This allows us to have H different types for the different phases that packages go though, from  simple name/;id, package description, configured or installed packages. #The name and version of a package. "The name of this package, eg. foo $the version of this package, eg 1.2  portablealpha%Isaac Jones <ijones@syntaxpolice.org>DNon fatal conditions that may be indicative of an error or problem. We display these at the   verbosity level. Useful status messages. We display these at the   verbosity level. FThis is for the ordinary helpful status messages that users see. Just N enough information to know that things are working but not floods of detail. -More detail on the operation of some action. 6We display these messages when the verbosity level is   (Detailed internal debugging information 6We display these messages when the verbosity level is  GPerform an IO action, catching any IO exceptions and printing an error  if one occurs. GWraps text to the default line width. Existing newlines are preserved. IWraps a list of words to a list of lines of words of a particular width. %Run a command and return its output. -The output is assumed to be encoded as UTF8. /Like the unix xargs program. Useful for when we've got very long command I lines that might overflow an OS limit on command line length and so you A need to invoke a command multiple times to get all the args in. AUse it with either of the rawSystem variants above. For example: B xargs (32*1024) (rawSystemExit verbosity) prog fixedArgs bigArgs 0Executes the action in the specified directory. >Copy the source files into the right directory. Looks in the C build prefix for files that look like the input modules, based on A the input search suffixes. It copies the files into the target  directory. HCopies a bunch of files to a target directory, preserving the directory N structure in the target location. The target directories are created if they  do not exist. LThe files are identified by a pair of base directory and a path relative to B that base. It is only the relative part that is preserved in the  destination.  For example:   copyFiles normal "dist/src" 8 [("", "src/Foo.hs"), ("dist/build/", "src/Bar.hs")] This would copy "src/Foo.hs" to "dist/src/src/Foo.hs" and  copy "dist/build/src/Bar.hs" to "dist/src/src/Bar.hs". LThis operation is not atomic. Any IO failure during the copy (including any N missing source files) leaves the target in an unknown state so it is best to M use it with a freshly created directory so that it can be simply deleted if  anything goes wrong. #Use a temporary filename that doesn't already exist. Use a temporary directory. 7Use this exact given dir which must not already exist. @Gets the contents of a file, but guarantee that it gets closed. KThe file is read lazily but if it is not fully consumed by the action then : the remaining input is truncated and the file is closed. Writes a file atomically. HThe file is either written sucessfully or an IO exception is raised and & the original file is left unchanged. I Warning: On Windows this operation is very nearly but not quite atomic.  See below. KOn Posix it works by writing a temporary file and atomically renaming over > the top any pre-existing target file with the temporary one. LOn Windows it is not possible to rename over an existing file so the target L file has to be deleted before the temporary file is renamed to the target. M Therefore there is a race condition between the existing file being removed I and the temporary file being renamed. Another thread could write to the N target or change the permission on the target directory between the deleting L and renaming steps. An exception would be raised but the target file would L either no longer exist or have the content as written by the other thread. JOn windows it is not possible to delete a file that is open by a process. N This case will give an IO exception but the atomic property is not affected. 5The path name that represents the current directory.  In Unix, it's ".", but this is system-specific. % (E.g. AmigaOS uses the empty string "" for the current directory.) Package description file (pkgname.cabal) CFind a package description file in the given directory. Looks for  .cabal files. -Optional auxiliary package information file (pkgname .buildinfo) ;Find auxiliary package information in the given directory.  Looks for  .buildinfo files. 3Reads a UTF8 encoded text file as a Unicode String Reads lazily using ordinary ,/. 3Reads a UTF8 encoded text file as a Unicode String Same behaviour as  . 5Writes a Unicode String as a UTF8 encoded text file. Uses  #, so provides the same guarantees. //  GHC, Hugsalpha%Isaac Jones <ijones@syntaxpolice.org>'The full path of a configured program. Make a simple named program.  By default we':ll just search for it in the path and not try to find the C version name. You can override these behaviours if necessary, eg: L simpleProgram "foo" { programFindLocation = ... , programFindVersion ... }  Look for a program on the path. %Look for a program and try to find it' s version number. It can accept K either an absolute path or the name of a program binary, in which case we ( will look for the program on the path. 0Add a known program that we may configure later AUser-specify this path. Basically override any path information - for this program in the configuration. If it's not a known  program ignore it. AUser-specify the arguments for this program. Basically override B any args information for this program in the configuration. If it's " not a known program, ignore it.. !Try to find a configured program -Update a configured program in the database. KTry to configure a specific program. If the program is already included in G the colleciton of unconfigured programs then we use any user-supplied M location and arguments. If the program gets configured sucessfully it gets % added to the configured collection. ENote that it is not a failure if the program cannot be configured. It's only N a failure if the user supplied a location and the program could not be found  at that location. BThe reason for it not being a failure at this stage is that we don' t know up G front all the programs we will need, so we try to configure them all. B To verify that a program was actually sucessfully configured use   . KTry to configure all the known programs that have not yet been configured. <Check that a program is configured and available to be run. GAdditionally check that the version of the program number is suitable.  For example ~ or orLaterVersion (,0,0 [1,0] []) MIt raises an exception if the program could not be configured or the version = is unsuitable, otherwise it returns the configured program. #Runs the given configured program. 7Runs the given configured program and gets the output. ELooks up the given program in the program configuration and runs it. ELooks up the given program in the program configuration and runs it. The default list of programs. 8 These programs are typically used internally to Cabal. DThe configuration is a collection of information about programs. It M contains information both about configured programs and also about programs  that we are yet to configure. MThe idea is that we start from a collection of unconfigured programs and one F by one we try to configure them at which point we move them into the I configured collection. For unconfigured programs we record not just the    D but also any user-provided arguments and location for the program. 3Where a program was found. Also tells us whether it's specifed by user or A not. This includes not just the path, but the program as well. Just the name again -The version of this program, if it is known. ,Default command-line args for this program. C These flags will appear first on the command line, so they can be ! overridden by subsequent flags. Location of the program. eg. /usr/bin/ghc-6.4 .Represents a program which can be configured. (The simple name of the program, eg. ghc *A function to search for the program if it's location was not 5 specified by the user. Usually this will just be a BTry to find the version of the program. For many programs this is ' not possible or is not necessary so it's ok to return Nothing. == portable provisional"Duncan Coutts <duncan@haskell.org>DLookup a name in the index to get all packages that match that name  case-insensitively. !Build an index out of a bunch of  s. 7If there are duplicates, later ones mask earlier ones. Merge two indexes. >Packages from the second mask packages of the same exact name $ (case-sensitively) from the first. 5Elements in the second list mask those in the first. )Inserts a single package into the index. 8This is equivalent to (but slightly quicker than) using ,1 or    with a singleton index. Internal delete helper. )Removes a single package from the index. ERemoves all packages with this (case-sensitive) name from the index.  @Removes all packages satisfying this dependency from the index.  %Get all the packages from the index.  %Get all the packages from the index. 4They are grouped by package name, case-sensitively.  0Does a case-insensitive search by package name. JIf there is only one package that compares case-insentiviely to this name N then the search is unambiguous and we get back all versions of that package. L If several match case-insentiviely but one matches exactly then it is also  unambiguous. JIf however several match case-insentiviely and none match exactly then we G have an ambiguous result, and we get back all the versions of all the L packages. The list of ambiguous results is split by exact package name. So , it is a non-empty list of non-empty lists.  :Does a case-insensitive substring search by package name. CThat is, all packages that contain the given string in their name. "Does a lookup by package id (name & version). MSince multiple package DBs mask each other case-sensitively by package name, ' then we get back at most one package. .Does a case-sensitive search by package name. FDoes a case-sensitive search by package name and a range of versions. FWe get back any number of versions of the specified package name, all * satisfying the version range constraint. ?All packages that have dependencies that are not in the index. ;Returns such packages along with the dependencies that they' re missing. BTries to take the transative closure of the package dependencies. IIf the transative closure is complete then it returns that subset of the 7 index. Otherwise it returns the broken packages as in  .  Note that if the result is Right [] it is because at least one of  the original given  s do not occur in the index. CTakes the transative closure of the packages reverse dependencies.  The given  s must be in the index. FGiven a package index where we assume we want to use all the packages  (use  2 if you need to get such a index subset) find out H if the dependencies within it use consistent versions of each package. J Return all cases where multiple packages depend on different versions of  some other package. JEach element in the result is a package name along with the packages that H depend on it and the versions they require. These are guaranteed to be  distinct. FFind if there are any cycles in the dependency graph. If there are no  cycles the result is []. KThis actually computes the strongly connected components. So it gives us a L list of groups of packages where within each group they all depend on each  other, directly or indirectly. ,Builds a graph of the package dependencies. DDependencies on other packages that are in the index are discarded. 7 You can check if there are any such dependencies with  . >The collection of information about packages from one or more  PackageDBs. <It can be searched effeciently by package name and version.           portablealpha%Isaac Jones <ijones@syntaxpolice.org>Like + but compatible with the old ReadS parser. EIt is compatible in the sense that it accepts only the same strings,  eg GHC but not ghc&. However other strings get mapped to ". I The point of this is that we do not allow extra valid values that would L upset older Cabal versions that had a stricter parser however we cope with & new values more gracefully so that we'%ll be able to introduce new value in ) future without breaking things so much. IThe default compiler flavour to pick when compiling stuff. This defaults . to the compiler used to build the Cabal lib.  However if it'#s not a recognised compiler then it's ,2 and the user 0 will have to specify which compiler they want.  !"#$%&'()!"#$%&'() portablealphalibraries@haskell.org;BA default unrecognized field parser which simply returns Nothing, H i.e. ignores all unrecognized fields, so warnings will be generated. <<A default unrecognized field parser which silently (i.e. no ? warnings will be generated) ignores unrecognized fields, by 3 returning the structure being built unmodified. %Tokenise a single line, splitting on '{' '}' and the spans inbetween.  Also trims leading &0 trailing space on those spans within the line. 4Fix different systems silly line ending conventions @Parse the stream of tokens into a tree of them, based on indent / layout @Parse the stream of tokens into a tree of them, based on indent D This parse state expect to be in a layout context, though possibly J nested within a braces context so we may still encounter closing braces. IParse the stream of tokens into a tree of them, based on explicit braces 5 This parse state expects to find a closing bracket. *Convert the parse tree into the Field AST 3 Also check for dodgy uses of tabs in indentation.  Convert ifthenelse Us to Ts @parse a module name RGPretty-print free-format text, ensuring that it is vertically aligned, ? and with blank lines replaced by dots for correct re-parsing. 6We parse generically based on indent level and braces '{' '}' . To do that  we split into lines and then '{' '}'' tokens and other spans within a line. W<The type of a function which, given a name-value pair of an > unrecognized field, and the current structure being built, 9 decides whether to incorporate the unrecognized field A (by returning Just x, where x is a possibly modified version A of the structure being built), or not (by returning Nothing). X!Field descriptor. The parameter a# parameterizes over where the field's  value is stored in. \fieldSet n str x- Parses the field value from the given input  string str and stores the result in x if the parse was 9 successful. Otherwise, reports an error on line number n. ?*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh?hcdefg`ab/01-.]^_+,*STUV>=XYZ[\:9?AJ@BCFDEGHIKLMOPQR2465738NW;<portablealphalibraries@haskell.org,]^_`cdefgijklmnopqrstuvwxyz{|}~,nopqrstuvwxyz{|}~m]^_cdefg`ijklportablealpha"Duncan Coutts <duncan@haskell.org>+Create an option taking a single OptDescr. P No explicit Name is given for the Option, the name is the first LFlag given. +Create an option taking several OptDescrs. ] You will have to give the flags and description individually to the OptDescr constructor. /Create a string-valued command line interface. DCreate a string-valued command line interface with a default value. (String -> a) variant of reqArg (String -> a) variant of optArg create a Choice option 3create a Choice option out of an enumeration type. O As long flags, the Show output is used. As short flags, the first character 8 which does not conflict with a previous one is used. uto view as a FieldDescr, we sort the list of interfaces (Req > Bool > Choice > Opt) and consider only the first one. ;Show flags in the standard long option command line format EThe help text for this command with descriptions of all the options. Make a Command from standard GetOpt options. EUtility function, many commands do not accept additional flags. This K action fails with a helpful error message if the user supplies any extra. )Common flags that apply to every command !Long command line option strings "Short command line option strings aAn OptionField takes one or more OptDescrs, describing the command line interface for the field. CWe usually have a datatype for storing configuration values, where @ every field stores a configuration option, and the user sets D the value either via command line flags or a configuration file. A An individual OptionField models such a field, and we usually C build a list of options associated to a configuration datatype. DThe name of the command as it would be entered on the command line.  For example "build". CA short, one line description of the command to use in help texts. )The useage line summary for this command <Additional explanation of the command to use in help texts. Initial / empty flags 'All the Option fields for this command 33portablealpha%Isaac Jones <ijones@syntaxpolice.org>(&does this package have any libraries? ,2 version of  AIf the package description has a library section, call the given 4 function with the library build info as argument. <Get all the module names from the libraries in this package (does this package have any executables? %Perform the action on each buildable   in the package  description. 7Get all the module names from the exes in this package The ( for the library (if there is one and it's buildable) and C all the buildable executables. Useful for gathering dependencies. 2Select options for a particular Haskell compiler.  Store any fields beginning with x- in the customFields field of D a PackageDescription. All other fields will generate a warning. =Given a parser and a filename, return the parse of the file, $ after checking if the file exists. Parse the given package file. Parses the given file into a . IIn Cabal 1.2 the syntax for package descriptions was changed to a format > with sections and possibly indented property descriptions. <Parse a list of fields, given a list of field descriptions, ? a structure to accumulate the parsed fields, and a function 3 that can decide what to do with fields which don' t match any  of the field descriptions.  /Parse a configuration condition from a string. @A boolean expression parameterized over the variable type used. A ConfVar$ represents the variable type used. A " is a total or partial mapping of s to   ,3< flag values. It represents the flags chosen by the user or . discovered during configuration. For example --flags=foo --flags=-bar  becomes [(foo , True), (bar, False)] A 2 is the name of a user-defined configuration flag CA flag can represent a feature to be included, or a way of linking L a target against its dependencies, or in fact whatever you can think of. component is buildable here tools needed to build this bit (options for pre-processing Haskell code options for C compiler options for linker "pkg-config packages that are used  support frameworks for Mac OS X /where to look for the haskell module hierarchy  non-exposed or non-main modules Lwhat libraries to link with when compiling a program that uses your package directories to find .h files (The .h files to be found in includeDirs %.h files to install with the package  Custom fields starting  with x-, stored in a  simple assoc-list. /The type of build system used by this package. :This data type is the internal representation of the file  pkg.cabal. E It contains two kinds of information about the package: information N which is needed for all packages, such as the package name and version, and H information which is needed for the simple build system only, such as ( the compiler options and library name. (#A one-line summary of this package )+A more verbose description of this package +Custom fields starting  with x-, stored in a  simple assoc-list. -HIf this package depends on a specific version of Cabal, give that here. XYZ[\]^_h      !"#$%&'()*+,-./01234 !"#$%&'()*+,-./01234 XYZ[\h    ]^_portablealpha%Isaac Jones <ijones@syntaxpolice.org> 6Simplify the condition and return its free variables.  ISimplify a configuration condition using the os and arch names. Returns : the names of all the flags occurring in the condition.  JTry to find a flag assignment that satisfies the constaints of all trees. CReturns either the missing dependencies, or a tuple containing the B resulting data, the associated dependencies, and the chosen flag  assignments. HIn case of failure, the _smallest_ number of of missing dependencies is B returned. [XXX: Could also be specified with a function argument.] LXXX: The current algorithm is rather naive. A better approach would be to: K Rule out possible paths, by taking a look at the associated dependencies. B Infer the required values for the conditions of these paths, and B calculate the required domains for the variables used in these J conditions. Then picking a flag assignment would be linear (I guess). <This would require some sort of SAT solving, though, thus it's not ' implemented unless we really need it. BFlatten a CondTree. This will resolve the CondTree by taking all M possible paths into account. Note that since branches represent exclusive # choices this may not result in a "sane" result. 5?Create a package description with all configurations resolved. This function takes a  and several environment " parameters and tries to generate  by finding a flag 5 assignment that result in satisfiable dependencies. FIt takes as inputs a not necessarily complete specifications of flags L assignments, an optional package index as well as platform parameters. If K some flags are not assigned explicitly, this function will try to pick an H assignment that causes this function to succeed. The package index is J optional since on some platforms we cannot determine which packages have M been installed before. When no package index is supplied, every dependency K is assumed to be satisfiable, therefore all not explicitly assigned flags  will get their default values. JThis function will fail if it cannot find a flag assignment that leads to I satisfiable dependencies. (It will not try alternative assignments for C explicitly specified flags.) In case of failure it will return a minimum J number of dependencies that could not be satisfied. On success, it will E return the package description and the full flag assignment chosen. 6JFlatten a generic package description by ignoring all conditions and just I join the field descriptors into on package description. Note, however, G that this may lead to inconsistent field values, since all values are J joined into one field, which may not be possible in the original package E description, due to the use of exclusive choices (if ... else ...). JXXX: One particularly tricky case is defaulting. In the original package J description, e.g., the source directory might either be the default or a L certain, explicitly set path. Since defaults are filled in only after the H package has been resolved and when no explicit value has been set, the L default path will be missing from the package description returned by this  function. JA map of dependencies. Newtyped since the default monoid instance is not * appropriate. The monoid instance uses y. )Result of dependency test. Isomorphic to Maybe d but renamed for  clarity. 5656portablealpha&Lennart Kolmodin <kolmodin@gentoo.org>7@Check for common mistakes and problems in package descriptions. FThis is the standard collection of checks covering all apsects except H for checks that require looking at files within the package. For those  see 9. It requires the  and optionally a particular , configuration of that package. If you pass ,2 then we just check , a version of the generic description using 6. -Check that this package description is sane. 9KSanity check things that requires IO. It looks at the files in the package D and expects to find the package unpacked in at the given filepath. :.Results of some kind of failed package check. HThere are a range of severities, from merely dubious to totally insane. N All of them come with a human readable explanation. In future we may augment J them with more machine readable explanations, for example to help an IDE  suggest automatic corrections. 789:;<=>? :;<=>?789portablealpha%Isaac Jones <ijones@syntaxpolice.org>DCFor the given compiler, return the extensions it does not support. EGFor the given compiler, return the flags for the supported extensions. G?Some compilers support optimising. Some have different levels. A For compliers that do not the level is just capped to the level  they do support. KBSome compilers have a notion of a database of available packages. C For some there is just one global db of packages, other compilers E support a per-user or an arbitrary db specified at some location in E the file system. This can be used to build isloated environments of A packages, for example to build a collection of related packages # without installing them globally. ! !"#$%&'()@ABCDEFGHIJKLMNOPQROPQR@ABKLMNGHIJCFEDportablealpha%Isaac Jones <ijones@syntaxpolice.org> 6Substitute the install dir templates into each other. DTo prevent cyclic substitutions, only some variables are allowed in J particular dir templates. If out of scope vars are present, they are not L substituted for. Checking for any remaining unsubstituted vars can be done  as a subsequent operation. -The reason it is done this way is so that in V we  can replace p with the g and get resulting  hs that still have the g in them. Doing this makes it 8 each to check which paths are relative to the $prefix. UEConvert from abstract install directories to actual absolute ones by G substituting for all the variables in the abstract paths, to get real  absolute path. VCCheck which of the paths are relative to the installation $prefix. JIf any of the paths are not relative, ie they are absolute paths, then it @ prevents us from making a relocatable package (also known as a "prefix  independent" package). W Convert a ,4 to a h including any template vars. X8Convert back to a path, any remaining vars are included Z>The initial environment has all the static stuff but no paths h?An abstract path, posibly containing variables that need to be  substituted for to get a real ,4. iThe location prefix for the copy command. m(The installation dirctories in terms of hs that contain  variables. HThe defaults for most of the directories are relative to each other, in D particular they are all relative to a single prefix. This makes it H convenient for the user to override the default installation directory D by only having to specify --prefix=... rather than overriding each G individually. This is done by allowing $-style variables in the dirs. 0 These are expanded by textual substituion (see Y). KA few of these installation directories are split into two components, the K dir and subdir. The full installation path is formed by combining the two  together with /7. The reason for this is compatability with other unix " build systems which also support --libdir and  --datadir. We would like  users to be able to configure  --libdir=/usr/lib64 for example but H because by default we want to support installing multiplve versions of M packages and building the same package for multiple compilers we append the  libsubdir to get: /usr/lib64/$pkgid/ $compiler. JAn additional complication is the need to support relocatable packages on 2 systems which support such things, like Windows. n:The directories where we will install files for packages. IWe have several different directories for different types of files since M many systems have conventions whereby different types of files in a package J are installed in different direcotries. This is particularly the case on  unix style systems. +STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}+nopqrstuvwxyz{|}mTSUijklVh[\]^_`abcdefgWXYZportablealpha%Isaac Jones <ijones@syntaxpolice.org>#Arguments to pass to a  configure script, e.g. generated by  autoconf. <Helper function to split a string into a list of arguments.  It'1s supposed to handle quoted things sensibly, eg: 2 splitArgs "--foo=\"C:\Program Files\Bar\" --baz" - = ["--foo=C:\Program Files\Bar", "--baz"]  Flags to register and  unregister: (user package, gen-script,  in-place, verbosity)  Flags to sdist: (snapshot, verbosity)  Flags to install: (package db, verbosity)  Flags to copy7: (destdir, copy-prefix (backwards compat), verbosity)  Flags to  configure command  All programs that cabal may run user specifed programs paths user specifed programs args The "flavor"' of the compiler, sugh as GHC or Hugs. given compiler location given hc-pkg location Enable vanilla library  Enable profiling in the library Build shared library %Enable profiling in the executables. Extra arguments to  configure Enable optimization. Installed executable prefix. Installed executable suffix. Installation paths #path to search for extra libraries  path to search for header files  dist prefix  verbosity level (deprecated)  verbosity level   The --user/--global flag  Which package DB to use "Enable compiling library for GHCi Enable -split-objs with GHC Enable executable stripping Additional constraints for  dependencies ;Flags that apply at the top level, not to any sub-command. 2All flags are monoids, they come in two flavours: 1. list flags eg  # --ghc-option=foo --ghc-option=bar gives us all the values [foo, bar] 2. singular value flags, eg:   --enable-foo --disable-foo gives us Just False < So this Flag type is for the latter singular kind of flag. C Its monoid instance gives us the behaviour where it starts out as  ( and later flags override earlier ones. ijkl~          ijkl~5ijkl~     portablealpha%Isaac Jones <ijones@syntaxpolice.org>  portablealpha%Isaac Jones <ijones@syntaxpolice.org>See U See V !0Data cached after configuration step. See also  Distribution.Setup.ConfigFlags. #6The installation directories for the various differnt  kinds of files $The compiler we're building with %Where to build the package. &+Where to put the result of the Hugs build. 'Which packages we depend on, exactly.  The  ' specifies a set of build dependencies : that must be satisfied in terms of version ranges. This 9 field fixes those dependencies to the specific versions . available on this machine for this compiler. (+All the info about all installed packages. )6the filename containing the .cabal file, if available *8The resolved package description, that does not contain  any conditionals. +#Location and args for all programs ,$What package database to use, global/user -Whether to build normal libs. .-Whether to build profiling versions of libs. /*Whether to build shared versions of libs. 0,Whether to build executables for profiling. 13Whether to build with optimization (if available). 22Whether to build libs suitable for use with GHCi. 3'Use -split-objs with GHC, if available 4,Whether to strip executables during install 50Prefix to be prepended to installed executables 6/Suffix to be appended to installed executables BSTWXZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} !"#$%&'()*+,-./0123456!"#$%&'()*+,-./0123456 portablealpha%Isaac Jones <ijones@syntaxpolice.org>:5The directory in which we put auto-generated modules ;@The name of the auto-generated module associated with a package @Extension for executable files  (typically "" on Unix and "exe" on Windows or OS/2) A=Extension for object files. For GHC and NHC the extension is "o".  Hugs uses either "o" or "obj"# depending on the used C compiler. B7Extension for dynamically linked (or shared) libraries  (typically "so" on Unix and "dll" on Windows) ~789:;<=>?@AB ~789:;<=>?@ABportablealpha%Isaac Jones <ijones@syntaxpolice.org>E(Apply preprocessors to the sources from  , to obtain ( a Haskell source file for each module. DFind the first extension of the file that exists, and preprocess it  if required. N?Convenience function; get the suffixes of these preprocessors. OHStandard preprocessors: GreenCard, c2hs, hsc2hs, happy, alex and cpphs. PFA preprocessor for turning non-Haskell files with the given extension " into plain Haskell source files. QCThe interface to a preprocessor, which may be implemented using an C external program, but need not be. The arguments are the name of D the input file, the name of the output file and a verbosity level. F Here is a simple example that merely prepends a comment to the given  source file:   ppTestHandler :: PreProcessor  ppTestHandler =  PreProcessor { ! platformIndependent = True, K runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> I do info verbosity (inFile++" has been preprocessed to "++outFile) # stuff <- readFile inFile G writeFile outFile ("-- preprocessed as a test\n\n" ++ stuff)  return ExitSuccess GWe split the input and output file names into a base directory and the M rest of the file name. The input base dir is the path in the list of search N dirs that this file was found in. The output base dir is the build dir where ) all the generated source files are put. GThe reason for splitting it up this way is that some pre-processors don't B simply generate one output .hs file from one input file but have J dependencies on other genereated files (notably c2hs, where building one K .hs file may require reading other .chi files, and then compiling the .hs M file may require reading a generated .h file). In these cases the generated M files need to embed relative path names to each other (eg the generated .hs N file mentions the .h file in the FFI imports). This path must be relative to I the base directory where the genereated files are located, it cannot be J relative to the top level of the build tree because the compilers do not 7 look for .h files relative to there, ie we do not use "-I ." , instead we  use "-I dist/build"1 (or whatever dist dir has been set by the user) GMost pre-processors do not care of course, so mkSimplePreProcessor and 9 runSimplePreProcessor functions handle the simple case. CDEFGHIJKLMNOPQRSTEONPQRSTCDHIFKJLMGportablealpha%Isaac Jones <ijones@syntaxpolice.org>'UEmpty VW which do nothing. VEHooks allow authors to add specific functionality before and after a ? command is run, and also to specify additional preprocessors. I WARNING: The hooks interface is under rather constant flux as we try to G understand users needs. Setup files that depend on this interface may  break in future releases. X Used for ./ setup test YRead the description file Z3Custom preprocessors in addition to and overriding knownSuffixHandlers. [GThese programs are detected at configure time. Arguments for them are ! added to the configure command. \%Hook to run before configure command ]@Over-ride this hook to get different behavior during configure. ^$Hook to run after configure command _IHook to run before build command. Second arg indicates verbosity level. `=Over-ride this hook to gbet different behavior during build. aHHook to run after build command. Second arg indicates verbosity level. bLHook to run before makefile command. Second arg indicates verbosity level. c?Over-ride this hook to get different behavior during makefile. dKHook to run after makefile command. Second arg indicates verbosity level. eIHook to run before clean command. Second arg indicates verbosity level. f<Over-ride this hook to get different behavior during clean. gHHook to run after clean command. Second arg indicates verbosity level. h Hook to run before copy command i;Over-ride this hook to get different behavior during copy. jHook to run after copy command k#Hook to run before install command l>Over-ride this hook to get different behavior during install. m;Hook to run after install command. postInst should be run * on the target, not on the build machine. nIHook to run before sdist command. Second arg indicates verbosity level. o<Over-ride this hook to get different behavior during sdist. pHHook to run after sdist command. Second arg indicates verbosity level. q$Hook to run before register command rCOver-ride this hook to get different behavior during registration. s#Hook to run after register command t&Hook to run before unregister command uCOver-ride this hook to get different behavior during registration. v%Hook to run after unregister command wLHook to run before hscolour command. Second arg indicates verbosity level. x?Over-ride this hook to get different behavior during hscolour. yKHook to run after hscolour command. Second arg indicates verbosity level. zKHook to run before haddock command. Second arg indicates verbosity level. {>Over-ride this hook to get different behavior during haddock. |JHook to run after haddock command. Second arg indicates verbosity level. )UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|})VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}Uportablealpha%Isaac Jones <ijones@syntaxpolice.org> ~Create a source distribution. *Prepare a directory tree of source files. IPrepare a directory tree of source files for a snapshot version with the  given date.  Modifies a  by appending a snapshot number " corresponding to the given date.  Modifies a ,0. by appending a snapshot number corresponding  to the given date. =Given a date produce a corresponding integer representation.  For example given a date 18032008 produce the number 20080318. FCreate an archive from a tree of source files, and clean up the tree. /Move the sources into place based on buildInfo *The name of the tarball without extension ~~portablealpha%Isaac Jones <ijones@syntaxpolice.org>Register doesn'4t drop the register info file, it must be done in a  separate step. DCreate a string suitable for writing out to the package config file ALike rawSystemProgram, but emits to a script instead of exiting.  FIX: chmod +x? ELike rawSystemEmit, except it has string for pipeFrom. FIX: chmod +x portablealpha%Isaac Jones <ijones@syntaxpolice.org>Given something like usrlocalbin"ghc-6.6.1(.exe) we try and find a L corresponding ghc-pkg, we try looking for both a versioned and unversioned # ghc-pkg in the same dir, that is: $ /usr/local/bin/ghc-pkg-6.6.1(.exe)  /usr/local/bin/ghc-pkg(.exe) JFor GHC 6.6.x and earlier, the mapping from supported extensions to flags ;Get the packages from specific PackageDBs, not cumulative. @Building for GHC. If .ghc-packages exists and is readable, add  it to the command-line. Install executables for GHC. 7Install for ghc, .hi, .a and, if --with-ghci given, .o use ranlib or ar -s1 to build an index. This is necessary on systems  like MacOS X. If we can't find those, don't worry too much about it.  portablealpha%Isaac Jones <ijones@syntaxpolice.org> 'The flags for the supported extensions Building a package for JHC. - Currently C source files are not supported. !portablealpha%Isaac Jones <ijones@syntaxpolice.org>!'The flags for the supported extensions ?FIX: For now, the target must contain a main module. Not used  ATM. Re-add later. Install executables for GHC. $Install for nhc98: .hi and .a files "portablealpha%Isaac Jones <ijones@syntaxpolice.org>"'The flags for the supported extensions Building a package for Hugs. #ARead the initial part of a source file, before any Haskell code, G and return the contents of any LANGUAGE, OPTIONS and INCLUDE pragmas. $$Strip comments from Haskell source. Install for Hugs. 5 For install, copy-prefix = prefix, but for copy they're different.  The library goes in < copy-prefix>/lib/hugs/packages/< pkgname>  (i.e. <prefix>/lib/hugs/packages/< pkgname> on the target system).  Each executable goes in < copy-prefix>/lib/hugs/programs/< exename>  (i.e. <prefix>/lib/hugs/programs/<exename> on the target system)  with a script < copy-prefix>/bin/<exename> pointing at  <prefix>/lib/hugs/programs/< exename>. %<Filename used by Hugs for the main module of an executable. E This is a simple filename, so that Hugs will look for any auxiliary - modules it uses relative to the directory it's in. #portablealpha%Isaac Jones <ijones@syntaxpolice.org>  Read the #. Error if it doesn't exist. Also E fail if the file containing LocalBuildInfo is older than the .cabal 3 file, indicating that a re-configure is required. Try to read the #. $After running configure, output the !" to the  #. @Check that localBuildInfoFile is up-to-date with respect to the  .cabal file.  dist/ setup-config Perform the "./setup configure" action.  Returns the  .setup-config file. &BConverts build dependencies to a versioned dependency. only sets 7 version information for exact versioned dependencies. HTest for a package dependency and record the version we have installed. Makes a # from C compiler and linker flags. MThis can be used with the output from configuration programs like pkg-config O and similar package-specific programs like mysql-config, freealut-config etc.  For example: H ccflags <- rawSystemProgramStdoutConf verbosity prog conf ["--cflags"] F ldflags <- rawSystemProgramStdoutConf verbosity prog conf ["--libs"] ? return (ccldOptionsBuildInfo (words ccflags) (words ldflags)) '>Output package check warnings and errors. Exit if any errors.  $portablealpha%Isaac Jones <ijones@syntaxpolice.org>5Build the libraries and executables in this package. %portablealpha%Isaac Jones <ijones@syntaxpolice.org> Perform the "./ setup install" and "./ setup copy" E actions. Move files into place based on the prefix argument. FIX:  nhc isn't implemented yet. (-Install the files listed in install-includes &portablealpha%Isaac Jones <ijones@syntaxpolice.org>'portablealpha%Isaac Jones <ijones@syntaxpolice.org> A simple implementation of main for a Cabal setup script. B It reads the package description file using IO, and performs the ' action specified on the command line.  A version of '! that is passed the command line ; arguments, rather than getting them from the environment. A customizable version of '. A customizable version of ' that also takes the command  line arguments. Like '/, but accepts the package description as input " rather than using IO to read it. )@Combine the programs in the given hooks with the programs built  into cabal. *6Combine the preprocessors in the given hooks with the ! preprocessors built into cabal. 7Hooks that correspond to a plain instantiation of the  "simple" build system Basic autoconf V'W':  on non-Windows systems, ^' runs ./ configure, if present.  the pre-hooks _', e', h', k',  q' and t'( read additional build information from  package .buildinfo, if present. Thus  configure. can use local system information to generate  package .buildinfo and possibly other files.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPpqrstuvwxyz{|}~ !"#$%&'()@ABCDEGHIJKLMNOPQRUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}2VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}U(portablealpha'http://hackage.haskell.org/trac/hackage+6789:;<=>>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                 ! " # $ % & ' ( ) * + + , - . / 0 1 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K LMNOPPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*++,-.//01234567789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^^_`abcdefghijklmnopqrstuvwxyz{||}~     cdg !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJJKLMNNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     !!!!"""############$$$%&&''''''''(,/,/*+++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-,0,0,0,0,/   ,1 ,2,2,,4 !""""##% ' '  Cabal-1.4.0.2$Distribution.Simple.PreProcess.UnlitDistribution.Compat.ReadPDistribution.ReadEDistribution.VerbosityDistribution.TextLanguage.Haskell.ExtensionDistribution.SystemDistribution.VersionDistribution.LicenseDistribution.PackageDistribution.Simple.UtilsDistribution.Simple.Program Distribution.Simple.PackageIndexDistribution.CompilerDistribution.ParseUtils!Distribution.InstalledPackageInfoDistribution.Simple.CommandDistribution.PackageDescription-Distribution.PackageDescription.Configuration%Distribution.PackageDescription.CheckDistribution.Simple.CompilerDistribution.Simple.InstallDirsDistribution.Simple.SetupDistribution.Make"Distribution.Simple.LocalBuildInfoDistribution.Simple.BuildPathsDistribution.Simple.PreProcessDistribution.Simple.UserHooksDistribution.Simple.SrcDistDistribution.Simple.RegisterDistribution.Simple.GHCDistribution.Simple.JHCDistribution.Simple.NHCDistribution.Simple.HugsDistribution.Simple.ConfigureDistribution.Simple.BuildDistribution.Simple.InstallDistribution.Simple.HaddockDistribution.Simple Distribution.Simple.SetupWrapperDistribution.Compat.TempFile Distribution.Simple.GHC.MakefileDistribution.GetOptbaseGHC.ReadDistribution.Extension System.IO Data.Version Data.Monoid Data.Maybe Data.Bool GHC.IOBaseDistribution.SetupplainunlitReadP succeedReadE failReadE parseReadE readEOrFail readP_to_EReadErunReadEsilentnormalverbose deafening moreVerbose lessVerboseintToVerbosityflagToVerbosity showForCabal showForGHC Verbositydisplay simpleParseTextdispparseknownExtensions ExtensionUnknownExtensionConstrainedClassMethodsDeriveDataTypeable UnboxedTuplesExtendedDefaultRulesRelaxedPolyRecNoMonoPatBindsGADTsOverloadedStringsDisambiguateRecordFields RecordPunsRecordWildCards TypeOperatorsLiberalTypeSynonymsUnliftedFFITypesPatternSignatures UnicodeSyntaxStandaloneDeriving TypeFamilies MagicHash HereDocumentsRestrictedTypeSynonymsExtensibleRecordsGeneralizedNewtypeDeriving PatternGuardsNamedFieldPunsNoImplicitPreludeGenericsArrowsForeignFunctionInterfaceTemplateHaskellTypeSynonymInstances BangPatternsKindSignaturesCPPEmptyDataDeclsFlexibleInstancesFlexibleContextsImplicitParamsScopedTypeVariablesExistentialQuantificationPolymorphicComponents RankNTypes Rank2TypesFunctionalDependenciesNoMonomorphismRestrictionMultiParamTypeClassesParallelListComp RecursiveDoIncoherentInstancesUndecidableInstancesOverlappingInstancesbuildOS buildArchArch OtherArchVaxM68kRs6000HppaAlphaS390IA64SHMipsArmSparcPPC64PPCX86_64I386OSOtherOSIRIXHPUXAIXSolarisNetBSDOpenBSDFreeBSDOSXWindowsLinux isAnyVersionnotThisVersionorLaterVersionorEarlierVersionbetweenVersionsInclusive withinRange showVersion parseVersion VersionRangeIntersectVersionRangesUnionVersionRangesEarlierVersion LaterVersion ThisVersion AnyVersionLicenseUnknownLicense OtherLicenseAllRightsReserved PublicDomainBSD4BSD3LGPLGPLparsePackageNamethisPackageVersionnotThisPackageVersion packageNamepackageVersion showPackageIdPackageFixedDepsdependsPackage packageId DependencyPackageIdentifierpkgName pkgVersion cabalVersioncabalBootstrappingdieWithLocationdiewarnnotice setupMessageinfodebug chattyTrybreakswrapTextwrapLine maybeExit rawSystemExitrawSystemStdoutrawSystemStdout'xargsinDirfindFilefindFileWithExtensionfindFileWithExtension'dotToSepsmartCopySourcescreateDirectoryIfMissingVerbosecopyFileVerbose copyFilescopyDirectoryRecursiveVerbose withTempFilewithTempDirectorywithFileContentswriteFileAtomic currentDirdefaultPackageDescfindPackageDescdefaultHookedPackageDescfindHookedPackageDescfromUTF8toUTF8 readUTF8FilewithUTF8FileContents writeUTF8Fileequating comparing isInfixOf intercalate lowercase programPath simpleProgramfindProgramOnPathfindProgramVersionemptyProgramConfigurationdefaultProgramConfigurationaddKnownProgramlookupKnownProgram knownProgramsuserSpecifyPathuserMaybeSpecifyPathuserSpecifyArgsuserSpecifiedArgs lookupProgram updateProgramconfigureAllKnownProgramsrequireProgramrawSystemProgramrawSystemProgramStdoutrawSystemProgramConfrawSystemProgramStdoutConfbuiltinPrograms ghcProgram ghcPkgProgram nhcProgram hmakeProgram jhcProgram hugsProgramffihugsProgram happyProgram alexProgram ranlibProgram arProgram stripProgram hsc2hsProgram c2hsProgram cpphsProgramhscolourProgramhaddockProgramgreencardProgram ldProgram tarProgram cppProgrampkgConfigProgramProgramConfigurationProgramLocation FoundOnSystem UserSpecified locationPathConfiguredProgram programIdprogramVersion programArgsprogramLocationProgArgProgram programNameprogramFindLocationprogramFindVersionfromListmergeinsertdeletePackageIddeletePackageNamedeleteDependency allPackagesallPackagesByName searchByNamesearchByNameSubstringlookupPackageIdlookupPackageNamelookupDependencybrokenPackagesdependencyClosurereverseDependencyClosuredependencyInconsistenciesdependencyCyclesdependencyGraph SearchResult Ambiguous UnambiguousNone PackageIndexparseCompilerFlavorCompatbuildCompilerFlavordefaultCompilerFlavor CompilerIdCompilerFlavor OtherCompilerJHCHeliumHBCHugsYHCNHCGHC showPWarningcatchParseError parseFailrunPrunElocatedErrorMsg syntaxErrorwarningfield liftField simpleFieldcommaListField listField optsField boolFieldppFieldsppField warnUnrec ignoreUnreclineNofName readFieldsparseModuleNameQparseFilePathQparseBuildToolparsePkgconfigDependencyparsePackageNameQparseVersionRangeQparseOptVersionparseTestedWithQ parseLicenseQparseExtensionQ parseTokenQ parseSepListparseCommaListparseOptCommaList parseQuoted showFilePath showTokenshowTestedWith showFreeTextFieldIfBlockSectionFUnrecFieldParser FieldDescr fieldNamefieldGetfieldSet ParseResultParseOk ParseFailedPWarning UTFWarningPError FromString TabsErrorNoParse AmbigousParseLineNoemptyInstalledPackageInfoparseInstalledPackageInfoshowInstalledPackageInfoshowInstalledPackageInfoFieldInstalledPackageInfoInstalledPackageInfo_packagelicense copyright maintainerauthor stabilityhomepagepkgUrl descriptioncategoryexposedexposedModules hiddenModules importDirs libraryDirs hsLibrariesextraLibrariesextraGHCiLibraries includeDirsincludes hugsOptions ccOptions ldOptions frameworkDirs frameworkshaddockInterfaces haddockHTMLsoption multiOptionreqArgoptArgreqArg'optArg'noArgboolOptboolOpt' choiceOptchoiceOptFromEnumviewAsFieldDescr liftOptioncommandShowOptions makeCommandcommandAddAction commandsRun noExtraFlagsCommand CommandParseCommandReadyToGo CommandErrors CommandList CommandHelp MkOptDescrArgPlaceHolderOptFlagsLFlagsSFlagsOptDescrBoolOpt ChoiceOptOptArgReqArg OptionField optionName optionDescr DescriptionNameShowOrParseArgs ParseArgsShowArgs CommandUI commandNamecommandSynopsis commandUsagecommandDescriptioncommandDefaultFlagscommandOptionsemptyPackageDescriptionknownBuildTypes emptyLibraryhasLibswithLib libModulesemptyExecutablehasExeswithExe exeModulesemptyBuildInfo allBuildInfoemptyHookedBuildInfo hcOptionsupdatePackageDescriptionfreeVarsreadHookedBuildInforeadPackageDescriptionparsePackageDescriptionparseHookedBuildInfowritePackageDescriptionshowPackageDescriptionwriteHookedBuildInfoshowHookedBuildInfoCondTreeCondNode condTreeDatacondTreeConstraintscondTreeComponents ConditionCAndCOrCNotLitVarConfVarImplFlagFlagAssignmentFlagNameMkFlagflagNameflagDescription flagDefaultGenericPackageDescriptionpackageDescriptiongenPackageFlags condLibrarycondExecutablesHookedBuildInfo BuildInfo buildable buildTools cppOptionspkgconfigDependscSources hsSourceDirs otherModules extensions extraLibs extraLibDirsinstallIncludesoptionsghcProfOptionsghcSharedOptionscustomFieldsBI ExecutableexeName modulePath buildInfoLibrary libBuildInfo BuildTypeUnknownBuildTypeCustomMake ConfigureSimplePackageDescription licenseFile testedWithsynopsiscustomFieldsPD buildDependsdescCabalVersion buildTypelibrary executables dataFilesdataDir extraSrcFiles extraTmpFilesfinalizePackageDescriptionflattenPackageDescription checkPackagecheckConfiguredPackagecheckPackageFiles PackageCheckPackageDistInexcusablePackageDistSuspiciousPackageBuildWarningPackageBuildImpossible explanationshowCompilerIdcompilerFlavorcompilerVersionflagToOptimisationLevelunsupportedExtensionsextensionsToFlagsOptimisationLevelMaximumOptimisationNormalOptimisationNoOptimisation PackageDBSpecificPackageDB UserPackageDBGlobalPackageDBCompiler compilerIdcompilerExtensionscombineInstallDirsdefaultInstallDirsabsoluteInstallDirsprefixRelativeInstallDirstoPathTemplatefromPathTemplatesubstPathTemplateinitialPathTemplateEnvPathTemplateVariable CompilerVarPkgIdVar PkgVerVar PkgNameVar HtmldirVar DocdirVar DatasubdirVar DatadirVar LibsubdirVar LibdirVar BindirVar PrefixVar PathTemplateCopyDest CopyPrefixCopyTo NoCopyDestInstallDirTemplates InstallDirsprefixbindirlibdir libsubdir dynlibdir libexecdirprogdir includedirdatadir datasubdirdocdirmandirhtmldir haddockdirdefaultDistPreftoFlagfromFlagfromFlagOrDefault flagToMaybe flagToListdefaultGlobalFlags globalCommandemptyGlobalFlagsdefaultConfigFlagsconfigureCommandconfigureOptionsemptyConfigFlagsdefaultCopyFlags copyCommandemptyCopyFlagsdefaultInstallFlagsinstallCommandemptyInstallFlagsdefaultSDistFlags sdistCommandemptySDistFlagsdefaultRegisterFlagsregisterCommandunregisterCommandemptyRegisterFlagsemptyHscolourFlagsdefaultHscolourFlagshscolourCommanddefaultHaddockFlagshaddockCommandemptyHaddockFlagsdefaultCleanFlags cleanCommandemptyCleanFlagsdefaultBuildFlags buildCommandemptyBuildFlagsdefaultMakefileFlagsmakefileCommandemptyMakefileFlagsdefaultTestFlags testCommandemptyTestFlagstrueArgfalseArgoptionVerbosity configureArgs TestFlags testDistPref testVerbosity MakefileFlags makefileFilemakefileDistPrefmakefileVerbosemakefileVerbosity BuildFlagsbuildProgramArgs buildDistPref buildVerbosebuildVerbosity CleanFlags cleanSaveConf cleanDistPref cleanVerbosecleanVerbosity HaddockFlags haddockHooglehaddockHtmlLocationhaddockExecutableshaddockInternal haddockCsshaddockHscolourhaddockHscolourCsshaddockDistPrefhaddockVerbosehaddockVerbosity HscolourFlags hscolourCSShscolourExecutableshscolourDistPrefhscolourVerbosehscolourVerbosity RegisterFlags regPackageDB regGenScript regGenPkgConf regInPlace regDistPref regVerbose regVerbosity SDistFlags sDistSnapshot sDistDistPref sDistVerbosesDistVerbosity InstallFlagsinstallPackageDBinstallDistPrefinstallVerboseinstallVerbosity CopyFlagscopyDest copyDest' copyDistPref copyVerbose copyVerbosity ConfigFlagsconfigProgramsconfigProgramPathsconfigProgramArgsconfigHcFlavor configHcPath configHcPkgconfigVanillaLib configProfLibconfigSharedLib configProfExeconfigConfigureArgsconfigOptimizationconfigProgPrefixconfigProgSuffixconfigInstallDirsconfigScratchDirconfigExtraLibDirsconfigExtraIncludeDirsconfigDistPref configVerboseconfigVerbosityconfigUserInstallconfigPackageDB configGHCiLibconfigSplitObjsconfigStripExesconfigConstraintsconfigConfigurationsFlags GlobalFlags globalVersionglobalNumericVersionNoFlag defaultMaindefaultMainArgsdefaultMainNoRead mkDataDirLocalBuildInfoinstallDirTemplatescompilerbuildDir scratchDir packageDeps installedPkgs pkgDescrFile localPkgDescr withPrograms withPackageDBwithVanillaLib withProfLib withSharedLib withProfExewithOptimization withGHCiLib splitObjs stripExes progPrefix progSuffixsrcPref hscolourPref haddockPrefautogenModulesDirautogenModuleName haddockName mkLibName mkProfLibNamemkSharedLibName exeExtension objExtension dllExtensionmkSimplePreProcessorrunSimplePreProcessorpreprocessSources ppGreenCardppUnlitppCppppCpp'ppHsc2hsppC2hsppHappyppAlex ppSuffixesknownSuffixHandlersPPSuffixHandler PreProcessorplatformIndependentrunPreProcessoremptyUserHooks UserHooksrunTestsreadDeschookedPreProcessorshookedProgramspreConfconfHookpostConfpreBuild buildHook postBuild preMakefile makefileHook postMakefilepreClean cleanHook postCleanpreCopycopyHookpostCopypreInstinstHookpostInstpreSDist sDistHook postSDistpreRegregHookpostRegpreUnreg unregHook postUnreg preHscolour hscolourHook postHscolour preHaddock haddockHook postHaddockArgssdist prepareTreeprepareSnapshotTreesnapshotVersiondateToSnapshotNumber createArchiveprintPackageProblemsregisterwriteInstalledConfigremoveInstalledConfigremoveRegScripts unregister configuregetInstalledPackagesbuildghcVerbosityOptions ghcOptionsmakefile installExe installLibinstalltryGetConfigStateFilegetPersistBuildConfigmaybeGetPersistBuildConfigwritePersistBuildConfigcheckPersistBuildConfiglocalBuildInfoFileconfigDependencyccLdOptionsBuildInfoconfigCompilerAuxconfigCompilerinitialBuildStepshaddockhscolourdefaultMainWithHooksdefaultMainWithHooksArgssimpleUserHooksdefaultUserHooksautoconfUserHooks setupWrapperopenBinaryTempFile openTempFilemakefileTemplate usageInfogetOptArgOrdergetOpt'ArgDescrOptionNoArg ReturnInOrderPermute RequireOrderText.ParserCombinators.ReadPReadS readS_to_P readP_to_SmanyTillchainl1chainr1chainlchainrendBy1endBysepBy1sepBy skipMany1skipManymany1manyoptionalbetweencount skipSpaceschoicemunch1munchstringcharsatisfygather<+++++pfaillookgetclassifyExtensionreadClassificationStrictnessCompat versionTags versionBranchVersionreadFileconfigureProgramlookup mergeBucketsmappenddeleteclassifyCompilerFlavorNothing tokeniseLinenormaliseLineEndingsmkTreelayoutbracesmkFieldifelseToken commandHelp CommonFlag maybeHasLibsMaybestoreXFieldsPDreadAndParseFile parseFieldsparseConditionGHC.BaseBoolsimplifyConditionsimplifyWithSysParamsresolveWithFlagsignoreConditions DependencyMap DepTestRslt checkSanitysubstituteTemplatesFilePath splitArgspreprocessModulesnapshotPackage prepareDir tarBallNameshowInstalledConfig rawSystemEmit rawSystemPipeguessGhcPkgFromGhcPatholdLanguageExtensionsgetInstalledPackages'updateLibArchivejhcLanguageExtensionsnhcLanguageExtensionshugsLanguageExtensionsgetOptionsFromSource stripCommentshugsMainFilenameinventBogusPackageIdcheckPackageProblemsinstallIncludeFiles allProgramsallSuffixHandlers