Changes between Version 13 and Version 14 of SourceGuide
- Timestamp:
- 07/26/10 18:52:50 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SourceGuide
v13 v14 28 28 == Declarative modules == 29 29 30 === A few really dull modules ===30 === Really dull modules === 31 31 32 32 `Distribution/GetOpt.hs` ([http://darcs.haskell.org/cabal/Distribution/GetOpt.hs source]) (no docs - hidden module):: 33 33 This should live under Compat/ it's just a bundled version of the standard !GetOpt. Not very interesting. 34 34 35 `Distribution/Setup.hs` ([http://darcs.haskell.org/cabal/Distribution/Setup.hs source]) ([http://www.haskell.org/cabal/release/devel/doc/API/Cabal/Distribution-Setup.html docs])::36 This is a deprecated module here just so that old `Setup.hs` scripts do not break. Ignore it.37 38 `Distribution/Extension.hs` ([http://darcs.haskell.org/cabal/Distribution/Extension.hs source]) ([http://www.haskell.org/cabal/release/devel/doc/API/Cabal/Distribution-Extension.html docs])::39 This is also a deprecated module here just so that old code does not break. The module got renamed to `Language.Haskell.Extension`.40 41 35 === Some simple data types === 42 36 43 `Distribution/Version.hs` ([http://darcs.haskell.org/cabal/Distribution/Version.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Version.html docs])::37 `Distribution/Version.hs` ([http://darcs.haskell.org/cabal/Distribution/Version.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Version.html docs]):: 44 38 exports the `Version` type along with a parser and pretty printer. A version is something like "1.3.3". It also defines `VersionRange`s and 45 39 `Dependency` data types. Version ranges are like ">= 1.2 && < 2". A dependency is a package name and a version range, like "foo >= 1.2 && < 2". 46 40 47 `Distribution/Package.hs` ([http://darcs.haskell.org/cabal/Distribution/Package.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Package.html docs])::41 `Distribution/Package.hs` ([http://darcs.haskell.org/cabal/Distribution/Package.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Package.html docs]):: 48 42 defines a package identifier along with a parser and pretty printer for it. `PackageIdentifier`s consist of a name and an exact version 49 43 (exact version as opposed to a dependency like above that uses a version range). 50 44 51 `Distribution/Verbosity.hs` ([http://darcs.haskell.org/cabal/Distribution/Verbosity.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Verbosity.html docs])::45 `Distribution/Verbosity.hs` ([http://darcs.haskell.org/cabal/Distribution/Verbosity.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Verbosity.html docs]):: 52 46 a simple `Verbosity` type with associated utilities. There are 4 standard verbosity levels from `Silent`, `Normal`, `Verbose` up to `Deafening`. 53 47 This is used for deciding what logging messages to print in the active parts. 54 48 55 `Distribution/Compiler.hs` ([http://darcs.haskell.org/cabal/Distribution/Compiler.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Compiler.html docs])::49 `Distribution/Compiler.hs` ([http://darcs.haskell.org/cabal/Distribution/Compiler.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Compiler.html docs]):: 56 50 This has an enumeration of the various compilers that Cabal knows about. It also specifies the default compiler. Sadly you'll often see code 57 51 that does case analysis on this compiler flavour enumeration like: … … 66 60 moment we just have to live with this deficiency. If you're interested, see ticket #50. 67 61 68 `Distribution/System.hs` ([http://darcs.haskell.org/cabal/Distribution/System.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-System.html docs])::62 `Distribution/System.hs` ([http://darcs.haskell.org/cabal/Distribution/System.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-System.html docs]):: 69 63 Cabal often needs to do slightly different things on specific platforms. You probably know about the `System.Info.os :: String` however using 70 64 that is very inconvenient because it is a string and different Haskell implementations do not agree on using the same strings for the same … … 72 66 enumeration. 73 67 74 `Distribution/License.hs` ([http://darcs.haskell.org/cabal/Distribution/License.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-License.html docs])::68 `Distribution/License.hs` ([http://darcs.haskell.org/cabal/Distribution/License.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-License.html docs]):: 75 69 The `.cabal` file allows you to specify a license file. Of course you can use any license you like but people often pick common open source 76 70 licenses and it's useful if we can automatically recognise that (eg so we can display it on the hackage web pages). So you can also specify the … … 84 78 also little parsers for many of the formats we get in various `.cabal` file fields, like module names, comma separated lists etc. 85 79 86 `Distribution/PackageDescription.hs` ([http://darcs.haskell.org/cabal/Distribution/PackageDescription.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-PackageDescription.html docs])::80 `Distribution/PackageDescription.hs` ([http://darcs.haskell.org/cabal/Distribution/PackageDescription.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-PackageDescription.html docs]):: 87 81 This defines the data structure for the `.cabal` file format. There are several parts to this structure. It has top level 88 82 info and then `Library` and `Executable` sections each of which have associated `BuildInfo` data that's used to build the … … 94 88 simpler. 95 89 96 `Distribution/PackageDescription/Configuration.hs` ([http://darcs.haskell.org/cabal/Distribution/PackageDescription/Configuration.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-PackageDescription-Configuration.html docs])::90 `Distribution/PackageDescription/Configuration.hs` ([http://darcs.haskell.org/cabal/Distribution/PackageDescription/Configuration.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-PackageDescription-Configuration.html docs]):: 97 91 This is about the [CabalConfigurations cabal configurations] feature. It exports `finalizePackageDescription` and 98 92 `flattenPackageDescription` which are functions for converting `GenericPackageDescription`s down to 99 93 `PackageDescription`s. It has code for working with the tree of conditions and resolving or flattening conditions. 100 94 101 `Distribution/PackageDescription/Parse.hs` ([http://darcs.haskell.org/cabal/Distribution/PackageDescription/Parse.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-PackageDescription.html docs])::95 `Distribution/PackageDescription/Parse.hs` ([http://darcs.haskell.org/cabal/Distribution/PackageDescription/Parse.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-PackageDescription.html docs]):: 102 96 This defined parsers and partial pretty printers for the .cabal format. Some of the complexity in this module 103 97 is due to the fact that we have to be backwards compatible with old `.cabal` files, so there's code to 104 98 translate into the newer structure. 105 99 106 `Distribution/PackageDescription/Check.hs` ([http://darcs.haskell.org/cabal/Distribution/PackageDescription/Check.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-PackageDescription-Check.html docs])::100 `Distribution/PackageDescription/Check.hs` ([http://darcs.haskell.org/cabal/Distribution/PackageDescription/Check.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-PackageDescription-Check.html docs]):: 107 101 This has code for checking for various problems in packages. There is one set of checks that just looks at a 108 102 `PackageDescription` in isolation and another set of checks that also looks at files in the package. Some of … … 114 108 higher standard than packages that are only ever expected to be used on the author's own environment. 115 109 116 `Distribution/InstalledPackageInfo.hs` ([http://darcs.haskell.org/cabal/Distribution/InstalledPackageInfo.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-InstalledPackageInfo.html docs])::110 `Distribution/InstalledPackageInfo.hs` ([http://darcs.haskell.org/cabal/Distribution/InstalledPackageInfo.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-InstalledPackageInfo.html docs]):: 117 111 The `.cabal` file format is for describing a package that is not yet installed. It has a lot of flexibility like conditionals and dependency 118 112 ranges. As such that format is not at all suitable for describing a package that has already been built and installed. By the time we get to … … 126 120 === Useful internal abstractions === 127 121 128 `Distribution/Simple/Program.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Program.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Program.html docs])::122 `Distribution/Simple/Program.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Program.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Program.html docs]):: 129 123 This provides an abstraction which deals with configuring and running programs. A `Program` is a static notion of a known program. 130 124 A `ConfiguredProgram` is a `Program` that has been found on the current machine and is ready to be run (possibly with some user-supplied … … 135 129 The module also defines all the known built-in `Program`s and the `defaultProgramConfiguration` which contains them all. 136 130 137 `Distribution/Simple/Command.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Command.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Command.html docs])::131 `Distribution/Simple/Command.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Command.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Command.html docs]):: 138 132 This is to do with command line handling. The Cabal command line is organised into a number of named sub-commands (much like darcs). 139 133 The `Command` abstraction represents one of these sub-commands, with a name, description, a set of flags. `Command`s can be associated with … … 141 135 other tools make derived commands. This feature is used heavily in CabalInstall. 142 136 143 `Distribution/Simple/InstallDirs.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/InstallDirs.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-InstallDirs.html docs])::137 `Distribution/Simple/InstallDirs.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/InstallDirs.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-InstallDirs.html docs]):: 144 138 This manages everything to do with where files get installed (though does not get involved with actually doing any installation). It provides an 145 139 `InstallDirs` type which is a set of directories for where to install things. It also handles the fact that we use templates in these install … … 147 141 So it provides a `PathTemplate` type and functions for substituting for these templates. 148 142 149 `Distribution/Simple/Compiler.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Compiler.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Compiler.html docs])::143 `Distribution/Simple/Compiler.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Compiler.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Compiler.html docs]):: 150 144 This should be a much more sophisticated abstraction than it is. Currently it's just a bit of data about the compiler, like it's flavour 151 145 and name and version. The reason it's just data is because currently it has to be in `Read` and `Show` so it can be saved along with the … … 155 149 this latter feature very much. 156 150 157 `Distribution/Simple/PreProcess.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/PreProcess.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-PreProcesshtml docs])::151 `Distribution/Simple/PreProcess.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/PreProcess.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-PreProcesshtml docs]):: 158 152 This defines a `PreProcessor` abstraction which represents a pre-processor that can transform one kind of file into another. 159 153 There is also a `PPSuffixHandler` which is a combination of a file extension and a function for configuring a `PreProcessor`. It defines a … … 162 156 be, it could really do with a rewrite to address some of the problems we have with pre-processors. 163 157 164 `Distribution/Simple/Utils.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Utils.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Utils.html docs])::158 `Distribution/Simple/Utils.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Utils.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Utils.html docs]):: 165 159 A large and somewhat miscellaneous collection of utility functions used throughout the rest of the Cabal lib and in other tools that use the 166 160 Cabal lib like CabalInstall. It has a very simple set of logging actions. It has low level functions for running programs, a bunch of wrappers 167 161 for various directory and file functions that do extra logging. 168 162 169 `Distribution/Simple/LocalBuildInfo.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/LocalBuildInfo.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-LocalBuildInfo.html docs])::163 `Distribution/Simple/LocalBuildInfo.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/LocalBuildInfo.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-LocalBuildInfo.html docs]):: 170 164 Once a package has been configured we have resolved conditionals and dependencies, configured the compiler and other needed external programs. 171 165 The `LocalBuildInfo` is used to hold all this information. It holds the install dirs, the compiler, the exact package dependencies, the … … 175 169 === Particular phases or actions within the build process === 176 170 177 `Distribution/Simple/Configure.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Configure.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Configure.html docs])::171 `Distribution/Simple/Configure.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Configure.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Configure.html docs]):: 178 172 This deals with the ''configure'' phase. It provides the `configure` action which is given the package description and configure flags. It then 179 173 tries to: … … 187 181 the amount of information displayed depending on the verbosity level. 188 182 189 `Distribution/Simple/Build.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Build.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Build.html docs])::183 `Distribution/Simple/Build.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Build.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Build.html docs]):: 190 184 This is the entry point to actually building the modules in a package. It doesn't actually do much itself, most of the work is delegated 191 185 to compiler-specific actions. It does do some non-compiler specific bits like running pre-processors. There's some stuff to do with generating … … 197 191 module. 198 192 199 `Distribution/Simple/Install.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Install.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Install.html docs])::193 `Distribution/Simple/Install.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Install.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Install.html docs]):: 200 194 This is the entry point into installing a built package. It does the generic bits and then calls compiler-specific functions to do 201 195 the rest. 202 196 203 `Distribution/Simple/Haddock.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Haddock.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Haddock.html docs])::197 `Distribution/Simple/Haddock.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Haddock.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Haddock.html docs]):: 204 198 This module deals with the haddock and hscolour commands. Sadly this is a rather complicated module. It deals with two versions 205 199 of haddock (0.x and 2.x). It has to do pre-processing for haddock 0.x which involves 'unlit'ing and using -D__HADDOCK__ for any … … 207 201 links. The hscolour support allows generating html versions of the original source, with coloured syntax highlighting. 208 202 209 `Distribution/Simple/Register.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Register.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Register.html docs])::203 `Distribution/Simple/Register.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Register.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Register.html docs]):: 210 204 This module deals with registering and unregistering packages. There are a couple ways it can do this, one is to do it directly. 211 205 Another is to generate a script that can be run later to do it. The idea here being that the user is shielded from the details of … … 217 211 unsatisfactory. The script generation and the unregister feature are not well used or tested. 218 212 219 `Distribution/Simple/SrcDist.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/SrcDist.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-SrcDist.html docs])::213 `Distribution/Simple/SrcDist.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/SrcDist.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-SrcDist.html docs]):: 220 214 This handles the `sdist` command. The module exports an `sdist` action but also some of the phases that make it up so that other 221 215 tools can use just the bits they need. In particular the preparation of the tree of files to go into the source tarball is separated … … 226 220 === Compiler-specific modules === 227 221 228 `Distribution/Simple/GHC.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/GHC.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-GHC.html docs])::222 `Distribution/Simple/GHC.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/GHC.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-GHC.html docs]):: 229 223 This is a fairly large module. It contains most of the GHC-specific code for configuring, building and installing packages. It also 230 224 exports a function for finding out what packages are already installed. Configuring involves finding the `ghc` and `ghc-pkg` … … 239 233 and thus what search dirs are used for various kinds of files. 240 234 241 `Distribution/Simple/Hugs.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Hugs.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Hugs.html docs])::242 243 `Distribution/Simple/ JHC.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/JHC.hs source]) ([http://www.haskell.org/cabal/release/devel/doc/API/Cabal/Distribution-Simple-JHC.html docs])::244 245 `Distribution/Simple/ NHC.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/NHC.hs source]) ([http://www.haskell.org/cabal/release/devel/doc/API/Cabal/Distribution-Simple-NHC.html docs])::235 `Distribution/Simple/Hugs.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Hugs.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Hugs.html docs]):: 236 237 `Distribution/Simple/NHC.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/NHC.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-NHC.html docs]):: 238 239 `Distribution/Simple/UHC.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/UHC.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-UHC.html docs]):: 246 240 247 241 === Stuff related to the front end === 248 242 249 `Distribution/Simple/UserHooks.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/UserHooks.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-UserHooks.html docs])::243 `Distribution/Simple/UserHooks.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/UserHooks.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-UserHooks.html docs]):: 250 244 This defines the API that `Setup.hs` scripts can use to customise the way the build works. This module just defines the `UserHooks` 251 245 type. The predefined sets of hooks that implement the `Simple`, `Make` and `Configure` build systems are defined in … … 257 251 corresponding hook. At some point it will have to be replaced. 258 252 259 `Distribution/Simple/Setup.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Setup.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-Setup.html docs])::253 `Distribution/Simple/Setup.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/Setup.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-Setup.html docs]):: 260 254 This is a big module, but not very complicated. The code is very regular and repetitive. It defines the command line interface 261 255 for all the Cabal commands. For each command (like `configure`, `build` etc) it defines a type that holds all the flags, the … … 266 260 for managing sets of fields that can be read and written from files. This would allow us to save configure flags in config files. 267 261 268 `Distribution/Simple/SetupWrapper.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/SetupWrapper.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple-SetupWrapper.html docs])::262 `Distribution/Simple/SetupWrapper.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple/SetupWrapper.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple-SetupWrapper.html docs]):: 269 263 This is a wrapper around calling `Setup.hs` scripts. It is slightly more cunning than just calling `runghc Setup.hs args...`. 270 264 First of all, it checks the `.cabal` file and sees if it specifies any particular version of Cabal. It also checks the `build-type`. … … 275 269 ghc. Nothing in the Cabal lib uses this module, it is provided for `cabal-install`. 276 270 277 `Distribution/Simple.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Simple.html docs])::271 `Distribution/Simple.hs` ([http://darcs.haskell.org/cabal/Distribution/Simple.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple.html docs]):: 278 272 This is the command line front end to the `Simple` build system. The original idea was that there could be different build systems 279 273 that all presented the same compatible command line interfaces. There is still a `Make` system (see below) but in practice no … … 282 276 scripts can extend to add their own behaviour. 283 277 284 `Distribution/Make.hs` ([http://darcs.haskell.org/cabal/Distribution/Make.hs source]) ([http://www.haskell.org/cabal/release/ devel/doc/API/Cabal/Distribution-Make.html docs])::278 `Distribution/Make.hs` ([http://darcs.haskell.org/cabal/Distribution/Make.hs source]) ([http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Make.html docs]):: 285 279 This is an alternative build system that delegates everything to the `make` program. All the commands just end up calling `make` with 286 280 appropriate arguments. The intention was to allow preexisting packages that used makefiles to be wrapped into Cabal packages. In
