/f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh i j k l m n o p q r s t u v w x y z { | } ~                                    ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                                  !!!"""""""""""""""""""""""""""""""""#############$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%%% % % % % %%%%%%%%%%%%&&&&&&& &!'"'#'$'%'&''((()(*(+(,(-).)/)0)1)2*3+4,5,6,7,8,9,:,;,<,=->-?-@-A-B-C-D.E.F.G.H.I.J.K.L/M/N/O0P0Q1R1S1T1U1V1W1X1Y1Z1[1\1]2^3_3`3a3b3c3d3e3:portablecabal-devel@haskell.orgfghijklmnoNo unliteration. pq: takes a filename (for error reports), and transforms the K given string, to eliminate the literate comments from the program text. rst4portablelibraries@haskell.orguvwxyz{@Describes whether an option takes an argument or not, and if so 3 how the argument is injected into a value of type a. |optional argument }option requires argument ~no argument expected 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 wrap non-options into options +freely intersperse options and non-options ,no option processing after first non-option @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 ) 8 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.  {|}~ {~}||}~567portablelibraries@haskell.org+)Consumes and returns the next character. $ Fails if there is no input left. @Look-ahead: returns the part of the input that is left, without  consuming it. Always fails. Symmetric choice. 5Local, exclusive, left-biased choice: If left parser < locally produces any result at all, then right parser is  not used. 5Transforms a parser into one that does the same, but 2 in addition returns the exact characters read.  IMPORTANT NOTE:  - gives a runtime error if its first argument 1 is built using any occurrences of readS_to_P. =Consumes and returns the next character, if it satisfies the  specified predicate. ,Parses and returns the specified character. )Parses and returns the specified string. CParses the first zero or more characters satisfying the predicate. BParses the first one or more characters satisfying the predicate. ,Combines all parsers in the specified list. Skips all whitespace.  count n p  parses n occurrences of p in sequence. A list of  results is returned.  between open close p  parses open, followed by p and finally  close. Only the value of p is returned.  option x p will either parse p or return x without consuming  any input.  optional p optionally parses p and always returns (). 5Parses zero or more occurrences of the given parser. 4Parses one or more occurrences of the given parser. Like , but discards the result. Like , but discards the result.  sepBy p sep$ parses zero or more occurrences of p, separated by sep. ( Returns a list of values returned by p.  sepBy1 p sep# parses one or more occurrences of p, separated by sep. ( Returns a list of values returned by p.  endBy p sep$ parses zero or more occurrences of p, separated and ended  by sep.  endBy p sep# parses one or more occurrences of p, separated and ended  by sep. ! chainr p op x$ parses zero or more occurrences of p, separated by op. ! Returns a value produced by a right associative application of all  functions returned by op!. If there are no occurrences of p, x is  returned. " chainl p op x$ parses zero or more occurrences of p, separated by op. ! Returns a value produced by a left associative application of all  functions returned by op!. If there are no occurrences of p, x is  returned. #Like !(, but parses one or more occurrences of p. $Like "(, but parses one or more occurrences of p. %manyTill p end$ parses zero or more occurrences of p, until end 2 succeeds. Returns a list of values returned by p. &7Converts a parser into a Haskell ReadS-style function. ) This is the main way in which you can "run" a  parser:  the expanded type is  / readP_to_S :: ReadP a -> String -> [(a,String)]  '7Converts a Haskell ReadS-style function into a parser. @ Warning: This introduces local backtracking in the resulting 2 parser, and therefore a possible inefficiency. "  !"#$%&'"  !"$#%&'!  !"#$%&'portablecabal-devel@haskell.org (#Parser with simple error reporting )*+,-./()*+,-./()*+,-./()*)*+,-./portablecabal-devel@haskell.org0123456789: 0123456789: 0123456789: 0123456789:portablecabal-devel@haskell.org;<=>?;<=>?;<=>?;<=<=>?portablecabal-devel@haskell.org @A valid Haskell module name. AB Construct a @ from a valid module name . MThis is just a convenience function intended for valid module strings. It is N an error if it is used with a string that is not a valid module name. If you ! are parsing user input then use Distribution.Text.simpleParse instead. CThe module name Main. DEThe individual components of a hierarchical module name. For example 3 components (fromString "A.B.C") = ["A", "B", "C"] EFConvert a module name to a file path, but without any file extension.  For example: + toFilePath (fromString "A.B.C") = "A/B/C" @ABCDE@BDECA@ABCDEportablecabal-devel@haskell.org.FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd3How strict to be when classifying strings into the Y and H 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. efg"FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg"Ydcba`_^]\[ZeHXWVUTSRQPONMLKJIfFGg"FGGHXWVUTSRQPONMLKJIIJKLMNOPQRSTUVWXY dcba`_^]\[ZZ[\]^_`abcdefg portablelibraries@haskell.orgBh?This represents language extensions beyond Haskell 98 that are B supported by some implementations, usually in some special mode. ij?Allow regular pattern matching over lists, as discussed in the  paper Regular Expression Patterns" by Niklas Broberg, Andreas Farre # and Josef Svenningsson, from ICFP '04. kBAllow concrete XML syntax to be used in expressions and patterns, 6 as per the Haskell Server Pages extension language:   &http://www.haskell.org/haskellwiki/HSP. The ideas behind it are  discussed in the paper ,Haskell Server Pages through Dynamic Loading * by Niklas Broberg, from Haskell Workshop '05. lmnopqrBAllow imports to be qualified by the package name that the module ' is intended to be imported from, e.g. ! import "network" Network.Socket stuvwxyz{|}~-Deprecated, use ScopedTypeVariables instead. CExtensions that have been deprecated, possibly paired with another  extension that replaces it.  for h1s 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'-'Z' 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. @hijklmnopqrstuvwxyz{|}~@h~}|{zyxwvutsrqponmlkji@h=~}|{zyxwvutsrqponmlkjiijklmnopqrstuvwxyz{|}~portablecabal-devel@haskell.org;$A complementary representation of a . Instead of a boolean F version predicate it uses an increasing sequence of non-overlapping,  non-empty intervals. KThe key point is that this representation gives a canonical representation  for the semantics of (s. This makes it easier to check things K like whether a version range is empty, covers all versions, or requires a M certain minimum or maximum version. It also makes it easy to check equality 5 or containment. It also makes it easier to identify 'simple' version G predicates for translation into foreign packaging systems that do not , support complex version range expressions. The version range -any*. That is, a version range containing all  versions. ! withinRange v anyVersion = True IThe empty version range, that is a version range containing no versions. JThis can be constructed using any unsatisfiable version range expression,  for example > 1 && < 1. " withinRange v anyVersion = False The version range == v * withinRange v' (thisVersion v) = v' == v The version range   v ||  v - withinRange v' (notThisVersion v) = v' /= v The version range > v * withinRange v' (laterVersion v) = v' > v The version range >= v - withinRange v' (orLaterVersion v) = v' >= v The version range < v , withinRange v' (earlierVersion v) = v' < v The version range <= v / withinRange v' (orEarlierVersion v) = v' <= v The version range  vr1 || vr2 / withinRange v' (unionVersionRanges vr1 vr2) , = withinRange v' vr1 || withinRange v' vr2 The version range vr1 && vr2 3 withinRange v' (intersectVersionRanges vr1 vr2) , = withinRange v' vr1 && withinRange v' vr2 The version range == v.*. For example, for version 1.2, the version range == 1.2.* is the same as  >= 1.2 && < 1.3 ; withinRange v' (laterVersion v) = v' >= v && v' < upper v  where J upper (Version lower t) = Version (init lower ++ [last lower + 1]) t The version range >= v1 && <= v2. LIn practice this is not very useful because we normally use inclusive lower $ bounds and exclusive upper bounds. * withinRange v' (laterVersion v) = v' > v -Fold over the basic syntactic structure of a . LThis provides a syntacic view of the expression defining the version range.  The syntactic sugar ">= v", "<= v" and "== v.*" is presented % in terms of the other basic syntax. For a semantic view use . "-any" version  "== v" "> v" "< v""_ || _" union "_ && _" intersection An extended variant of  that also provides a view of  in which the syntactic sugar ">= v", "<= v" and "== v.*" is presented < explicitly rather than in terms of the other basic syntax. "-any" version  "== v" "> v" "< v" ">= v" "<= v""== v.*" wildcard. The  function is passed the  inclusive lower bound and the  exclusive upper bounds of the  range defined by the wildcard. "_ || _" union "_ && _" intersection /Does this version fall within the given range? (This is the evaluation function for the  type. View a  as a union of intervals. 5This provides a canonical view of the semantics of a  as N opposed to the syntax of the expression used to define it. For the syntactic  view use . GEach interval is non-empty. The sequence is in increasing order and no F intervals overlap or touch. Therefore only the first and last can be < unbounded. The sequence can be empty if the range is empty  (e.g. a range expression like   1 &&  2). DOther checks are trivial to implement using this view. For example:  5 isNoVersion vr | [] <- asVersionIntervals vr = True 6 | otherwise = False  isSpecificVersion vr % | [(LowerBound v InclusiveBound @ ,UpperBound v' InclusiveBound)] <- asVersionIntervals vr  , v == v' = Just v  | otherwise = Nothing  Does this  place any restriction on the  or is it  in fact equivalent to . LNote this is a semantic check, not simply a syntactic check. So for example  the following is True (for all v). G isAnyVersion (EarlierVersion v `UnionVersionRanges` orLaterVersion v) This is the converse of #. It check if the version range is J empty, if there is no possible version that satisfies the version range. For example this is True (for all v): H isNoVersion (EarlierVersion v `IntersectVersionRanges` LaterVersion v) 7Is this version range in fact just a specific version? For example the version range ">= 3 && <= 3" contains only the version  3.  Simplify a * expression. For non-empty version ranges F this produces a canonical form. Empty or inconsistent version ranges 8 are left as-is because that provides more information. !If you need a canonical form use  )fromVersionIntervals . toVersionIntervals 'It satisfies the following properties:  : withinRange v (simplifyVersionRange r) = withinRange v r ( withinRange v r = withinRange v r' 6 ==> simplifyVersionRange r = simplifyVersionRange r'  || isNoVersion r  || isNoVersion r' 'Inspect the list of version intervals. Directly construct a  from a list of intervals. JEach interval must be non-empty. The sequence must be in increasing order K and no invervals may overlap or touch. If any of these conditions are not  satisfied the function returns Nothing. 7Check an upper bound does not intersect a lower bound: --| or ---) or ---] or ---) but not ---] E |--- (--- (--- [--- [--- 6Test if a version falls within the version intervals. JIt exists mostly for completeness and testing. It satisfies the following  properties: > withinIntervals v (toVersionIntervals vr) = withinRange v vr B withinIntervals v ivs = withinRange v (fromVersionIntervals ivs)  Convert a % to a sequence of version intervals.  Convert a  value back into a  expression % representing the version intervals. 11- portablecabal-devel@haskell.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. Not a recognised license. ; Allows us to deal with future extensions more gracefully. Some other license. DNo rights are granted to others. Undistributable. Most restrictive. ?Holder makes no claim to ownership, least restrictive license. 9The MIT license, similar to the BSD3. Very free license. A4-clause BSD license, older, with advertising clause. You almost 1 certainly want to use the BSD3 license instead. G3-clause BSD license, newer, no advertising clause. Very free license. =Lesser GPL, Less restrictive than GPL, useful for libraries. <GNU Public License. Source code must accompany alterations.  portablecabal-devel@haskell.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 have 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. :Not all kinds of packages can be uniquely identified by a  9. In particular, installed packages cannot, there may be 6 many installed instances of the same source package. 1Describes a dependency on a source package (API) OAn InstalledPackageId uniquely identifies an instance of an installed package. / There can be at most one package with a given  1 in a package database, or overlay of databases. #The name and version of a package. "The name of this package, eg. foo $the version of this package, eg 1.2 5Type alias so we can use the shorter name PackageId.  Simplify the  expression in a .  See .  portablecabal-devel@haskell.orgBdir prefix and extension, like "foo/bar/*.baz" corresponds to   FileGlob "foo/bar" ".baz" &No glob at all, just an ordinary file DNon fatal conditions that may be indicative of an error or problem. We display these at the 2 verbosity level. Useful status messages. We display these at the 2 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 3 (Detailed internal debugging information 6We display these messages when the verbosity level is 4 GPerform an IO action, catching any IO exceptions and printing an error  if one occurs. /a description of the action we were attempting the action itself 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. 9The output is assumed to be text in the locale encoding. HRun a command and return its output, errors and exit status. Optionally F also supply some input. Also provides control over whether the binary/text  mode of the input and output. input text and binary mode output in binary mode output, errors, exit  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.  version args function to select version  number from program output  location  /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  KFind a file by looking in a search path. The file path must match exactly. search locations  File Name  GFind a file by looking in a search path with one of a list of possible J file extensions. The file base name should be given and it will be tried A with each of the extensions in each element of the search path.  Like  . but returns which element of the search path K the file was found in, and the file path relative to that base directory. AFinds the files corresponding to a list of Haskell module names. As ! but for a list of module names. #build prefix (location of objects) search suffixes modules 6Find the file corresponding to a Haskell module name. This is similar to   but specialised to a module N name. The function fails if the file corresponding to the module is missing. #build prefix (location of objects) search suffixes module :List all the files in a directory and all subdirectories. GThe order places files in sub-directories after all the files in their L parent directories. The list is generated lazily so is not well defined if A the source directory structure changes before the list is used. Same as & but logs at higher verbosity levels. KCopies a file without copying file permissions. The target file is created A with default permissions. Any existing target file is replaced. 4At higher verbosity levels it logs an info message. GInstall an ordinary file. This is like a file copy but the permissions < are set appropriately for an installed file. On Unix it is " -rw-r--r--" L while on Windows it uses the default permissions for the target directory. IInstall an executable file. This is like a file copy but the permissions < are set appropriately for an installed file. On Unix it is " -rwxr-xr-x" L while on Windows it uses the default permissions for 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.  This is like  but uses . AThis installs all the files in a directory to a target location, K preserving the directory layout. All the files are assumed to be ordinary  rather than executable files. #Use a temporary filename that doesn't already exist. Temp dir to create the file in File name template. See . &Create and use a temporary directory. ICreates a new temporary directory inside the given directory, making use H of the template. The temp directory is deleted after use. For example:  @ withTempDirectory verbosity "src" "sdist." $ \tmpDir -> do ... The tmpDir9 will be a new subdirectory of the given directory, e.g.  src/ sdist.342. @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. 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. !KWrite a file but only if it would have new content. If we would be writing N the same as the existing content then leave the file as is so that we do not  update the file's modification time. "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. Where to look  pkgname.cabal %-Optional auxiliary package information file (pkgname .buildinfo) &;Find auxiliary package information in the given directory.  Looks for  .buildinfo files. Directory to search dir/pkgname .buildinfo , if present '(EIgnore a Unicode byte order mark (BOM) at the beginning of the input )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. ,4Fix different systems silly line ending conventions -./01>      !"#$%&'()*+,-./01>  "   #$%& !'()*+,-./01>      !"#$%&'()*+,-./01 portablecabal-devel@haskell.org23Where 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. 3;The location of the program, as located by searching PATH. 4(The user gave the path to this program,  eg. --ghc-path=/usr/bin/ghc-6.6 5678Just the name again 9-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 4 specified by the user. Usually this will just be a ABTry 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. B<A function to do any additional configuration after we have A located the program (and perhaps identified its version). It is ? allowed to return additional flags that will be passed to the  program on every invocation. C'The full path of a configured program. DMake 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 ... } 23456789:;<=>?@ABCD=>?@ABD6789:;C<24355243553456789:;789:;<=>?@AB>?@ABCDportablecabal-devel@haskell.orgEFGH8Represents a specific invocation of a specific program. LThis is used as an intermediate type between deciding how to call a program G and actually doing it. This provides the opportunity to the caller to L adjust how the program will be called. These invocations can either be run 1 directly or turned into shell or batch scripts. IJKLMNOPQRSTUV/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. IIt takes four template invocations corresponding to the simple, initial, J middle and last invocations. If the number of args given is small enough K that we can get away with just a single invocation then the simple one is  used:   $ simple args KIf the number of args given means that we need to use multiple invocations K then the templates for the initial, middle and last invocations are used:  $ initial args_0  $ middle args_1  $ middle args_2  ...  $ final args_n EFGHIJKLMNOPQRSTUVHIJKLMNOPEGFQRSVTUEGFFGHIJKLMNOPIJKLMNOPQRSTUVportablecabal-devel@haskell.orgWCall ar; to create a library archive from a bunch of object files. VWWVWportablecabal-devel@haskell.orgXCall ld -r+ to link a bunch of object files together. XXXportablecabal-devel@haskell.orgYJGenerate a system script, either POSIX shell script or Windows batch file & as appropriate for the given system. Z6Generate a POSIX shell script that invokes a program. [6Generate a Windows batch file that invokes a program. YZ[YZ[YZ[portablecabal-devel@haskell.org\The default list of programs. 8 These programs are typically used internally to Cabal. ]^_`abcdefghijklmnopqrstu\]^_`abcdefghijklmnopqrstu\]^_`abcdehijkfglmnopqrstu\]^_`abcdefghijklmnopqrstuportablecabal-devel@haskell.orgvDThe 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. wxyThe Read/5Show instance does not preserve all the unconfigured Programs  because >= is not in Read/*Show because it contains functions. So to  fully restore a deserialised v use this function to add  back all the known >=s. G It does not add the default programs, but you probably want them, use  \* in addition to any extra you might need. z0Add 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.  Program name #user-specified path to the program 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..  Program name user-specified args Like ~* but for a list of progs and their paths. Like ~) but for a list of progs and their args. GGet the path that has been previously specified for a program, if any. FGet any extra args that have been previously specified for a program. !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 L 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  . $Configure a bunch of programs using  . Just a . KTry to configure all the known programs that have not yet been configured. Hreconfigure a bunch of programs given new user-specified args. It takes  the same inputs as ~ and  and for all progs  with a new path it calls . <Check that a program is configured and available to be run. IIt raises an exception if the program could not be configured, otherwise $ it returns the configured program. <Check that a program is configured and available to be run. JAdditionally check that the version of the program number is suitable and * return it. For example you could require  AnyVersion or  orLaterVersion ( [1,0] []) MIt raises an exception if the program could not be configured or the version L is unsuitable, otherwise it returns the configured program and its version  number. vwxyz{|}~vwxyz{|}~vwxyz{|}~portablecabal-devel@haskell.org #Runs the given configured program.  Verbosity The program to run Any extra arguments to add 7Runs the given configured program and gets the output.  Verbosity The program to run Any extra arguments to add @Looks up the given program in the program database and runs it.  verbosity The program to run look up the program here Any extra arguments to add @Looks up the given program in the program database and runs it.  verbosity The program to run look up the program here Any extra arguments to add [ 23456789:;<=>?@ABCDHIJKLMNOPQRSTU\]^_`abcdefghijklmnopqrstuz{|}~\=>?@ABD 6789:;C<24355HIJKLMNOPQRSTU\z{|}~]^_`abcdehijkfglmnopqrstu portablecabal-devel@haskell.orgLike + 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  and the user 0 will have to specify which compiler they want.  8portablecabal-devel@haskell.org\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. #span in a line, following brackets The  token is for bits that start a line, eg:   "\n blah blah { blah" tokenises to:  : [Line n 2 False "blah blah", OpenBracket, Span n "blah"] Cso lines are the only ones that can have nested layout, since they ! have a known indentation level.  eg: we can' t have this:   if ... {  } else  other 6because other cannot nest under else, since else doesn't start a line ! so cannot have nested layout. It'd have to be:   if ... {  }  else  other but that'5s not so common, people would normally use layout or  brackets not both in a single if else construct.   if ... { foo : bar }  else  other  this is ok 2A conditional block with an optional else branch:   if  condition {   field*  } else {   field*  } =A section with a name and possible parameter. The syntactic  structure is:    sectionname  arg {   field*  }  A regular  property: value field <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). !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.      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. @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. indent level of the parent/previous line (accumulating param, trees in this level remaining tokens 2collected trees on this level and trailing tokens IParse the stream of tokens into a tree of them, based on explicit braces 5 This parse state expects to find a closing bracket.  line of the '{', used for error messages (accumulating param, trees in this level remaining tokens 2collected trees on this level and trailing tokens *Convert the parse tree into the Field AST 3 Also check for dodgy uses of tabs in indentation.   Convert ifthenelse s to s !parse a module name "#$%&'()*+,-./0(The parser for the stuff between commas 1(The parser for the stuff between commas 2(The parser for the stuff between commas 3(The parser for the stuff between commas 456789GPretty-print free-format text, ensuring that it is vertically aligned, ? and with blank lines replaced by dots for correct re-parsing. E     !"#&'()*+,./023456789E     !"#&'()*+,./023456789portablelibraries@haskell.org(:;<=--$portablecabal-devel@haskell.org>The collection of information about packages from one or more  PackageDBs. -Packages are uniquely identified in by their  , they can G also be effeciently looked up by package name or by name and version. >?@+Build an index out of a bunch of packages. If there are duplicates by  then later ones mask earlier  ones. Merge two indexes. MPackages from the second mask packages from the first if they have the exact  same . "For packages with the same source , packages from the second are  " preferred"? over those from the first. Being preferred means they are top & result when we do a lookup by source . This is the mechanism we 3 use to prefer user packages over global packages. )Inserts a single package into the index. 8This is equivalent to (but slightly quicker than) using A or   with a singleton index. 3Removes a single installed package from the index. &Removes all packages with this source  from the index. ERemoves all packages with this (case-sensitive) name 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. )Does a lookup by source package id (name & version). .Since multiple package DBs mask each other by , ' then we get back at most one package. )Does a lookup by source package id (name & version). >There can be multiple installed packages with the same source   but different  . They are returned in order of , preference, with the most preferred first. &Does a lookup by source package name. >Does a lookup by source 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. 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. 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. IAll packages that have immediate 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. ,Builds a graph of the package dependencies. HDependencies on other packages that are not in the index are discarded. 7 You can check if there are any such dependencies with . 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. 9portablecabal-devel@haskell.org/BCDEFGHIJKLMNCThis is the InstalledPackageInfo type used by ghc-6.4.2 and later. It's here purely for the O* instance so that we can read the package G database used by those ghc versions. It is a little hacky to read the J package db directly, but we do need the info and until ghc-6.9 there was  no better method. ;In ghc-6.4.1 and before the format was slightly different.  See Distribution.Simple.GHC.IPI642 PQRSTUVWXYZ[\]^_`abcdefghijklmnopqBJNmopqBJNmopq:portablecabal-devel@haskell.orgrAThis is the InstalledPackageInfo type used by ghc-6.4 and 6.4.1. It's here purely for the O* instance so that we can read the package G database used by those ghc versions. It is a little hacky to read the J package db directly, but we do need the info and until ghc-6.9 there was  no better method. +In ghc-6.4.2 the format changed a bit. See Distribution.Simple.GHC.IPI642 stuvwxyz{|}~rrportablecabal-devel@haskell.orgB)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 +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. DMkOptDescr constructors partially applied to flags and description. /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. name short description long description initial/ empty flags 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. 3      !"#$%&'(3$  %&('  #"  !3        !"#$%&'(portablecabal-devel@haskell.org)*+,-.@A boolean expression parameterized over the variable type used. /01234A ConfVar$ represents the variable type used. 56789A 9" is a total or partial mapping of ;:s to  < 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. =>?@ABCDEFGHHAn enumeration of common source control systems. The fields used in the  WV; depend on the type of repo. The tools and methods used to 4 obtain and track the repo depend on the repo type. IJKLMNOPQR0What this repo info is for, what it represents. STEThe repository containing the sources for this exact package version H or release. For this kind of repo a tag should be given to give enough - information to re-create the exact sources. UThe repository for the "head"( or development version of the project. G This repo is where we should track the latest development activity or 9 the usual repo people should get to contribute patches. VDInformation about the source revision control system for a package. LWhen specifying a repo it is useful to know the meaning or intention of the J information as doing so enables automation. There are two obvious common K purposes: one is to find the repo for the latest development version, the : other is to find the repo for this specific release. The ReopKind 6 specifies which one we mean (or another custom one). LA package can specify one or the other kind or both. Most will specify just L a head repo but some may want to specify a repo to reconstruct the sources  for this package release.  The required information is the H which tells us if it's using  Q, P for example. The Z and other details are ) interpreted according to the repo type. WX*The kind of repo. This field is required. Y;The type of the source repository system for this repo, eg Q or  P. This field is required. Z)The location of the repository. For most Hs this is a URL.  This field is required. [N can put multiple "modules" on one server and requires a H module name in addition to the location to identify a particular repo. D Logically this is part of the location but unfortunately has to be 6 specified separately. This field is required for the N H and  should not be given otherwise. \BThe name or identifier of the branch, if any. Many source control J systems have the notion of multiple branches in a repo that exist in the  same location. For example P and N use this while systems like  Q? use different locations for different branches. This field is C optional but should be used if necessary to identify the sources,  especially for the T repo kind. ]FThe tag identify a particular state of the repository. This should be  given for the T repo kind and not for U kind. ^HSome repositories contain multiple projects in different subdirectories J This field specifies the subdirectory where this packages sources can be + found, eg the subdirectory containing the .cabal file. It is interpreted H relative to the root of the repository. This field is optional. If not  given the default is "." ie no subdirectory. _`abcomponent is buildable here ctools needed to build this bit d(options for pre-processing Haskell code eoptions for C compiler foptions for linker g"pkg-config packages that are used h support frameworks for Mac OS X ij/where to look for the haskell module hierarchy k non-exposed or non-main modules lmLwhat libraries to link with when compiling a program that uses your package nodirectories to find .h files p(The .h files to be found in includeDirs q%.h files to install with the package rstuCustom fields starting  with x-, stored in a  simple assoc-list. v8Dependencies specific to a library or executable target wxyz{|}~%Is the lib to be exposed by default? /The type of build system used by this package. :a package that uses an unknown build type cannot actually 9 be built. Doing it this way rather than just giving a = parse error means we get better error messages and allows 7 you to inspect the rest of the package description. uses user-supplied Setup.hs or  Setup.lhs (default) calls Distribution.Make.defaultMain calls 9Distribution.Simple.defaultMainWithHooks defaultUserHooks,  which invokes  configure to generate additional build # information used by later phases. calls Distribution.Simple.defaultMain :This data type is the internal representation of the file  pkg.cabal. E It contains two kinds of information about the package: information M which is needed for all packages, such as the package name and version, and G 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. &does this package have any libraries?  version of  AIf the package description has a library section, call the given 4 function with the library build info as argument. IGet all the module names from the library (exposed and internal modules) (does this package have any executables? %Perform the action on each buildable xw in the package  description. %Get all the module names from an exe The a`( 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. )*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~|}~wxyz{`abcdefghijklmnopqrstuv_BCDEFG<=>?@A:;9)*+,-48765.3210/VWXYZ[\]^RUTSHQPONMLKJI)*+,-*+,-.3210//01234876556789:;;<=>?@A=>?@ABCDEFGCDEFGH QPONMLKJIIJKLMNOPQRUTSSTUVWXYZ[\]^WXYZ[\]^_`abcdefghijklmnopqrstuvabcdefghijklmnopqrstuvwxyz{xyz{|}~}~portablecabal-devel@haskell.org%1A set of targets with their package dependencies JA map of dependencies. Newtyped since the default monoid instance is not * appropriate. The monoid instance uses . )Result of dependency test. Isomorphic to Maybe d but renamed for  clarity. 6Simplify the condition and return its free variables. (partial) variable assignment ISimplify a configuration condition using the os and arch names. Returns : the names of all the flags occurring in the condition. /Parse a configuration condition from a string. 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. 4Domain for each flag name, will be tested in order. .OS as returned by Distribution.System.buildOS 2Arch as returned by Distribution.System.buildArch Compiler flavour + version Additional constraints Dependency test function. ;Either the missing dependencies (error case), or a pair of C (set of build targets with dependencies, chosen flag assignments) 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. DCombine the target-specific dependencies in a TargetSet to give the * dependencies for the package as a whole.  Input map Extra constraints ECollect up the targets in a TargetSet of tagged targets, storing the  dependencies as we go. ?Create a package description with all configurations resolved. This function takes a CB 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. &Explicitly specified flag assignments EIs a given depenency satisfiable from the set of available packages? # If this is unknown then use True. The 7H and 8Y Compiler + Version Additional constraints 4Either missing dependencies or the resolved package 5 description along with the flag assignments chosen. JFlatten 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. portablecabal-devel@haskell.org. 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 CB. 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. &descriptions of fields we know how to  parse possibly do something with  unrecognized fields  accumulator fields to be parsed list of parseable fields possibly do something with  unrecognized fields  accumulated result and warnings the field to be parsed portablecabal-devel@haskell.org%AA record of operations needed to check the contents of packages.  Used by . .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. !An issue that is ok in the author's environment but is almost D certain to be a portability problem for other environments. We can F quite legitimately refuse to publicly distribute packages with these  problems. @An issue that might not be a problem for the package author but E might be annoying or determental when the package is distributed to G users. We should encourage distributed packages to be free from these E issues, but occasionally there are justifiable reasons so we cannot  ban them entirely. ?A problem that is likely to affect building the package, or an  issue that we'4d like every package author to be aware of, even if # the package is never distributed. *This package description is no good. There' s no way it' s going to > build sensibly. This should give an error at configure time. @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 . It requires the CB and optionally a particular , configuration of that package. If you pass  then we just check , a version of the generic description using . -Check that this package description is sane. ?Check that if the package uses new syntax that it declares the  "cabal-version: >= x.y" version correctly. BCheck the build-depends fields for any weirdness or bad practise. CSanity check things that requires IO. It looks at the files in the L package and expects to find the package unpacked in at the given filepath. CSanity check things that requires looking at files in the package. " This is a generalised version of  that can work in any ! monad for which you can provide  operations. LThe point of this extra generality is to allow doing checks in some virtual / file system, for example a tarball in memory. ICheck the names of all files in a package for portability problems. This K should be done for example when creating or validating a package tarball. >Check a file name is valid for the portable POSIX tar format. JThe POSIX tar format has a restriction on the length of file names. It is I unfortunately not a simple restriction like a maximum length. The exact L restriction is that either the whole path be 100 characters or less, or it L be possible to split the path on a directory separator such that the first L part is 155 characters or less and the second part 100 characters or less. portablecabal-devel@haskell.org?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. AWe typically get packages from several databases, and stack them J together. This type lets us be explicit about that stacking. For example  typical stacks include:   [GlobalPackageDB] " [GlobalPackageDB, UserPackageDB] = [GlobalPackageDB, SpecificPackageDB "package.conf.inplace"] Note that the & is invariably at the bottom since it F contains the rts, base and other special compiler-specific packages. JWe are not restricted to using just the above combinations. In particular I we can use several custom package dbs and the user package db together. ?When it comes to writing, the top most (last) package is used. 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. KReturn the package that we should register into. This is the package db at  the top of the stack. CFor the given compiler, return the extensions it does not support. GFor the given compiler, return the flags for the supported extensions. $portablecabal-devel@haskell.orgCall hc-pkg to register a package. E hc-pkg register {filename | -} [--user | --global | --package-conf] Call hc-pkg to re-register a package. E hc-pkg register {filename | -} [--user | --global | --package-conf] Call hc-pkg to unregister a package @ hc-pkg unregister [pkgid] [--user | --global | --package-conf] Call hc-pkg to expose a package. < hc-pkg expose [pkgid] [--user | --global | --package-conf] Call hc-pkg to expose a package. < hc-pkg expose [pkgid] [--user | --global | --package-conf] Call hc-pkg$ to get all the installed packages.    portablecabal-devel@haskell.org; ,The executable name; used in shell wrappers The cpu architecture name, eg i386 or x86_64 The operating system name, eg windows or linux "The compiler name and version, eg  ghc-6.6.1 The $pkgid package Id path variable, eg foo-1.0 The $version package version path variable The $pkg package name path variable The $htmldir path variable The $docdir path variable The  $datasubdir path variable The $datadir path variable The  $libsubdir path variable The $libdir path variable The $bindir path variable The $prefix path variable    ?An abstract path, posibly containing variables that need to be  substituted for to get a real . The location prefix for the copy command. )The installation directories 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 ). 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 compatibility 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 G because by default we want to support installing multiple 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. :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.      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  we  can replace  with the  and get resulting  s that still have the  in them. Doing this makes it 8 each to check which paths are relative to the $prefix. EConvert from abstract install directories to actual absolute ones by G substituting for all the variables in the abstract paths, to get real  absolute path. CCheck 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).  Convert a  to a  including any template vars. 8Convert back to a path, any remaining vars are included >The initial environment has all the static stuff but no paths 3     3     3           portablecabal-devel@haskell.org !"#$%&'()*+,-./0123456789:;<=>?@AB Flags to register and  unregister: (user package, gen-script,  in-place, verbosity) CDEFGHIJ Flags to sdist: (snapshot, verbosity) KLMNO Flags to install: (package db, verbosity) PQRSTUV Flags to copy7: (destdir, copy-prefix (backwards compat), verbosity) WXYZ[ 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. agiven compiler location bgiven hc-pkg location cEnable vanilla library d Enable profiling in the library eBuild shared library f%Enable profiling in the executables. gExtra arguments to  configure hEnable optimization. iInstalled executable prefix. jInstalled executable suffix. kInstallation paths lm#path to search for extra libraries n path to search for header files odist prefix pverbosity level q The --user/--global flag rWhich package DB to use s"Enable compiling library for GHCi tEnable -split-objs with GHC uEnable executable stripping vAdditional constraints for  dependencies wx;Flags that apply at the top level, not to any sub-command. yz{|2All flags are monoids, they come in two flavours:   list flags eg  # --ghc-option=foo --ghc-option=bar gives us all the values [foo, bar]   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. }~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"]  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~xyz{[\]^_`abcdefghijklmnopqrstuvwVWXYZOPQRSTU/0123456789:;<=>?@A$%&'()*+,-.BCDEFGHIJKLMN !"#|~} !"#!"#$%&'()%&'()*+,-.+,-./ 0123456789:;0123456789:;<=>?@A=>?@ABCDEFGHICDEFGHIJKLMNKLMNOPQRSTUPQRSTUVWXYZWXYZ[\]^_`abcdefghijklmnopqrstuvw\]^_`abcdefghijklmnopqrstuvwxyz{yz{|~}}~!portablecabal-devel@haskell.org  !"%"portablecabal-devel@haskell.org!HResolved internal and external package dependencies for this component.  The  BuildInfo4 specifies a set of build dependencies that must be K satisfied in terms of version ranges. This field fixes those dependencies G to the specific versions available on this machine for this compiler. 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. +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. ,Whether to build executables for profiling. 3Whether to build with optimization (if available). 2Whether to build libs suitable for use with GHCi. 'Use -split-objs with GHC, if available ,Whether to strip executables during install 0Prefix to be prepended to installed executables /Suffix to be appended to installed executables KExternal package dependencies for the package as a whole, the union of the  individual targetPackageDeps. AIf the package description has a library section, call the given I function with the library build info as argument. Extended version of  + that also gives corresponding build info. %Perform the action on each buildable w in the package # description. Extended version of  that also gives corresponding  build info. See  See  Q     !!#portablecabal-devel@haskell.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) =Extension for object files. For GHC and NHC the extension is "o".  Hugs uses either "o" or "obj"# depending on the used C compiler. 7Extension for dynamically linked (or shared) libraries  (typically "so" on Unix and "dll" on Windows)  $portablecabal-devel@haskell.orgFA 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 j , to obtain ( a Haskell source file for each module. Build for SDist  verbosity preprocessors to try #DFind the first extension of the file that exists, and preprocess it  if required. source directories build directory preprocess for sdist module file name  verbosity builtin suffixes possible preprocessors $%&'()*?Convenience function; get the suffixes of these preprocessors. HStandard preprocessors: GreenCard, c2hs, hsc2hs, happy, alex and cpphs. %portablecabal-devel@haskell.org&EHooks 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.  Used for ./ setup test Read the description file 3Custom 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. HHook to run after build 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  COver-ride this hook to get different behavior during registration.  #Hook to run after register command &Hook to run before unregister command COver-ride this hook to get different behavior during registration. %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. Empty  which do nothing. &     &     &#          &portablecabal-devel@haskell.org Create a source distribution. information from the tarball Information from configure  verbosity & snapshot build prefix (temp dir) (extra preprocessors (includes suffixes) *Prepare a directory tree of source files.  verbosity info from the cabal file  dist dir source tree to populate (extra preprocessors (includes suffixes) *the name of the dir created and populated APrepare a directory tree of source files for a snapshot version. K It is expected that the appropriate snapshot version has already been set & in the package description, eg using  or .  verbosity info from the cabal file  dist dir source tree to populate (extra preprocessors (includes suffixes) the resulting temp dir  Modifies a  by appending a snapshot number " corresponding to the given date.  Modifies a . 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.  verbosity info from cabal file info from configure source tree to archive name of archive to create +/Move the sources into place based on buildInfo  verbosity info from the cabal file  dist dir  TargetPrefix (extra preprocessors (includes suffixes) Exposed modules , -*The name of the tarball without extension .   'portablecabal-devel@haskell.org !/'The flags for the supported extensions "#Building a package for JHC. - Currently C source files are not supported. $ Building an executable for JHC. - Currently C source files are not supported. 01%&!"#$%&!"#$%&!"#$%&(portablecabal-devel@haskell.org'2'The flags for the supported extensions (34567KThis is a backup option for existing versions of nhc98 which do not supply K proper installed package info files for the bundled libs. Instead we look @ for the .cabal file and extract the package version from that.  We don'Et know any other details for such packages, in particular we pretend ! that they have no dependencies. 8)?FIX: For now, the target must contain a main module. Not used  ATM. Re-add later. * Building an executable for NHC. 9:+Install executables for NHC.  verbosity install location Build location Executable (prefix,suffix) ,$Install for nhc98: .hi and .a files  verbosity install location Build location '()*+,'()*,+'()*+,)portablecabal-devel@haskell.org-;<'The flags for the supported extensions .=>?@AJThis is a backup option for existing versions of Hugs which do not supply K proper installed package info files for the bundled libs. Instead we look J for the Paths_pkgname.hs file and extract the package version from that.  We don'Et know any other details for such packages, in particular we pretend ! that they have no dependencies. B/Building a package for Hugs. 0!Building an executable for Hugs. Coutput directory &library source dirs, if building exes Modules DEFGHIJKLMARead the initial part of a source file, before any Haskell code, G and return the contents of any LANGUAGE, OPTIONS and INCLUDE pragmas. NO$Strip comments from Haskell source. preserve pragmas? input source text 1Install 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>.  verbosity Library install location Program install location Executable install location "Program location on target system Build location Executable (prefix,suffix) PQ<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. -./01-./01-./01*portablecabal-devel@haskell.org2222+portablecabal-devel@haskell.org3RST333,portablecabal-devel@haskell.org4UGiven 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) V0Adjust the way we find and configure gcc and ld WXJFor GHC 6.6.x and earlier, the mapping from supported extensions to flags 5YZ[\;Get the packages from specific PackageDBs, not cumulative. ]6Build a library with GHC. 7Build an executable with GHC. ^ Filter the  -threaded$ flag when profiling as it does not  work with ghc-6.8 and older. _8<Extracts a String representing a hash of the ABI of a built > library. It can fail if the library has not yet been built. `9:abcde;Install executables for GHC.  verbosity Where to copy the files to Build location Executable (prefix,suffix) f<7Install for ghc, .hi, .a and, if --with-ghci given, .o  verbosity install location &install location for dynamic librarys Build location gOn MacOS X we have to call ranlib' to regenerate the archive index after K copying. This is because the silly MacOS X linker checks that the archive = index is not older than the file itself, which means simply  copying/ installing the file breaks it!! 456789:;< 4567<;8:9 456789:;<-portablecabal-devel@haskell.org=Install in the user's database?; verbose >?hijklm@ Construct ) for a library in a package, given a set  of installation directories. (Translate relative include dir paths to  absolute paths. A Construct & for a library that is inplace in the  build tree. :This function knows about the layout of inplace packages. top of the build tree location of the dist tree B Construct % for the final install location of a  library package. <This function knows about the layout of installed packages. Cnop=>?@ABC=C?>AB@=>?@ABC.portablecabal-devel@haskell.orgDq0Adjust the way we find and configure gcc and ld rEstu;Get the packages from specific PackageDBs, not cumulative. vFBuild a library with LHC. GBuild an executable with LHC. w Filter the  -threaded$ flag when profiling as it does not  work with ghc-6.8 and older. xyHIz{|}~JInstall executables for GHC.  verbosity Where to copy the files to Build location Executable (prefix,suffix) K7Install for ghc, .hi, .a and, if --with-ghci given, .o  verbosity install location &install location for dynamic librarys Build location 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. DEFGHIJKDEFGKJIHDEFGHIJK/portablecabal-devel@haskell.orgL5Build the libraries and executables in this package. (mostly information from the .cabal file Configuration information $Flags that the user passed to build &preprocessors to run before compiling 7Initialize a new package db file for libraries defined  internally to the package. Mdist prefix (mostly information from the .cabal file Configuration information The verbosity to use &preprocessors to run before compiling N!Generate and write out the Paths_ pkg.hs and cabal_macros.h files LMNLMNLMN0portablecabal-devel@haskell.org-the FilePath of a directory, it's a monoid under ( /) Rrecord that represents the arguments to the haddock executable, a product monoid. @path of the interface file, relative to argOutputDir, required. @package name, required. "(hide modules ?, modules to hide)  ingore export lists in modules? -(template for modules, template for symbols) optinal custom css file. @Html or Hoogle doc? required.  1(interface file, path to the html docs for links) %where to generate the documentation. page';s title, required. @prologue text, required. .additional flags to pass to ghc for haddock-2 Mto find the correct ghc, required by haddock-2. modules to process. OBperforms cpp and unlit preprocessing where needed on the files in 9 | argTargets, which must have an .hs or .lhs extension. template for html location are we using haddock-2.x ? +Call haddock with the specified arguments. P;The directory where we put build results for an executable OPOPOP1portablecabal-devel@haskell.org%QR Read the V. 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. STry to read the V. T$After running configure, output the  to the  V. U@Check that localBuildInfoFile is up-to-date with respect to the  .cabal file. V dist/ setup-configW 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. Internally defined packages Installed packages XJCurrently the user interface specifies the package dbs to use with just a  single valued option, a &. However internally we represent the  stack of 6s explictly as a list. This function converts encodes 6 the package db stack implicit in a single packagedb. YMakes a 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)) Z[\>Output package check warnings and errors. Exit if any errors. QRSTUVWXYZ[\ WTRUSVX[ZYQ\ QRSTUVWXYZ[\2portablecabal-devel@haskell.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. !information from the .cabal file $information from the configure step flags sent to copy or install 'Install the files listed in data-files -Install the files listed in install-includes ]]]3portablecabal-devel@haskell.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 ^. aA customizable version of ^ that also takes the command  line arguments. bLike ^/, but accepts the package description as input " rather than using IO to read it. 6Combine the preprocessors in the given hooks with the ! preprocessors built into cabal. c6Hooks that correspond to a plain instantiation of the  "simple" build system dBasic autoconf :   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. ehijklmnopqrstuvwxyz{|}~%     ^_`abcde/^b_     `aced%^_`abcde;<=;<>;<?;<?;@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeefghijklmnopqrstuvwxyz{|}~                                                                                          ! " # # $ % & ' ( ) ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j j k l m n o p p q r s t u vwxyzz{|}~888888888888888      !"#$%&'()*+,-./01233456789:;;<=>?@ATBCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abb`cdefghhijklmnopqrstuvwxyz{{|}~`      !"#$%&'()*+, - - . / 0 0 1 2 3 4 5 5 6 7 8 9 9 : ; < = > ? @ A B C D E E F G H I J J K L M N O P Q Q R S T U U V W X Y Z [ [ \ ] ^ _ _ ` 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 { { | } ` ~ `                                            H I    !!!"""""""""""""""""""""""""""""""#"$"'#############$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % %%&&&&&&&&''''''(((((()))))*+,,,,, ,!,",,--#-$-%-&-'-.....!."../(/)/*0+0,1-1.1/101112111314151623337383393:3;<=>?@ABCDEFGHI4J4K4L4M4N4O4P41424Q4.4R4S4T4U4V4W4X4Y4Z464[4\4]4^4_4`4a4b4c5d5e5f5g6h6i6j6k6l6m6n;op;oq7r7s7t7u7v7wxyz{|}~|;e ;      ;o;;e88888888A88888888888888888888888888888888888888888888888888888888888888888888 8     ;99999999999 9!9;9999999999999999999999999999999999:::::::::::::::::::::::::::::::# !"#$%&'();*+,-e./012233456789:;<=>?@ABCDEFGHIJKLMNNOPQRSTUVWXYZ[\]^_`aEbcdefghijklmnLopqrstuvwxyz{|}~B;       !!!!!!!!!!$$$$$$$$&&&&'''((((((((()))))))))))))))))))))))+++,,,,,,,,,,,,,,,,,,,---------................////0000000000000000000000000000000000 0 0 0 0 00000111111111111111 1!1"1#1$1%1&1'1(1)1*2+2,33-333.333333/3330313233343536378 Cabal-1.8.0.6Distribution.VersionDistribution.Compat.ReadP$Distribution.Simple.PreProcess.UnlitDistribution.ReadEDistribution.VerbosityDistribution.TextDistribution.ModuleNameDistribution.SystemLanguage.Haskell.ExtensionDistribution.LicenseDistribution.PackageDistribution.Simple.Utils!Distribution.Simple.Program.TypesDistribution.Simple.Program.RunDistribution.Simple.Program.ArDistribution.Simple.Program.Ld"Distribution.Simple.Program.Script#Distribution.Simple.Program.BuiltinDistribution.Simple.Program.DbDistribution.Simple.ProgramDistribution.Compiler%Distribution.PackageDescription.Parse!Distribution.InstalledPackageInfo Distribution.Simple.PackageIndexDistribution.Simple.CommandDistribution.PackageDescription-Distribution.PackageDescription.Configuration%Distribution.PackageDescription.CheckDistribution.Simple.Compiler!Distribution.Simple.Program.HcPkgDistribution.Simple.InstallDirsDistribution.Simple.SetupDistribution.Make"Distribution.Simple.LocalBuildInfoDistribution.Simple.BuildPathsDistribution.Simple.PreProcessDistribution.Simple.UserHooksDistribution.Simple.SrcDistDistribution.Simple.JHCDistribution.Simple.NHCDistribution.Simple.Hugs Distribution.Simple.Build.Macros%Distribution.Simple.Build.PathsModuleDistribution.Simple.GHCDistribution.Simple.RegisterDistribution.Simple.LHCDistribution.Simple.BuildDistribution.Simple.HaddockDistribution.Simple.ConfigureDistribution.Simple.InstallDistribution.SimpleDistribution.GetOptDistribution.Compat.ExceptionDistribution.Compat.TempFileDistribution.Compat.CopyFileDistribution.ParseUtilsDistribution.Simple.GHC.IPI642Distribution.Simple.GHC.IPI641base Data.Version versionTags versionBranchVersionText.ParserCombinators.ReadPReadSplainunlitReadPgetlookpfail+++<++gathersatisfycharstringmunchmunch1choice skipSpacescountbetweenoptionoptionalmanymany1skipMany skipMany1sepBysepBy1endByendBy1chainrchainlchainr1chainl1manyTill readP_to_S readS_to_PReadErunReadE succeedReadE failReadE parseReadE readEOrFail readP_to_E Verbositysilentnormalverbose deafening moreVerbose lessVerboseintToVerbosityflagToVerbosity showForCabal showForGHCTextdispparsedisplay simpleParse ModuleNamesimple fromStringmain components toFilePathPlatformArch OtherArchVaxM68kRs6000HppaAlphaS390IA64SHMipsArmSparcPPC64PPCX86_64I386OSOtherOSIRIXHPUXAIXSolarisNetBSDOpenBSDFreeBSDOSXWindowsLinuxbuildOS buildArch buildPlatform ExtensionUnknownExtensionRegularPatterns XmlSyntax ViewPatternsTransformListComp QuasiQuotesPostfixOperatorsNewQualifiedOperatorsImpredicativeTypesPackageImportsConstrainedClassMethodsDeriveDataTypeable UnboxedTuplesExtendedDefaultRulesRelaxedPolyRecNoMonoPatBindsGADTsOverloadedStringsDisambiguateRecordFields RecordPunsRecordWildCards TypeOperatorsLiberalTypeSynonymsUnliftedFFITypes UnicodeSyntaxStandaloneDeriving TypeFamilies MagicHash HereDocumentsRestrictedTypeSynonymsExtensibleRecordsGeneralizedNewtypeDeriving PatternGuardsNamedFieldPunsNoImplicitPreludeGenericsArrowsForeignFunctionInterfaceTemplateHaskellTypeSynonymInstances BangPatternsKindSignaturesCPPEmptyDataDeclsFlexibleInstancesFlexibleContextsImplicitParamsPatternSignaturesScopedTypeVariablesExistentialQuantificationPolymorphicComponents RankNTypes Rank2TypesFunctionalDependenciesNoMonomorphismRestrictionMultiParamTypeClassesParallelListComp RecursiveDoIncoherentInstancesUndecidableInstancesOverlappingInstancesdeprecatedExtensionsknownExtensionsBoundInclusiveBoundExclusiveBound UpperBound NoUpperBound LowerBoundVersionIntervalVersionIntervals VersionRangeIntersectVersionRangesUnionVersionRangesWildcardVersionEarlierVersion LaterVersion ThisVersion AnyVersion anyVersion noVersion thisVersionnotThisVersion laterVersionorLaterVersionearlierVersionorEarlierVersionunionVersionRangesintersectVersionRanges withinVersionbetweenVersionsInclusivefoldVersionRangefoldVersionRange' withinRangeasVersionIntervals isAnyVersion isNoVersionisSpecificVersionsimplifyVersionRangeversionIntervalsmkVersionIntervalswithinIntervalstoVersionIntervalsfromVersionIntervalsunionVersionIntervalsintersectVersionIntervalsLicenseUnknownLicense OtherLicenseAllRightsReserved PublicDomainMITBSD4BSD3LGPLGPL knownLicensesPackageFixedDepsdependsPackage packageId DependencyInstalledPackageIdPackageIdentifierpkgName pkgVersion PackageId PackageNamethisPackageVersionnotThisPackageVersionsimplifyDependency packageNamepackageVersionFileGlobNoGlob cabalVersioncabalBootstrappingdieWithLocationdie topHandlerwarnnotice setupMessageinfodebug chattyTrywrapTextwrapLine maybeExit rawSystemExitrawSystemStdoutrawSystemStdInOutfindProgramLocationfindProgramVersionxargsfindFilefindFileWithExtensionfindFileWithExtension'findModuleFilesfindModuleFilegetDirectoryContentsRecursive parseFileGlob matchFileGlobmatchDirFileGlobcreateDirectoryIfMissingVerbosecopyFileVerboseinstallOrdinaryFileinstallExecutableFile copyFilesinstallOrdinaryFilesinstallDirectoryContentssmartCopySourcescopyDirectoryRecursiveVerbose withTempFilewithTempDirectorywithFileContentswriteFileAtomic rewriteFile currentDirdefaultPackageDescfindPackageDescdefaultHookedPackageDescfindHookedPackageDescfromUTF8toUTF8 readUTF8FilewithUTF8FileContents writeUTF8FilenormaliseLineEndingsequating comparing isInfixOf intercalate lowercaseProgramLocation FoundOnSystem UserSpecified locationPathConfiguredProgram programIdprogramVersion programArgsprogramLocationProgArgProgram programNameprogramFindLocationprogramFindVersionprogramPostConf programPath simpleProgram IOEncodingIOEncodingUTF8IOEncodingTextProgramInvocationprogInvokePathprogInvokeArgs progInvokeEnv progInvokeCwdprogInvokeInputprogInvokeInputEncodingprogInvokeOutputEncodingemptyProgramInvocationsimpleProgramInvocationprogramInvocationrunProgramInvocationgetProgramInvocationOutputmultiStageProgramInvocationcreateArLibArchivecombineObjectFilesinvocationAsSystemScriptinvocationAsShellScriptinvocationAsBatchFilebuiltinPrograms ghcProgram ghcPkgProgram lhcProgram lhcPkgProgram nhcProgram hmakeProgram jhcProgram hugsProgramffihugsProgram happyProgram alexProgram gccProgram ranlibProgram arProgram stripProgram hsc2hsProgram c2hsProgram cpphsProgramhscolourProgramhaddockProgramgreencardProgram ldProgram tarProgram cppProgrampkgConfigProgram ProgramDbemptyProgramDbdefaultProgramDbrestoreProgramDbaddKnownProgramaddKnownProgramslookupKnownProgram knownProgramsuserSpecifyPathuserMaybeSpecifyPathuserSpecifyArgsuserSpecifyPathsuserSpecifyArgssuserSpecifiedArgs lookupProgram updateProgramconfigureProgramconfigureAllKnownProgramsreconfigureProgramsrequireProgramrequireProgramVersionProgramConfiguration runProgramgetProgramOutput runDbProgramgetDbProgramOutputrawSystemProgramrawSystemProgramStdoutrawSystemProgramConfrawSystemProgramStdoutConfemptyProgramConfigurationdefaultProgramConfigurationrestoreProgramConfigurationfindProgramOnPath CompilerIdCompilerFlavor OtherCompilerLHCJHCHeliumHBCHugsYHCNHCGHCparseCompilerFlavorCompatbuildCompilerFlavordefaultCompilerFlavor FieldDescr fieldNamefieldGetfieldSet ParseResultParseOk ParseFailedPWarningPError FromString TabsErrorNoParse AmbigousParseLineNoInstalledPackageInfoInstalledPackageInfo_installedPackageIdsourcePackageIdlicense copyright maintainerauthor stabilityhomepagepkgUrl descriptioncategoryexposedexposedModules hiddenModules importDirs libraryDirs hsLibrariesextraLibrariesextraGHCiLibraries includeDirsincludes hugsOptions ccOptions ldOptions frameworkDirs frameworkshaddockInterfaces haddockHTMLsemptyInstalledPackageInfoparseInstalledPackageInfoshowInstalledPackageInfoshowInstalledPackageInfoField SearchResult Ambiguous UnambiguousNone PackageIndexfromListmergeinsertdeleteInstalledPackageIddeleteSourcePackageIddeletePackageName allPackagesallPackagesByNamelookupInstalledPackageIdlookupSourcePackageIdlookupPackageNamelookupDependency searchByNamesearchByNameSubstringdependencyCyclesbrokenPackagesdependencyClosurereverseDependencyClosuretopologicalOrderreverseTopologicalOrderdependencyGraphdependencyInconsistenciesmoduleNameIndexCommand CommandParseCommandReadyToGo CommandErrors CommandList CommandHelp MkOptDescrArgPlaceHolderOptFlagsLFlagsSFlagsOptDescrBoolOpt ChoiceOptOptArgReqArg OptionField optionName optionDescr DescriptionNameShowOrParseArgs ParseArgsShowArgs CommandUI commandNamecommandSynopsis commandUsagecommandDescriptioncommandDefaultFlagscommandOptions multiOptionreqArgoptArgreqArg'optArg'noArgboolOptboolOpt' choiceOptchoiceOptFromEnumviewAsFieldDescr liftOptioncommandShowOptions makeCommandcommandAddAction commandsRun noExtraFlagsCondTreeCondNode condTreeDatacondTreeConstraintscondTreeComponents ConditionCAndCOrCNotLitVarConfVarImplFlagFlagAssignmentFlagNameMkFlagflagNameflagDescription flagDefault flagManualGenericPackageDescriptionpackageDescriptiongenPackageFlags condLibrarycondExecutablesRepoType OtherRepoTypeMonotoneBazaarGnuArch MercurialCVSSVNGitDarcsRepoKindRepoKindUnknownRepoThisRepoHead SourceReporepoKindrepoType repoLocation repoModule repoBranchrepoTag repoSubdirHookedBuildInfo BuildInfo buildable buildTools cppOptionspkgconfigDependscSources hsSourceDirs otherModules extensions extraLibs extraLibDirsinstallIncludesoptionsghcProfOptionsghcSharedOptionscustomFieldsBItargetBuildDepends ExecutableexeName modulePath buildInfoLibrary libExposed libBuildInfo BuildTypeUnknownBuildTypeCustomMake ConfigureSimplePackageDescriptionpackage licenseFile testedWith bugReports sourceRepossynopsiscustomFieldsPD buildDependsdescCabalVersion buildTypelibrary executables dataFilesdataDir extraSrcFiles extraTmpFilesemptyPackageDescriptionknownBuildTypes emptyLibraryhasLibswithLib libModulesemptyExecutablehasExeswithExe exeModulesemptyBuildInfo allBuildInfoemptyHookedBuildInfo hcOptionsupdatePackageDescriptionparseConditionfreeVarsfinalizePackageDescriptionflattenPackageDescriptionreadHookedBuildInforeadPackageDescriptionparsePackageDescriptionparseHookedBuildInfowritePackageDescriptionshowPackageDescriptionwriteHookedBuildInfoshowHookedBuildInfoCheckPackageContentOps doesFileExistdoesDirectoryExist PackageCheckPackageDistInexcusablePackageDistSuspiciousPackageBuildWarningPackageBuildImpossible explanation checkPackagecheckConfiguredPackagecheckPackageFilescheckPackageContentcheckPackageFileNamesOptimisationLevelMaximumOptimisationNormalOptimisationNoOptimisationPackageDBStack PackageDBSpecificPackageDB UserPackageDBGlobalPackageDBCompiler compilerIdcompilerExtensionsshowCompilerIdcompilerFlavorcompilerVersionregistrationPackageDBflagToOptimisationLevelunsupportedExtensionsextensionsToFlagsregister reregister unregisterexposehidedumpregisterInvocationreregisterInvocationunregisterInvocationexposeInvocationhideInvocationdumpInvocationPathTemplateVariableExecutableNameVarArchVarOSVar CompilerVarPkgIdVar PkgVerVar PkgNameVar HtmldirVar DocdirVar DatasubdirVar DatadirVar LibsubdirVar LibdirVar BindirVar PrefixVar PathTemplateCopyDest CopyPrefixCopyTo NoCopyDestInstallDirTemplates InstallDirsprefixbindirlibdir libsubdir dynlibdir libexecdirprogdir includedirdatadir datasubdirdocdirmandirhtmldir haddockdircombineInstallDirsdefaultInstallDirssubstituteInstallDirTemplatesabsoluteInstallDirsprefixRelativeInstallDirstoPathTemplatefromPathTemplatesubstPathTemplateinitialPathTemplateEnvpackageTemplateEnvcompilerTemplateEnvplatformTemplateEnvinstallDirsTemplateEnv TestFlags testDistPref testVerbosity BuildFlagsbuildProgramPathsbuildProgramArgs buildDistPrefbuildVerbosity CleanFlags cleanSaveConf cleanDistPrefcleanVerbosity HaddockFlagshaddockProgramPathshaddockProgramArgs haddockHooglehaddockHtmlLocationhaddockExecutableshaddockInternal haddockCsshaddockHscolourhaddockHscolourCsshaddockDistPrefhaddockVerbosity HscolourFlags hscolourCSShscolourExecutableshscolourDistPrefhscolourVerbosity RegisterFlags regPackageDB regGenScript regGenPkgConf regInPlace regDistPref regVerbosity SDistFlags sDistSnapshot sDistDistPrefsDistVerbosity InstallFlagsinstallPackageDBinstallDistPrefinstallUseWrapperinstallInPlaceinstallVerbosity CopyFlagscopyDest copyDistPref copyVerbosity ConfigFlagsconfigProgramsconfigProgramPathsconfigProgramArgsconfigHcFlavor configHcPath configHcPkgconfigVanillaLib configProfLibconfigSharedLib configProfExeconfigConfigureArgsconfigOptimizationconfigProgPrefixconfigProgSuffixconfigInstallDirsconfigScratchDirconfigExtraLibDirsconfigExtraIncludeDirsconfigDistPrefconfigVerbosityconfigUserInstallconfigPackageDB configGHCiLibconfigSplitObjsconfigStripExesconfigConstraintsconfigConfigurationsFlags GlobalFlags globalVersionglobalNumericVersionNoFlagdefaultDistPreftoFlagfromFlagfromFlagOrDefault flagToMaybe flagToListdefaultGlobalFlags globalCommandemptyGlobalFlagsdefaultConfigFlagsconfigureCommandconfigureOptionsinstallDirsOptionsemptyConfigFlagsdefaultCopyFlags copyCommandemptyCopyFlagsdefaultInstallFlagsinstallCommandemptyInstallFlagsdefaultSDistFlags sdistCommandemptySDistFlagsdefaultRegisterFlagsregisterCommandunregisterCommandemptyRegisterFlagsemptyHscolourFlagsdefaultHscolourFlagshscolourCommanddefaultHaddockFlagshaddockCommandemptyHaddockFlagsdefaultCleanFlags cleanCommandemptyCleanFlags buildVerbosedefaultBuildFlags buildCommandemptyBuildFlagsdefaultTestFlags testCommandemptyTestFlagstrueArgfalseArgoptionVerbosity configureArgs defaultMaindefaultMainArgsdefaultMainNoReadComponentLocalBuildInfocomponentPackageDepsLocalBuildInfoinstallDirTemplatescompilerbuildDir scratchDir libraryConfigexecutableConfigs installedPkgs pkgDescrFile localPkgDescr withPrograms withPackageDBwithVanillaLib withProfLib withSharedLib withProfExewithOptimization withGHCiLib splitObjs stripExes progPrefix progSuffix packageDepsexternalPackageDeps withLibLBI withExeLBIsrcPref hscolourPref haddockPrefautogenModulesDir cppHeaderNameautogenModuleName haddockName mkLibName mkProfLibNamemkSharedLibName exeExtension objExtension dllExtensionPPSuffixHandler PreProcessorplatformIndependentrunPreProcessormkSimplePreProcessorrunSimplePreProcessorpreprocessSources ppGreenCardppUnlitppCppppCpp'ppHsc2hsppC2hsppHappyppAlex ppSuffixesknownSuffixHandlers UserHooksrunTestsreadDeschookedPreProcessorshookedProgramspreConfconfHookpostConfpreBuild buildHook postBuildpreClean cleanHook postCleanpreCopycopyHookpostCopypreInstinstHookpostInstpreSDist sDistHook postSDistpreRegregHookpostRegpreUnreg unregHook postUnreg preHscolour hscolourHook postHscolour preHaddock haddockHook postHaddockArgsemptyUserHookssdist prepareTreeprepareSnapshotTreesnapshotPackagesnapshotVersiondateToSnapshotNumber createArchiveprintPackageProblems configuregetInstalledPackagesbuildLibbuildExe installLib installExeinstallgenerate libAbiHashghcVerbosityOptions ghcOptionsgenerateRegistrationInforegisterPackagegeneralInstalledPackageInfoinplaceInstalledPackageInfoabsoluteInstalledPackageInfobuildinitialBuildStepswriteAutogenFileshaddockhscolourtryGetConfigStateFilegetPersistBuildConfigmaybeGetPersistBuildConfigwritePersistBuildConfigcheckPersistBuildConfiglocalBuildInfoFileccLdOptionsBuildInfoconfigCompilerAuxconfigCompilercheckForeignDepsdefaultMainWithHooksdefaultMainWithHooksArgssimpleUserHooksdefaultUserHooksautoconfUserHooks ClassifiedCommentErrorEndCode BeginCodeLineOrdinaryBlank BirdTrackclassify unclassify reclassifyinlines internalErrorOptKindOptErr EndOfOptsNonOptUnreqOptOptArgDescrNoArgOptionArgOrder ReturnInOrderPermute RequireOrder usageInfofmtOptfmtShortfmtLonggetOptgetOpt'getNextlongOptshortOpterrAmbigerrReqerrUnrecerrNoArg onException throwIOIOcatchIO catchExitopenNewBinaryFile pathSeparator std_flags output_flagsrw_flagscreateTempDirectory mkPrivateDir System.IOopenBinaryTempFile openTempFilecopyOrdinaryFilecopyExecutableFilesetFileOrdinarysetFileExecutable setFileModecopyFileParserRPFinalResultFailLookGetfinalrunErrorMsg DeafeningVerboseNormalSilentvalidModuleCharvalidModuleComponentGHC.BaseStringClassificationStrictnessCompatStrict PermissiveknownOSs osAliases classifyOS knownArches archAliases classifyArchidentclassifyExtension Text.ReadreadextensionTablewildcardUpperBoundisWildcardRange minLowerBound isVersion0 invariantcheckInvariant validVersion validIntervalnonEmpty doesNotTouchdoesNotIntersect unionIntervalintersectIntervaldispOptVersionprintRawCommandAndArgs findFirstFiledirectory-1.0.1.2System.DirectorycreateDirectoryIfMissing buildInfoExt ignoreBOMreadFilemaxCommandLineSizeConfiguredProgsUnconfiguredProgsUnconfiguredProgramunconfiguredProgsconfiguredProgsupdateUnconfiguredProgsupdateConfiguredProgsuserSpecifiedPathconfigurePrograms Control.MonadfoldMknownCompilerFlavorsclassifyCompilerFlavor Data.MaybeNothing SyntaxTreeHasTabsIndentToken CloseBracket OpenBracketSpanFieldIfBlockSectionFUnrecFieldParser UTFWarning showPWarningcatchParseError parseFailrunPrunE utf8WarningslocatedErrorMsg syntaxError tabsErrorwarningfield liftField simpleFieldcommaListFieldspaceListField listField optsField boolFieldppFieldsppField showFieldsshowSingleNamedField parseFields warnUnrec ignoreUnreclineNofName readFields trimLines tokeniseLine trimLeading trimTrailingmkTreelayoutbracesmkFieldifelseparseModuleNameQparseFilePathQparseBuildToolparseBuildToolNameQparseBuildToolNameparsePkgconfigDependencyparsePackageNameQparseVersionRangeQparseOptVersionparseTestedWithQ parseLicenseQparseExtensionQparseHaskellString parseTokenQ parseTokenQ' parseSepListparseSpaceListparseCommaListparseOptCommaList parseQuoted parseFreeText showFilePath showTokenshowTestedWith showFreeText all_fieldsbasicFieldDescrsinstalledFieldDescrsmkPackageIndex Data.MonoidmappendGHC.ReadReadconvertPackageIdmkInstalledPackageIdconvertModuleNameconvertLicense toCurrent CommonFlagListOptionsFlagHelpFlagcommandGetOpts viewAsGetOptgetChoiceByLongFlaggetCurrentChoice liftOptDescrliftSetcommandListOptions commandHelp commonFlagsaddCommonFlagscommandParseArgsghc-primGHC.BoolBool maybeHasLibsMaybeknownRepoTypesrepoTypeAliasesclassifyRepoTypePDTaggedPDNullExeLib TargetSet DependencyMapunDependencyMapBTBTBBTN DepTestRslt MissingDepsDepOksimplifyConditionsimplifyWithSysParams mapCondTreemapTreeConstrs mapTreeConds mapTreeDataresolveWithFlagstoDepMap fromDepMapsimplifyCondTreeignoreConditionsoverallDependencies constrainByflattenTaggedTargetslibFillInDefaultsexeFillInDefaultsbiFillInDefaultsbugPMStTrunStTpkgDescrFieldDescrsstoreXFieldsPDlibFieldDescrsstoreXFieldsLibexecutableFieldDescrsstoreXFieldsExebinfoFieldDescrsstoreXFieldsBIflagFieldDescrssourceRepoFieldDescrsreadAndParseFilestanzasisStanzaHeadermapSimpleFieldsconstraintFieldNamesparseConstraint libFieldNamesbuildInfoNamesmodifyliftevalStT peekField skipField parseFielddeprecatedFieldsdeprecatedFieldsPkgDescrdeprecatedFieldsBuildInfo deprecFieldppCustomFields ppCustomFieldfindIndentTabscheck checkSanity checkLibrarycheckExecutable checkFields checkLicensecheckSourceReposcheckGhcOptionscheckCCOptionscheckAlternatives checkPathscheckCabalVersioncheckPackageVersionscheckConditionalscheckLicenseExistscheckSetupExistscheckConfigureExistscheckLocalPathsExistcheckWindowsPath checkTarPathquotecommaSepextensionToFlagsetInstalledPackageIdregisterInvocation' packageDbOpts verbosityOptsPathTemplateEnv PathComponentVariableGHC.IOFilePath appendSubdirscombinePathTemplategetWindowsProgramFilesDirprogramFlagsDescriptionprogramConfigurationPathsprogramConfigurationOptions reqArgFlagoptionDistPref splitArgsdefaultMainHelperconfigureAction copyAction installAction haddockAction buildAction cleanAction sdistActionregisterActionunregisterActionpreprocessFileppGhcCppppCpphs use_optP_P getCppOptions hcDefines versionInt standardPP prepareDir copyFileTo tarBallNamemapAllBuildInfojhcLanguageExtensionsconstructJHCCmdLine jhcPkgConfnhcLanguageExtensionspackageDbPathsgetPackageDbDirsgetInstalledPackagegetFullInstalledPackageInfogetPhonyInstalledPackageInfonhcVerbosityOptionsgetModulePaths getVersionhugsLanguageExtensionscompileBuildInfosuffixes copyModule compileFilestestFFI compileFFI includeOpts getCFilessymbolswithHaskellFilegetOptionsFromSource takeWhileJust stripCommentshugsInstallSuffixeshugsMainFilenameget_prefix_win32get_prefix_hugsfilename_stuffguessGhcPkgFromGhcPathconfigureToolchaingetLanguageExtensionsoldLanguageExtensions ghcLibDir'checkPackageDbStackremoveMingwIncludeDirgetInstalledPackages' substTopDirhackThreadedFlaggetHaskellObjectsconstructGHCCmdLineghcPackageFlagsghcPackageDbOptionsconstructCcCmdLine ghcCcOptions mkGHCiLibNamestripExeupdateLibArchiveregisterPackage'registerPackageGHCregisterPackageLHCregisterPackageHugswriteHcPkgRegisterScriptregScriptFileNameunregScriptFileNameinplacePackageIdcreateInternalPackageDBOutputHoogleHtmlTemplate DirectoryDirunDir' HaddockArgsargInterfaceFileargPackageNameargHideModulesargIgnoreExports argLinkSource argCssFile argVerbose argOutput argInterfaces argOutputDirargTitle argPrologue argGhcFlags argGhcLibDir argTargetsunDirprepareSources fromFlagsfromPackageDescription fromLibraryfromExecutable getInterfaces getGhcLibDir runHaddock renderArgsrenderPureArgshaddockPackageFlags hscolour'haddockToHscolourgetLibSourceFilesgetExeSourceFilesgetSourceFiles exeBuildDir ghcLibDirFailedDependencyDependencyNoVersionDependencyNotExistsResolvedDependencyInternalDependencyExternalDependencytryGetPersistBuildConfig showHeadercurrentCabalIdcurrentCompilerId parseHeaderinventBogusPackageInfo reportProgram hackageUrlselectDependencyreportSelectedDependenciesreportFailedDependenciesimplicitPackageDbStack!newPackageDepsBehaviourMinVersionnewPackageDepsBehaviourconfigureRequiredProgramsconfigureRequiredProgramconfigurePkgconfigPackagescheckPackageProblemsinstallDataFilesinstallIncludeFilesallSuffixHandlershscolourAction testAction hookedActiongetBuildConfigcleanrunConfigureScriptgetHookedBuildInfodefaultInstallHookdefaultBuildHookdefaultRegHook