Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 040b01fd062be0d3984f68287bae0bc8 > files > 157

ghc-Cabal-devel-1.8.0.6-8.6.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Distribution.Simple.InstallDirs</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Distribution-Simple-InstallDirs.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>Cabal-1.8.0.6: A framework for packaging Haskell software</TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Distribution.Simple.InstallDirs</FONT
></TD
><TD ALIGN="right"
><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="infohead"
>Portability</TD
><TD CLASS="infoval"
>portable</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>cabal-devel@haskell.org</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>This manages everything to do with where files get installed (though does
 not get involved with actually doing any installation). It provides an
 <TT
><A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
></TT
> type which is a set of directories for where to install
 things. It also handles the fact that we use templates in these install
 dirs. For example most install dirs are relative to some <TT
>$prefix</TT
> and by
 changing the prefix all other dirs still end up changed appropriately. So it
 provides a <TT
><A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TT
> type and functions for substituting for these
 templates.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3AInstallDirs"
>InstallDirs</A
> dir = <A HREF="#v%3AInstallDirs"
>InstallDirs</A
> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="recfield"
><A HREF="#v%3Aprefix"
>prefix</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Abindir"
>bindir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Alibdir"
>libdir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Alibsubdir"
>libsubdir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Adynlibdir"
>dynlibdir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Alibexecdir"
>libexecdir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Aprogdir"
>progdir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Aincludedir"
>includedir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Adatadir"
>datadir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Adatasubdir"
>datasubdir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Adocdir"
>docdir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Amandir"
>mandir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Ahtmldir"
>htmldir</A
> :: dir</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Ahaddockdir"
>haddockdir</A
> :: dir</TD
></TR
></TABLE
>}</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3AInstallDirTemplates"
>InstallDirTemplates</A
> = <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdefaultInstallDirs"
>defaultInstallDirs</A
> :: <A HREF="Distribution-Compiler.html#t%3ACompilerFlavor"
>CompilerFlavor</A
> -&gt; <A HREF="../base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="../base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirTemplates"
>InstallDirTemplates</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcombineInstallDirs"
>combineInstallDirs</A
> ::  (a -&gt; b -&gt; c) -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> a -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> b -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> c</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AabsoluteInstallDirs"
>absoluteInstallDirs</A
> :: <A HREF="Distribution-Package.html#t%3APackageIdentifier"
>PackageIdentifier</A
> -&gt; <A HREF="Distribution-Compiler.html#t%3ACompilerId"
>CompilerId</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3ACopyDest"
>CopyDest</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3ACopyDest"
>CopyDest</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3ANoCopyDest"
>NoCopyDest</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ACopyTo"
>CopyTo</A
> <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ACopyPrefix"
>CopyPrefix</A
> <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AprefixRelativeInstallDirs"
>prefixRelativeInstallDirs</A
> :: <A HREF="Distribution-Package.html#t%3APackageIdentifier"
>PackageIdentifier</A
> -&gt; <A HREF="Distribution-Compiler.html#t%3ACompilerId"
>CompilerId</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirTemplates"
>InstallDirTemplates</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> (<A HREF="../base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsubstituteInstallDirTemplates"
>substituteInstallDirTemplates</A
> :: PathTemplateEnv -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirTemplates"
>InstallDirTemplates</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirTemplates"
>InstallDirTemplates</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3APathTemplate"
>PathTemplate</A
> </TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3APathTemplateVariable"
>PathTemplateVariable</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3APrefixVar"
>PrefixVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ABindirVar"
>BindirVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ALibdirVar"
>LibdirVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ALibsubdirVar"
>LibsubdirVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ADatadirVar"
>DatadirVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ADatasubdirVar"
>DatasubdirVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ADocdirVar"
>DocdirVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AHtmldirVar"
>HtmldirVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3APkgNameVar"
>PkgNameVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3APkgVerVar"
>PkgVerVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3APkgIdVar"
>PkgIdVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ACompilerVar"
>CompilerVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AOSVar"
>OSVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AArchVar"
>ArchVar</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AExecutableNameVar"
>ExecutableNameVar</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtoPathTemplate"
>toPathTemplate</A
> :: <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfromPathTemplate"
>fromPathTemplate</A
> :: <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
> -&gt; <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsubstPathTemplate"
>substPathTemplate</A
> :: PathTemplateEnv -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AinitialPathTemplateEnv"
>initialPathTemplateEnv</A
> :: <A HREF="Distribution-Package.html#t%3APackageIdentifier"
>PackageIdentifier</A
> -&gt; <A HREF="Distribution-Compiler.html#t%3ACompilerId"
>CompilerId</A
> -&gt; PathTemplateEnv</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AplatformTemplateEnv"
>platformTemplateEnv</A
> :: <A HREF="Distribution-System.html#t%3APlatform"
>Platform</A
> -&gt; PathTemplateEnv</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcompilerTemplateEnv"
>compilerTemplateEnv</A
> :: <A HREF="Distribution-Compiler.html#t%3ACompilerId"
>CompilerId</A
> -&gt; PathTemplateEnv</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApackageTemplateEnv"
>packageTemplateEnv</A
> :: <A HREF="Distribution-Package.html#t%3APackageIdentifier"
>PackageIdentifier</A
> -&gt; PathTemplateEnv</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AinstallDirsTemplateEnv"
>installDirsTemplateEnv</A
> :: <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
> -&gt; PathTemplateEnv</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:InstallDirs"
><A NAME="t%3AInstallDirs"
></A
></A
><B
>InstallDirs</B
> dir </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
><P
>The directories where we will install files for packages.
</P
><P
>We have several different directories for different types of files since
 many systems have conventions whereby different types of files in a package
 are installed in different direcotries. This is particularly the case on
 unix style systems.
</P
></TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:InstallDirs"
><A NAME="v%3AInstallDirs"
></A
></A
><B
>InstallDirs</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="body" COLSPAN="2"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:prefix"
><A NAME="v%3Aprefix"
></A
></A
><B
>prefix</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:bindir"
><A NAME="v%3Abindir"
></A
></A
><B
>bindir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:libdir"
><A NAME="v%3Alibdir"
></A
></A
><B
>libdir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:libsubdir"
><A NAME="v%3Alibsubdir"
></A
></A
><B
>libsubdir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:dynlibdir"
><A NAME="v%3Adynlibdir"
></A
></A
><B
>dynlibdir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:libexecdir"
><A NAME="v%3Alibexecdir"
></A
></A
><B
>libexecdir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:progdir"
><A NAME="v%3Aprogdir"
></A
></A
><B
>progdir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:includedir"
><A NAME="v%3Aincludedir"
></A
></A
><B
>includedir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:datadir"
><A NAME="v%3Adatadir"
></A
></A
><B
>datadir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:datasubdir"
><A NAME="v%3Adatasubdir"
></A
></A
><B
>datasubdir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:docdir"
><A NAME="v%3Adocdir"
></A
></A
><B
>docdir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:mandir"
><A NAME="v%3Amandir"
></A
></A
><B
>mandir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:htmldir"
><A NAME="v%3Ahtmldir"
></A
></A
><B
>htmldir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:haddockdir"
><A NAME="v%3Ahaddockdir"
></A
></A
><B
>haddockdir</B
> :: dir</TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:InstallDirs')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:InstallDirs" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Control-Monad.html#t%3AFunctor"
>Functor</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Text-Read.html#t%3ARead"
>Read</A
> dir =&gt; <A HREF="../base-4.2.0.2/Text-Read.html#t%3ARead"
>Read</A
> (<A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> dir)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> dir =&gt; <A HREF="../base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> (<A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> dir)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Data-Monoid.html#t%3AMonoid"
>Monoid</A
> dir =&gt; <A HREF="../base-4.2.0.2/Data-Monoid.html#t%3AMonoid"
>Monoid</A
> (<A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> dir)</TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t:InstallDirTemplates"
><A NAME="t%3AInstallDirTemplates"
></A
></A
><B
>InstallDirTemplates</B
> = <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>The installation directories in terms of <TT
><A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TT
>s that contain
 variables.
</P
><P
>The defaults for most of the directories are relative to each other, in
 particular they are all relative to a single prefix. This makes it
 convenient for the user to override the default installation directory
 by only having to specify --prefix=... rather than overriding each
 individually. This is done by allowing $-style variables in the dirs.
 These are expanded by textual substituion (see <TT
><A HREF="Distribution-Simple-InstallDirs.html#v%3AsubstPathTemplate"
>substPathTemplate</A
></TT
>).
</P
><P
>A few of these installation directories are split into two components, the
 dir and subdir. The full installation path is formed by combining the two
 together with <TT
>/</TT
>. The reason for this is compatibility with other unix
 build systems which also support <TT
>--libdir</TT
> and <TT
>--datadir</TT
>. We would like
 users to be able to configure <TT
>--libdir=/usr/lib64</TT
> for example but
 because by default we want to support installing multiple versions of
 packages and building the same package for multiple compilers we append the
 libsubdir to get: <TT
>/usr/lib64/$pkgid/$compiler</TT
>.
</P
><P
>An additional complication is the need to support relocatable packages on
 systems which support such things, like Windows.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:defaultInstallDirs"
><A NAME="v%3AdefaultInstallDirs"
></A
></A
><B
>defaultInstallDirs</B
> :: <A HREF="Distribution-Compiler.html#t%3ACompilerFlavor"
>CompilerFlavor</A
> -&gt; <A HREF="../base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="../base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirTemplates"
>InstallDirTemplates</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:combineInstallDirs"
><A NAME="v%3AcombineInstallDirs"
></A
></A
><B
>combineInstallDirs</B
> ::  (a -&gt; b -&gt; c) -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> a -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> b -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> c</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:absoluteInstallDirs"
><A NAME="v%3AabsoluteInstallDirs"
></A
></A
><B
>absoluteInstallDirs</B
> :: <A HREF="Distribution-Package.html#t%3APackageIdentifier"
>PackageIdentifier</A
> -&gt; <A HREF="Distribution-Compiler.html#t%3ACompilerId"
>CompilerId</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3ACopyDest"
>CopyDest</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
></TR
><TR
><TD CLASS="doc"
>Convert from abstract install directories to actual absolute ones by
 substituting for all the variables in the abstract paths, to get real
 absolute path.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:CopyDest"
><A NAME="t%3ACopyDest"
></A
></A
><B
>CopyDest</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>The location prefix for the <EM
>copy</EM
> command.
</TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:NoCopyDest"
><A NAME="v%3ANoCopyDest"
></A
></A
><B
>NoCopyDest</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:CopyTo"
><A NAME="v%3ACopyTo"
></A
></A
><B
>CopyTo</B
> <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:CopyPrefix"
><A NAME="v%3ACopyPrefix"
></A
></A
><B
>CopyPrefix</B
> <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:CopyDest')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:CopyDest" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Data-Eq.html#t%3AEq"
>Eq</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3ACopyDest"
>CopyDest</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3ACopyDest"
>CopyDest</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:prefixRelativeInstallDirs"
><A NAME="v%3AprefixRelativeInstallDirs"
></A
></A
><B
>prefixRelativeInstallDirs</B
> :: <A HREF="Distribution-Package.html#t%3APackageIdentifier"
>PackageIdentifier</A
> -&gt; <A HREF="Distribution-Compiler.html#t%3ACompilerId"
>CompilerId</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirTemplates"
>InstallDirTemplates</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> (<A HREF="../base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
>)</TD
></TR
><TR
><TD CLASS="doc"
><P
>Check which of the paths are relative to the installation $prefix.
</P
><P
>If 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 &quot;prefix
 independent&quot; package).
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:substituteInstallDirTemplates"
><A NAME="v%3AsubstituteInstallDirTemplates"
></A
></A
><B
>substituteInstallDirTemplates</B
> :: PathTemplateEnv -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirTemplates"
>InstallDirTemplates</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirTemplates"
>InstallDirTemplates</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Substitute the install dir templates into each other.
</P
><P
>To prevent cyclic substitutions, only some variables are allowed in
 particular dir templates. If out of scope vars are present, they are not
 substituted for. Checking for any remaining unsubstituted vars can be done
 as a subsequent operation.
</P
><P
>The reason it is done this way is so that in <TT
><A HREF="Distribution-Simple-InstallDirs.html#v%3AprefixRelativeInstallDirs"
>prefixRelativeInstallDirs</A
></TT
> we
 can replace <TT
><A HREF="Distribution-Simple-InstallDirs.html#v%3Aprefix"
>prefix</A
></TT
> with the <TT
><A HREF="Distribution-Simple-InstallDirs.html#v%3APrefixVar"
>PrefixVar</A
></TT
> and get resulting
 <TT
><A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TT
>s that still have the <TT
><A HREF="Distribution-Simple-InstallDirs.html#v%3APrefixVar"
>PrefixVar</A
></TT
> in them. Doing this makes it
 each to check which paths are relative to the $prefix.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:PathTemplate"
><A NAME="t%3APathTemplate"
></A
></A
><B
>PathTemplate</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>An abstract path, posibly containing variables that need to be
 substituted for to get a real <TT
><A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TT
>.
</TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:PathTemplate')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:PathTemplate" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Text-Read.html#t%3ARead"
>Read</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:PathTemplateVariable"
><A NAME="t%3APathTemplateVariable"
></A
></A
><B
>PathTemplateVariable</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:PrefixVar"
><A NAME="v%3APrefixVar"
></A
></A
><B
>PrefixVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$prefix</TT
> path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:BindirVar"
><A NAME="v%3ABindirVar"
></A
></A
><B
>BindirVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$bindir</TT
> path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:LibdirVar"
><A NAME="v%3ALibdirVar"
></A
></A
><B
>LibdirVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$libdir</TT
> path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:LibsubdirVar"
><A NAME="v%3ALibsubdirVar"
></A
></A
><B
>LibsubdirVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$libsubdir</TT
> path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:DatadirVar"
><A NAME="v%3ADatadirVar"
></A
></A
><B
>DatadirVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$datadir</TT
> path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:DatasubdirVar"
><A NAME="v%3ADatasubdirVar"
></A
></A
><B
>DatasubdirVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$datasubdir</TT
> path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:DocdirVar"
><A NAME="v%3ADocdirVar"
></A
></A
><B
>DocdirVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$docdir</TT
> path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:HtmldirVar"
><A NAME="v%3AHtmldirVar"
></A
></A
><B
>HtmldirVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$htmldir</TT
> path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:PkgNameVar"
><A NAME="v%3APkgNameVar"
></A
></A
><B
>PkgNameVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$pkg</TT
> package name path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:PkgVerVar"
><A NAME="v%3APkgVerVar"
></A
></A
><B
>PkgVerVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$version</TT
> package version path variable
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:PkgIdVar"
><A NAME="v%3APkgIdVar"
></A
></A
><B
>PkgIdVar</B
></TD
><TD CLASS="rdoc"
>The <TT
>$pkgid</TT
> package Id path variable, eg <TT
>foo-1.0</TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:CompilerVar"
><A NAME="v%3ACompilerVar"
></A
></A
><B
>CompilerVar</B
></TD
><TD CLASS="rdoc"
>The compiler name and version, eg <TT
>ghc-6.6.1</TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:OSVar"
><A NAME="v%3AOSVar"
></A
></A
><B
>OSVar</B
></TD
><TD CLASS="rdoc"
>The operating system name, eg <TT
>windows</TT
> or <TT
>linux</TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:ArchVar"
><A NAME="v%3AArchVar"
></A
></A
><B
>ArchVar</B
></TD
><TD CLASS="rdoc"
>The cpu architecture name, eg <TT
>i386</TT
> or <TT
>x86_64</TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:ExecutableNameVar"
><A NAME="v%3AExecutableNameVar"
></A
></A
><B
>ExecutableNameVar</B
></TD
><TD CLASS="rdoc"
>The executable name; used in shell wrappers
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:PathTemplateVariable')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:PathTemplateVariable" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Data-Eq.html#t%3AEq"
>Eq</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplateVariable"
>PathTemplateVariable</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Text-Read.html#t%3ARead"
>Read</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplateVariable"
>PathTemplateVariable</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplateVariable"
>PathTemplateVariable</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:toPathTemplate"
><A NAME="v%3AtoPathTemplate"
></A
></A
><B
>toPathTemplate</B
> :: <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TD
></TR
><TR
><TD CLASS="doc"
>Convert a <TT
><A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TT
> to a <TT
><A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TT
> including any template vars.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:fromPathTemplate"
><A NAME="v%3AfromPathTemplate"
></A
></A
><B
>fromPathTemplate</B
> :: <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
> -&gt; <A HREF="../base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
></TR
><TR
><TD CLASS="doc"
>Convert back to a path, any remaining vars are included
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:substPathTemplate"
><A NAME="v%3AsubstPathTemplate"
></A
></A
><B
>substPathTemplate</B
> :: PathTemplateEnv -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
> -&gt; <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:initialPathTemplateEnv"
><A NAME="v%3AinitialPathTemplateEnv"
></A
></A
><B
>initialPathTemplateEnv</B
> :: <A HREF="Distribution-Package.html#t%3APackageIdentifier"
>PackageIdentifier</A
> -&gt; <A HREF="Distribution-Compiler.html#t%3ACompilerId"
>CompilerId</A
> -&gt; PathTemplateEnv</TD
></TR
><TR
><TD CLASS="doc"
>The initial environment has all the static stuff but no paths
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:platformTemplateEnv"
><A NAME="v%3AplatformTemplateEnv"
></A
></A
><B
>platformTemplateEnv</B
> :: <A HREF="Distribution-System.html#t%3APlatform"
>Platform</A
> -&gt; PathTemplateEnv</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:compilerTemplateEnv"
><A NAME="v%3AcompilerTemplateEnv"
></A
></A
><B
>compilerTemplateEnv</B
> :: <A HREF="Distribution-Compiler.html#t%3ACompilerId"
>CompilerId</A
> -&gt; PathTemplateEnv</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:packageTemplateEnv"
><A NAME="v%3ApackageTemplateEnv"
></A
></A
><B
>packageTemplateEnv</B
> :: <A HREF="Distribution-Package.html#t%3APackageIdentifier"
>PackageIdentifier</A
> -&gt; PathTemplateEnv</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:installDirsTemplateEnv"
><A NAME="v%3AinstallDirsTemplateEnv"
></A
></A
><B
>installDirsTemplateEnv</B
> :: <A HREF="Distribution-Simple-InstallDirs.html#t%3AInstallDirs"
>InstallDirs</A
> <A HREF="Distribution-Simple-InstallDirs.html#t%3APathTemplate"
>PathTemplate</A
> -&gt; PathTemplateEnv</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.6.1</TD
></TR
></TABLE
></BODY
></HTML
>