j;      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu v w x y z { | } ~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   !!"""""                                                   #+portablealpha%Isaac Jones <ijones@syntaxpolice.org> portablealpha%Isaac Jones <ijones@syntaxpolice.org>4  !"#$%&'()*+,-./012343210/.-,+*)('&%$#"!  $      !"#$%&'()*portablealphalibraries@haskell.org+%&'()*+,-./0123456789:;<=>?@ABCDEF+86<=>?@ABCDEF-,+*)('&%./01234579:; 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>+convinience function for repetitions above    uvwxyz{+,- +,- portablealpha%Isaac Jones <ijones@syntaxpolice.org>v#The name and version of a package. wCreates a string like foo-1.2 y!A package ID looks like foo-1.2. z"The name of this package, eg. foo {$the version of this package, eg 1.2 uvwxyz{vuz{wyxportablealpha%Isaac Jones <ijones@syntaxpolice.org>"GParses the given file into a mI. IIn Cabal 1.2 the syntax for package descriptions was changed to a format > with sections and possibly indented property descriptions. Qtools needed to build this bit R(options for pre-processing Haskell code Soptions for C compiler Toptions for linker U"pkg-config packages that are used V support frameworks for Mac OS X YLwhat libraries to link with when compiling a program that uses your package [(The .h files to be found in includeDirs \%.h files to install with the package ]directories to find .h files ^/where to look for the haskell module hierarchy _ non-exposed or non-main modules g/The type of build system used by this package. p: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. tJFlatten 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 I description, e.g., the source dirctory 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. u&does this package have any libraries? vAIf the package description has a library section, call the given 4 function with the library build info as argument. w<Get all the module names from the libraries in this package x(does this package have any executables? y%Perform the action on each buildable nf in the package  description. z7Get all the module names from the exes in this package |The ij( for the library (if there is one and it's buildable) and C all the buildable executables. Useful for gathering dependencies. >Update the given package description with the output from the  pre-hooks. 2Select options for a particular Haskell compiler. @The name of the auto-generated module associated with a package Parse the given package file. $Sanity check this description file. component is buildable here #A one-line summary of this package +A more verbose description of this package HIf this package depends on a specific version of Cabal, give that here.   %& version of u =Given a parser and a filename, return the parse of the file, $ after checking if the file exists. f!"#$GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~fplMLNOPmIstrGJgbcdeokvuwnfyxz$!"#ijQRSTUVW^_XYZ][\a`{|h}HK~qportablealpha%Isaac Jones <ijones@syntaxpolice.org> \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. Pretty print a  Condition. A ConfFlag! represents an user-defined flag `)Result of dependency test. Isomorphic to Maybe d but renamed for  clarity. bA ConfVar% represents the variable type used. c@A boolean expression parameterized over the variable type used. d6Simplify the condition and return its free variables. e/Parse a configuration condition from a string. gJTry 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. hBFlatten 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. ISimplify a configuration condition using the os and arch names. Returns : the names of all the flags occurring in the condition. WXYZ[\]^_`abcdefghijklmnopqrst\[rstbWXYZcqponmedalijk]fgh`^_portablealphalibraries@haskell.org !Field descriptor. The parameter a# parameterizes over where the field's  value is stored in. parse a module name .Parse something optionally wrapped in quotes.  GPretty-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. #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. %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 s to s 8      !"#$8$!"#       portablealpha%Isaac Jones <ijones@syntaxpolice.org>46Combine the preprocessors in the given hooks with the ! preprocessors built into cabal. AWARNING: The hooks interface is under rather constant flux as we A try to understand users needs. Setup files that depend on this E interface may break in future releases. Hooks allow authors to add D specific functionality before and after a command is run, and also & to specify additional preprocessors. 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. Empty    which do nothing. 7Hooks that correspond to a plain instantiation of the  "simple" build system Basic autoconf   :  on non-Windows systems,   runs ./ configure, if present.  the pre-hooks  ,  ,  ,  ,    and  ( read additional build information from  package .buildinfo, if present. Thus  configure. can use local system information to generate  package .buildinfo and possibly other files.  Used for ./ setup test Read the description file 3Custom preprocessors in addition to and overriding . 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. HHook to run after build command. Second arg indicates verbosity level. LHook to run before makefile command. Second arg indicates verbosity level. ?Over-ride this hook to get different behavior during makefile. KHook to run after makefile command. Second arg indicates verbosity level. IHook to run before clean command. Second arg indicates verbosity level. <Over-ride this hook to get different behavior during clean. HHook to run after clean command. Second arg indicates verbosity level.  Hook to run before copy command ;Over-ride this hook to get different behavior during copy. Hook to run after copy command #Hook to run before install command >Over-ride this hook to get different behavior during install. ;Hook to run after install command. postInst should be run * on the target, not on the build machine. IHook to run before sdist command. Second arg indicates verbosity level. <Over-ride this hook to get different behavior during sdist. HHook to run after sdist command. Second arg indicates verbosity level. $Hook to run before register command :Over-ride this hook to get different behavior during pfe. #Hook to run after register command &Hook to run before unregister command :Over-ride this hook to get different behavior during pfe. %Hook to run after unregister command LHook to run before hscolour command. Second arg indicates verbosity level. ?Over-ride this hook to get different behavior during hscolour. KHook to run after hscolour command. Second arg indicates verbosity level. KHook 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. GHook to run before pfe command. Second arg indicates verbosity level. :Over-ride this hook to get different behavior during pfe. GHook to run after pfe command. Second arg indicates verbosity level. @Combine the programs in the given hooks with the programs built  into cabal. Helper function for  defaultMain      !"#$%&'()*+,-./012356789:;<=>?@ABCDEuvwxyz{4 portablealpha%Isaac Jones <ijones@syntaxpolice.org>5Build the libraries and executables in this package. portablealpha%Isaac Jones <ijones@syntaxpolice.org>BSome 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. GFor the given compiler, return the flags for the supported extensions. GFor the given compiler, return the flags for the supported extensions. portablealpha%Isaac Jones <ijones@syntaxpolice.org>  dist/ setup-config 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.  Perform the "./setup configure" action.  Returns the  .setup-config file. HTest for a package dependency and record the version we have installed. BConverts build dependencies to a versioned dependency. only sets 7 version information for exact versioned dependencies.  0Output warnings and errors. Exit if any errors.  portablealpha%Isaac Jones <ijones@syntaxpolice.org>@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 !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 VVportablealphalibraries@haskell.org}Where ghc versions < 6.3 keeps the --user files. 4 |return the file, whether it exists, and whether it' s readable ~If the package file doesn')t exist, we should try to create it. If D it already exists, do nothing and return true. This does not take 3 into account whether it is readable or writeable. 4Check for read permission on the localPackageConfig 5Check for write permission on the localPackageConfig #CHelper function for canReadPackageConfig and canWritePackageConfig |}~|}~!portablealpha%Isaac Jones <ijones@syntaxpolice.org>portablealpha%Isaac Jones <ijones@syntaxpolice.org>$'The flags for the supported extensions Building a package for Hugs. 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>. %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. '<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> 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> :?An abstract path, posibly containing variables that need to be  substituted for to get a real )%'. <: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. =(The installation dirctories in terms of :s 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 E). 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  libdubdir 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. AEConvert from abstract install directories to actual absolute ones by G substituting for all the variables in the abstract paths, to get real  absolute path. BCCheck 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). C Convert a )%' to a : including any template vars. D4Convert back to a path, ingoring any remaining vars F>The initial environment has all the static stuff but no paths *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 B we  can replace G with the 8 and get resulting  :s that still have the 8 in them. Doing this makes it 8 each to check which paths are relative to the $prefix. 1./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^1<;TUVWXYZ[\]^?@=SGHIJKLMNOPQR>AB:9./012345678CDEFportablealpha%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>`0Data cached after configuration step. See also  Distribution.Setup.ConfigFlags. e5The directory in which we put auto-generated modules fSee A gSee B l6The installation directories for the various differnt  kinds of files mThe compiler we're building with nWhere to build the package. o+Where to put the result of the Hugs build. pWhich packages we depend on, exactly.  The pl ' 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. q6the filename containing the .cabal file, if available r8The resolved package description, that does not contain  any conditionals. s#Location and args for all programs t$What package database to use, global/user uWhether to build normal libs. v-Whether to build profiling versions of libs. w*Whether to build shared versions of libs. x,Whether to build executables for profiling. y3Whether to build with optimization (if available). z2Whether to build libs suitable for use with GHCi. {'Use -split-objs with GHC, if available L./0123456789:;<=>?@CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{`_lmnopqrstuvwxyz{fgihjkbcdaeportablealpha%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. portablealpha%Isaac Jones <ijones@syntaxpolice.org>FA preprocessor for turning non-Haskell files with the given extension " into plain Haskell source files. CThe 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. (Apply preprocessors to the sources from ^ , to obtain ( a Haskell source file for each module. LRemove the preprocessed .hs files. (do we need to get some .lhs files too?) ?Convenience function; get the suffixes of these preprocessors. HStandard preprocessors: GreenCard, c2hs, hsc2hs, happy, alex and cpphs. -DFind the first extension of the file that exists, and preprocess it  if required. portableStable/Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>UU: takes a filename (for error reports), and transforms the K given string, to eliminate the literate comments from the program text. TUUT  GHC, Hugsalpha%Isaac Jones <ijones@syntaxpolice.org>'The full path of a configured 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. AUser-specify this path. Basically override any path information - for this program in the configuration. If it's not a known  program ignore 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. .Represents a program which can be configured. 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 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 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 9 or orLaterVersion ( %( %( [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. 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 (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. .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   . <<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 0ALike rawSystemProgram, but emits to a script instead of exiting.  FIX: chmod +x? 1ELike rawSystemEmit, except it has string for pipeFrom. FIX: chmod +x portablealpha%Isaac Jones <ijones@syntaxpolice.org>$BThe default configuration of a package, before running configure,  most things are "Nothing" , zero, etc.  Flags to sdist: (snapshot, verbosity) 2All the possible flags  Flags to register and  unregister: (user package, gen-script,  in-place, verbosity)  Flags to install: (package db, verbosity)  Flags to copy7: (destdir, copy-prefix (backwards compat), verbosity) The location prefix for the copy command.  Flags to  configure command Arguments to pass to a  configure script, e.g. generated by  autoconf.  All programs that cabal may run 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. installation prefix installation dir for binaries, -installation dir for object code libraries, 3subdirectory of libdir in which libs are installed *installation dir for program executables,  6installation dir for read-only arch-independent data, !:subdirectory of datadir in which data files are installed "#installation dir for documentation #(installation dir for HTML documentation $(installation dir for haddock interfaces %verbosity level &the --user flag? '"Enable compiling library for GHCi (Enable -split-objs with GHC 3DHelper function for commands with no arguments except for verbosity  and help. 40Helper function for commands with more options. 5<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"]       !"#$%&'()*y* !"#$%&'()     #portablealpha'http://hackage.haskell.org/trac/hackage"portablealpha%Isaac Jones <ijones@syntaxpolice.org>Create a source distribution. *Prepare a directory tree of source files. FCreate an archive from a tree of source files, and clean up the tree. The file name of the tarball 6/Move the sources into place based on buildInfo  portablealpha%Isaac Jones <ijones@syntaxpolice.org>|7Extension for dynamically linked (or shared) libraries  (typically "so" on Unix and "dll" on Windows) DNon fatal conditions that may be indicative of an error or problem. We display these at the H verbosity level. Useful status messages. We display these at the H 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 I (Detailed internal debugging information 6We display these messages when the verbosity level is J /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: F xargs (32*1024) (rawSystemPathExit verbosity) prog fixedArgs bigArgs ?Get the file path for this particular module. In the IO monad C because it looks for the actual file. Might eventually interface ? with preprocessor libraries in order to correctly locate more  filenames. , Returns empty list if no such files exist. Like  *, but return the location and the rest of  the path as separate results. >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. 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. Extension for executable files  (typically "" on Unix and "exe" on Windows or OS/2) =Extension for object files. For GHC and NHC the extension is "o".  Hugs uses either "o" or "obj"# depending on the used C compiler. 77Get the possible file paths based on this module name. 8GA list of possibly correct description files. Should be pre-filtered. $|}~$~}| QRS9:;<=>RQSportablealpha%Isaac Jones <ijones@syntaxpolice.org> FGHIJKLMNOP FGHIJKLMNOPportablealpha%Isaac Jones <ijones@syntaxpolice.org>>/Does this version fall within the given range?    56789:;<=>?@ABCDE;:EDCBA987=>?@<65portable provisionallibraries@haskell.org"?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_44)portablealpha%Isaac Jones <ijones@syntaxpolice.org>?This represents language extensions beyond Haskell 98 that are B supported by some implementations, usually in some special mode. 4  !"#$%&'()*+,-./012343210/.-,+*)('&%$#"!  *portable experimentallibraries@haskell.org`This is almost the same as a*, 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. b@Describes whether an option takes an argument or not, and if so 3 how the argument is injected into a value of type a. c.What to do with options following non-options dEach d* describes a single option. The arguments to e* are: ! list of short option characters & list of long option strings (without "--")  argument descriptor  explanation of option for user f@Return a string describing the usage of a command, derived from ? the header (first argument) and the options described by the  second argument. aEProcess the command-line, and return the list of values that matched (and those that didn't). The arguments are:  The order requirements (see c*)  The option descriptions (see d*) 9 The actual command line arguments (presumably got from  System.Environment.getArgs). a*= returns a triple consisting of the option arguments, a list .of non-options, and a list of error messages. `bcdfaghiejkl a`fclkjdebihg+mnopqrstuvwxyz{|},~-./)0)1)2)3)4)5)6)7)8)9):);)<)=)>)?)@)A)B)C)D)E)F)G)H)I)J)K)L)M)N)O)P)Q)R)S)T)U)V)W)X)Y)Z)[)\)])^)_)`)a)b)cdeefghijklmnopqrstuvwxyz{|}~                           !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM&NOPQRSTUVWXYZ[\]^_`_abcdefghijklmnopqrstuvwxyzYZ{\|}~NOqVdefghijklm      !"#$%&'()*+,-./0123456789:;<=>?@AABCDEFGHIJKLMNOPQRSTUVWBXYZ[\]^_`abccdefghFGijklmnopqrstuvwxyz{|}~   !!"""""    1 2   3                                           #%(%(%(%(%&    %( %(   %  !""# $ %&'()*%+,%+-%+.%+/%+0%+1%+2%+3%+4%+5%+6%+7%+8%+9%+:%+;%+<%+=%+>%+?%+@%+A%+B%+C%+D%+E%+F%+G%+H%+I%+J%+K%+L*M*N*O*P*Q*R*S*T*U*V*W*X*YZ[\Z[]Z[^Z[_Z[`Z[aZ[bZ[cZ[dZ[eZ[fZ[gZ[hZ[iZ[jZ[kZ[lmnomnpmnqmnrmnsmntmnumnvmnwmnxmnymnzmn{mn|mn}mn~mnmnmnmnmnmnmnmnmnmnmnmnmn,%%// Cabal-1.2.4.0Distribution.ExtensionDistribution.Compat.ReadPDistribution.VersionDistribution.VerbosityDistribution.System$Distribution.Simple.PreProcess.Unlit Distribution.Simple.GHC.MakefileDistribution.ConfigurationDistribution.PackageDistribution.Simple.UtilsDistribution.SimpleDistribution.Simple.ProgramDistribution.LicenseDistribution.CompilerDistribution.ParseUtils!Distribution.InstalledPackageInfoDistribution.PackageDescriptionDistribution.Simple.CompilerDistribution.Simple.SetupDistribution.MakeDistribution.Simple.InstallDirs"Distribution.Simple.LocalBuildInfo%Distribution.Simple.GHC.PackageConfigDistribution.Simple.GHCDistribution.Simple.JHCDistribution.Simple.NHCDistribution.Simple.PreProcessDistribution.Simple.HugsDistribution.Simple.InstallDistribution.Simple.RegisterDistribution.Simple.ConfigureDistribution.Simple.BuildDistribution.Simple.HaddockDistribution.Simple.SrcDist Distribution.Simple.SetupWrapperDistribution.Setupbase Data.MaybePrelude Data.VersionLanguage.Haskell.ExtensionDistribution.GetOptDistribution.Compat.MapDistribution.Compat.DirectoryDistribution.Compat.ExceptionDistribution.Compat.RawSystemDistribution.Compat.TempFile ExtensionOverlappingInstancesUndecidableInstancesIncoherentInstances RecursiveDoParallelListCompMultiParamTypeClassesNoMonomorphismRestrictionFunctionalDependencies Rank2Types RankNTypesPolymorphicComponentsExistentialQuantificationScopedTypeVariablesImplicitParamsFlexibleContextsFlexibleInstancesEmptyDataDeclsCPPKindSignatures BangPatternsTypeSynonymInstancesTemplateHaskellForeignFunctionInterfaceArrowsGenericsNoImplicitPreludeNamedFieldPuns PatternGuardsGeneralizedNewtypeDerivingExtensibleRecordsRestrictedTypeSynonyms HereDocuments MagicHash TypeFamiliesStandaloneDeriving UnicodeSyntaxPatternSignaturesUnliftedFFITypesLiberalTypeSynonyms TypeOperatorsRecordWildCards RecordPunsDisambiguateRecordFieldsOverloadedStringsGADTsNoMonoPatBindsRelaxedPolyRecExtendedDefaultRules UnboxedTuplesDeriveDataTypeableConstrainedClassMethodsReadP DependencyorEarlierVersionorLaterVersion AnyVersion VersionRange readVersion isAnyVersionbetweenVersionsInclusive withinRangeshowVersionRangeparseVersionRange ThisVersion LaterVersionEarlierVersionUnionVersionRangesIntersectVersionRanges Verbositysilentnormalverbose deafening moreVerbose lessVerboseintToVerbosityflagToVerbosity showForCabal showForGHCWindowsOSosplainunlitmakefileTemplateImplFlagArchMkFlag ppCondTree MissingDepsDepOk DepTestRsltCondTreeConfVar ConditionsimplifyConditionparseCondition mapTreeDataresolveWithFlagsignoreConditions condTreeDatacondTreeConstraintscondTreeComponentsCondNodeVarLitCNotCOrCAndflagNameflagDescription flagDefaultPackageIdentifier showPackageIdparsePackageNameparsePackageIdpkgName pkgVersion dllExtension mkLibNamedieWithLocationdiewarnnoticeinfodebugbreakswrapText maybeExit rawSystemExitrawSystemPathExitrawSystemStdoutrawSystemStdout'xargsmoduleToFilePathmoduleToFilePath2findFilefindFileWithExtensionfindFileWithExtension'dotToSepsmartCopySourcescreateDirectoryIfMissingVerbosecopyFileVerbosecopyDirectoryRecursiveVerbose currentDir mkProfLibNamemkSharedLibNamematchesDescFiledefaultPackageDescfindPackageDescdefaultHookedPackageDescfindHookedPackageDesc exeExtension objExtension ghcPkgProgram hugsProgramffihugsProgram nhcProgram hmakeProgram jhcProgramhscolourProgramhaddockProgram happyProgram alexProgram hsc2hsProgram c2hsProgram cpphsProgramgreencardProgrampfesetupProgram ranlibProgram arProgram ldProgram tarProgrampkgConfigProgram programPathProgramLocation ghcProgramuserSpecifyPathProgrambuiltinProgramsProgramConfigurationProgArg FoundOnSystem UserSpecifiedConfiguredProgram simpleProgramfindProgramOnPathfindProgramVersionemptyProgramConfigurationdefaultProgramConfigurationaddKnownProgramlookupKnownProgram knownProgramsuserMaybeSpecifyPathuserSpecifyArgs lookupProgram updateProgramconfigureAllKnownProgramsrequireProgramrawSystemProgramrawSystemProgramStdoutrawSystemProgramConfrawSystemProgramStdoutConf cppProgram locationPath programIdprogramVersion programArgsprogramLocation programNameprogramFindLocationprogramFindVersion OtherLicenseAllRightsReserved PublicDomainBSD4BSD3LGPLGPLLicense OtherCompilerJHCHeliumHBCHugsNHCGHCCompilerFlavordefaultCompilerFlavor parseReadSparsePackageNameQparseVersionRangeQ FromString TabsErrorNoParse AmbigousParse showToken parseSepList parseTokenQIfBlockSectionFFieldrunP FieldDescrPWarningLineNoParseOk ParseFailedPError ParseResultcatchParseError parseFaillocatedErrorMsg syntaxErrorwarningfield liftField simpleFieldcommaListField listField optsFieldlineNofName readFieldsparseModuleNameQparseFilePathQparseDependencyparsePkgconfigDependencyparseOptVersionparseTestedWithQ parseLicenseQparseExtensionQ parseReadSQparseCommaListparseOptCommaList parseQuoted showFilePathshowTestedWithshowDependency showFreeText fieldNamefieldGetfieldSetincludes includeDirsextraGHCiLibrariesextraLibraries hsLibraries libraryDirs importDirs hiddenModulesexposedModulesdepends hugsOptions ccOptions ldOptions frameworkDirs frameworkshaddockInterfaces haddockHTMLsInstalledPackageInfoemptyInstalledPackageInfoparseInstalledPackageInfoshowInstalledPackageInfoshowInstalledPackageInfoFieldpackagelicense copyright maintainerauthor stabilityhomepagepkgUrl descriptioncategoryexposedparsePackageDescriptionparseHookedBuildInfoGenericPackageDescriptionshowPackageDescriptionshowHookedBuildInfo buildDepends testedWith dataFiles extraSrcFiles extraTmpFiles buildTools cppOptionspkgconfigDependscSources extensions extraLibs extraLibDirsinstallIncludes hsSourceDirs otherModulesghcProfOptionsoptionsCustomMake ConfigureSimple Executable BuildTypeHookedBuildInfo BuildInfoLibraryPackageDescription cabalVersionemptyPackageDescriptionfinalizePackageDescriptionflattenPackageDescriptionhasLibswithLib libModuleshasExeswithExe exeModulesemptyBuildInfo allBuildInfoemptyHookedBuildInfosatisfyDependencyupdatePackageDescription hcOptionsautogenModuleName haddockName setupMessagereadHookedBuildInforeadPackageDescriptionwritePackageDescriptionwriteHookedBuildInfosanityCheckPackage buildableghcSharedOptionsexeName modulePath buildInfo libBuildInfopackageDescriptiongenPackageFlags condLibrarycondExecutables licenseFilesynopsisdescCabalVersion buildTypelibrary executablesSpecificPackageDB UserPackageDBGlobalPackageDB PackageDBCompilershowCompilerIdcompilerVersionunsupportedExtensionsextensionsToFlagscompilerFlavor compilerIdcompilerExtensionsHelpCmd UnregisterCmd RegisterCmdTestCmd MakefileCmdSDistCmd InstallCmdProgramaticaCmd HaddockCmd HscolourCmdCopyCmdCleanCmdBuildCmd ConfigCmd HaddockFlagsemptyConfigFlagsPFEFlags BuildFlags HscolourFlags RegisterFlags InstallFlags CopyFlags CopyPrefixCopyTo NoCopyDest MakefileFlags CleanFlags SDistFlagsActionCopyDest ConfigFlagsemptyCopyFlagsemptyInstallFlagsemptyRegisterFlagsemptyHscolourFlagsemptyHaddockFlagsemptyCleanFlagsemptyBuildFlagsemptyMakefileFlags configureArgsparseGlobalArgs reqPathArg reqDirArgparseConfigureArgsparseBuildArgsparseMakefileArgsparseHscolourArgsparseHaddockArgsparseProgramaticaArgsparseCleanArgs parseCopyArgsparseInstallArgsparseSDistArgs parseTestArgsparseRegisterArgsparseUnregisterArgs pfeVerbosemakefileVerbose makefileFile buildVerbose buildPrograms cleanSaveConf cleanVerbose haddockHooglehaddockHtmlLocationhaddockExecutables haddockCsshaddockHscolourhaddockHscolourCsshaddockVerbose hscolourCSShscolourExecutableshscolourVerbose regPackageDB regGenScript regGenPkgConfregPkgConfFile regInPlace regVerbose sDistSnapshot sDistVerboseinstallPackageDBinstallVerbosecopyDest copyVerboseconfigProgramsconfigHcFlavor configHcPath configHcPkgconfigVanillaLib configProfLibconfigSharedLib configProfExeconfigConfigureArgsconfigOptimization configPrefix configBinDir configLibDirconfigLibSubDirconfigLibExecDir configDataDirconfigDataSubDir configDocDir configHtmlDirconfigInterfaceDir configVerboseconfigPackageDB configGHCiLibconfigSplitObjsconfigConfigurationsFlags defaultMaindefaultMainArgsdefaultMainNoRead CompilerVarPkgIdVar PkgVerVar PkgNameVar DocDirVar DataSubdirVar DataDirVar LibSubdirVar LibDirVar BinDirVar PrefixVarPathTemplateVariable PathTemplate InstallDirsInstallDirTemplatesdefaultInstallDirs haddockdirhaddockinterfacedirabsoluteInstallDirsprefixRelativeInstallDirstoPathTemplatefromPathTemplatesubstPathTemplateinitialPathTemplateEnvprefixDirTemplatebinDirTemplatelibDirTemplatelibSubdirTemplatelibexecDirTemplateprogDirTemplateincludeDirTemplatedataDirTemplatedataSubdirTemplatedocDirTemplatehtmlDirTemplateinterfaceDirTemplateprefixbindirlibdir dynlibdir libexecdirprogdir includedirdatadirdocdirhtmldir interfacedirLocalBuildInfo haddockPrefdistPrefsrcPref hscolourPrefautogenModulesDirmkBinDirmkLibDir mkLibexecDir mkDataDirinstallDirTemplatescompilerbuildDir scratchDir packageDeps pkgDescrFile localPkgDescr withPrograms withPackageDBwithVanillaLib withProfLib withSharedLib withProfExewithOptimization withGHCiLib splitObjsGHCPackageConfiglocalPackageConfigmaybeCreateLocalPackageConfigcanReadLocalPackageConfigcanWriteLocalPackageConfigmkGHCPackageConfigdefaultGHCPackageConfigshowGHCPackageConfignameauto import_dirs source_dirs library_dirs hs_librariesextra_libraries include_dirs c_includes package_depsextra_ghc_opts extra_cc_opts extra_ld_optsframework_dirsextra_frameworks GHCPackage configuregetInstalledPackagesbuildghcVerbosityOptionsmakefile installExe installLibppCppppHsc2hsppAlexppHappy ppGreenCardppC2hsPPSuffixHandler PreProcessormkSimplePreProcessorrunSimplePreProcessorpreprocessSourcesremovePreprocessedPackageremovePreprocessedppUnlitppCpp' ppSuffixesknownSuffixHandlersplatformIndependentrunPreProcessorinstallregisterwriteInstalledConfigremoveInstalledConfigremoveRegScripts unregisterlocalBuildInfoFilegetPersistBuildConfigmaybeGetPersistBuildConfigwritePersistBuildConfigcheckPersistBuildConfigconfigDependencyconfigCompilerAuxconfigCompilerinitialBuildStepshaddockhscoloursdist prepareTree createArchive copyFileTo tarBallNameArgs UserHooksdefaultMainWithHooksdefaultMainWithHooksArgsemptyUserHookssimpleUserHooksdefaultUserHooksrunTestsreadDeschookedPreProcessorshookedProgramspreConfconfHookpostConfpreBuild buildHook postBuild preMakefile makefileHook postMakefilepreClean cleanHook postCleanpreCopycopyHookpostCopypreInstinstHookpostInstpreSDist sDistHook postSDistpreRegregHookpostRegpreUnreg unregHook postUnreg preHscolour hscolourHook postHscolour preHaddock haddockHook postHaddockprePFEpfeHookpostPFE setupWrapper basicCommand versionTags versionBranchVersion maybeHasLibsMaybereadAndParseFileppCondConfFlagsimplifyWithSysParamsToken tokeniseLinenormaliseLineEndingsmkTreelayoutbracesmkFieldifelseallSuffixHandlers allProgramsdefaultMainWorker parseVersion showVersionsetDepByVersionerrorOutguessGhcPkgFromGhcPatholdLanguageExtensionscheckPermissionhugsLanguageExtensionsgetOptionsFromSource stripCommentshugsMainFilenameinstallIncludeFiles GHC.IOBaseFilePathsubstituteTemplatesjhcLanguageExtensionsnhcLanguageExtensionspreprocessModuleconfigureProgramshowInstalledConfig rawSystemEmit rawSystemPipe parseNoArgs parseArgs splitArgs prepareDirmoduleToPossiblePathsdescriptionCheckMingWLinuxOSXSolarisOtherText.ParserCombinators.ReadP readS_to_P readP_to_SmanyTillchainl1chainr1chainlchainrendBy1endBysepBy skipMany1optionaloptionbetweencount skipSpaceschoicemunch1munchstringcharsatisfygather+++pfaillookgetReadSmanyskipManysepBy1many1<++getOpt'getOptArgDescrArgOrderOptDescrOption usageInfoNoArgReqArgOptArg RequireOrderPermute ReturnInOrdercontainers-0.1.0.1Data.Map fromListWithkeyselemsupdate insertWithfindWithDefaultmemberlookupMap differenceunion unionWith toAscListinsertfromListemptyunionsdirectory-1.0.0.0System.Directory searchable executablewritablereadablegetTemporaryDirectorygetUserDocumentsDirectorygetAppUserDataDirectorygetHomeDirectorygetModificationTime doesFileExistdoesDirectoryExistsetCurrentDirectorygetCurrentDirectorygetDirectoryContentsfindExecutablemakeRelativeToCurrentDirectorycanonicalizePathcopyFile renameFilerenameDirectory removeFileremoveDirectoryRecursiveremoveDirectorycreateDirectoryIfMissingcreateDirectorysetPermissionsgetPermissions Permissions"getDirectoryContentsWithoutSpecialControl.Exceptionfinallybracketprocess-1.0.0.0 System.Cmd rawSystem openTempFile withTempFile