Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 94a4f7d3ef121dc9291cc0566822165d > files > 174

ghc-MissingH-devel-1.1.0.3-2.fc14.x86_64.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
>System.Path.NameManip</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_System-Path-NameManip.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"
>MissingH-1.1.0.3: Large utility library</TD
><TD CLASS="topbut"
><A HREF="src/System-Path-NameManip.html"
>Source code</A
></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"
>System.Path.NameManip</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"
>Stability</TD
><TD CLASS="infoval"
>provisional</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>John Goerzen &lt;jgoerzen@complete.org&gt;</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"
><P
>Low-level path name manipulations.
</P
><P
>Written by Volker Wysk
</P
></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"
><A HREF="#v%3Aslice_path"
>slice_path</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aunslice_path"
>unslice_path</A
> :: [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>] -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Anormalise_path"
>normalise_path</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aslice_filename"
>slice_filename</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aslice_filename%27"
>slice_filename'</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aunslice_filename"
>unslice_filename</A
> :: [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>] -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Asplit_path"
>split_path</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adir_part"
>dir_part</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afilename_part"
>filename_part</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aunsplit_path"
>unsplit_path</A
> :: (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>) -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Asplit_filename"
>split_filename</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Asplit_filename%27"
>split_filename'</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aunsplit_filename"
>unsplit_filename</A
> :: (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>) -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Asplit3"
>split3</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aunsplit3"
>unsplit3</A
> :: (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>) -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Atest_suffix"
>test_suffix</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aabsolute_path"
>absolute_path</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aabsolute_path_by"
>absolute_path_by</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aabsolute_path%27"
>absolute_path'</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aguess_dotdot_comps"
>guess_dotdot_comps</A
> :: [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>] -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aguess_dotdot"
>guess_dotdot</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></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="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:slice_path"
><A NAME="v%3Aslice_path"
></A
></A
><B
>slice_path</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#slice_path"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>The path to be broken to components.
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="rdoc"
>List of path components.
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Split a path in components. Repeated &quot;<TT
>/</TT
>&quot; characters don't lead to empty
components. &quot;<TT
>.</TT
>&quot; path components are removed. If the path is absolute, the first component
will start with &quot;<TT
>/</TT
>&quot;. &quot;<TT
>..</TT
>&quot; components are left intact. They can't be simply
removed, because the preceding component might be a symlink. In this case,
realpath is probably what you need.
</P
><P
>The case that the path is empty, is probably an error. However, it is
treated like &quot;<TT
>.</TT
>&quot;, yielding an empty path components list.
</P
><P
>Examples:
</P
><PRE
>slice_path &quot;/&quot;        = [&quot;/&quot;]
slice_path &quot;/foo/bar&quot; = [&quot;/foo&quot;,&quot;bar&quot;]
slice_path &quot;..//./&quot;   = [&quot;..&quot;]
slice_path &quot;.&quot;        = []
</PRE
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Aunslice_path"
>unslice_path</A
></TT
>, realpath, realpath_s.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:unslice_path"
><A NAME="v%3Aunslice_path"
></A
></A
><B
>unslice_path</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#unslice_path"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="rdoc"
>List of path components
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>The path which consists of the supplied path components
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Form a path from path components. This isn't the inverse
of <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_path"
>slice_path</A
></TT
>, since <TT
><TT
><A HREF="System-Path-NameManip.html#v%3Aunslice_path"
>unslice_path</A
></TT
> . <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_path"
>slice_path</A
></TT
></TT
>
normalises the path.
</P
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_path"
>slice_path</A
></TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:normalise_path"
><A NAME="v%3Anormalise_path"
></A
></A
><B
>normalise_path</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#normalise_path"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path to be normalised
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path in normalised form
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Normalise a path. This is done by reducing repeated <TT
>/</TT
> characters to one, and removing
<TT
>.</TT
> path components. <TT
>..</TT
> path components are left intact, because of possible symlinks.
</P
><PRE
><TT
><A HREF="System-Path-NameManip.html#v%3Anormalise_path"
>normalise_path</A
></TT
> = <TT
><A HREF="System-Path-NameManip.html#v%3Aunslice_path"
>unslice_path</A
></TT
> . <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_path"
>slice_path</A
></TT
></PRE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:slice_filename"
><A NAME="v%3Aslice_filename"
></A
></A
><B
>slice_filename</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#slice_filename"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="rdoc"
>List of components the file name is made up of
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Split a file name in components. This are the base file name and the
suffixes, which are separated by dots. If the name starts with a dot, it is
regarded as part of the base name. The result is a list of file name
components. The filename may be a path. In this case, everything up to the
last path component will be returned as part of the base file name. The
path gets normalised thereby.
</P
><P
>No empty suffixes are returned. If the file name contains several
consecutive dots, they are regared as part of the preceding file name
component.
</P
><P
>Concateneting the name components and adding dots, reproduces the
original name, with a normalised path:
<TT
>concat . intersperse &quot;.&quot; . <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_filename"
>slice_filename</A
></TT
> == normalise</TT
>.
</P
><P
>Note that the last path component might be &quot;<TT
>..</TT
>&quot;. Then it is not
possible to deduce the refered directory's name from the path. An IO
action for getting the real path is then necessary.
</P
><P
>Examples:
</P
><PRE
>
<TT
><A HREF="System-Path-NameManip.html#v%3Aslice_filename"
>slice_filename</A
></TT
> &quot;a.b//./.foo.tar.gz&quot; == [&quot;a.b/.foo&quot;,&quot;tar&quot;,&quot;gz&quot;]
<TT
><A HREF="System-Path-NameManip.html#v%3Aslice_filename"
>slice_filename</A
></TT
> &quot;.x..y.&quot;             == [&quot;.x.&quot;, &quot;y.&quot;]
</PRE
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Aunslice_filename"
>unslice_filename</A
></TT
>, <TT
>slice_filename'</TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:slice_filename'"
><A NAME="v%3Aslice_filename%27"
></A
></A
><B
>slice_filename'</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#slice_filename%27"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>File name without path
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="rdoc"
>List of components the file name is made up of
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>This is a variant of <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_filename"
>slice_filename</A
></TT
>. It is like <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_filename"
>slice_filename</A
></TT
>, except for
being more efficient, and the filename must not contain any preceding path,
since this case isn't considered.
</P
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_filename"
>slice_filename</A
></TT
>, <TT
><A HREF="System-Path-NameManip.html#v%3Aunslice_filename"
>unslice_filename</A
></TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:unslice_filename"
><A NAME="v%3Aunslice_filename"
></A
></A
><B
>unslice_filename</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#unslice_filename"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="rdoc"
>List of file name components
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Name of the file which consists of the supplied components
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Form file name from file name components, interspersing dots. This is
the inverse of <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_filename"
>slice_filename</A
></TT
>, except for normalisation of any path.
</P
><PRE
> unslice_filename = concat . intersperse &quot;.&quot;
</PRE
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_filename"
>slice_filename</A
></TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:split_path"
><A NAME="v%3Asplit_path"
></A
></A
><B
>split_path</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#split_path"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path to be split
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
><TD CLASS="rdoc"
>Directory and file name components of the path. The directory path is normalized.
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Split a path in directory and file name. Only in the case that the
supplied path is empty, both parts are empty strings. Otherwise, <TT
>&quot;.&quot;</TT
> is filled in
for the corresponding part, if necessary. Unless the path is empty,
concatenating the returned path and file name components with a slash in
between, makes a valid path to the file.
</P
><P
><TT
>split_path</TT
> splits off the last path component. This
isn't the same as the text after the last <TT
>/</TT
>.
</P
><P
>Note that the last path component might be <TT
>&quot;..&quot;</TT
>. Then it is not
possible to deduce the refered directory's name from the path. Then an IO
action for getting the real path is necessary.
</P
><P
>Examples:
</P
><PRE
>split_path &quot;/a/b/c&quot;      == (&quot;/a/b&quot;, &quot;c&quot;)
split_path &quot;foo&quot;         == (&quot;.&quot;, &quot;foo&quot;)
split_path &quot;foo/bar&quot;     == (&quot;foo&quot;, &quot;bar&quot;)
split_path &quot;foo/..&quot;      == (&quot;foo&quot;, &quot;..&quot;)
split_path &quot;.&quot;           == (&quot;.&quot;, &quot;.&quot;)
split_path &quot;&quot;            == (&quot;&quot;, &quot;&quot;)
split_path &quot;/foo&quot;        == (&quot;/&quot;, &quot;foo&quot;)
split_path &quot;foo/&quot;        == (&quot;.&quot;, &quot;foo&quot;)
split_path &quot;foo/.&quot;       == (&quot;.&quot;, &quot;foo&quot;)
split_path &quot;foo///./bar&quot; == (&quot;foo&quot;, &quot;bar&quot;)
</PRE
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_path"
>slice_path</A
></TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:dir_part"
><A NAME="v%3Adir_part"
></A
></A
><B
>dir_part</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#dir_part"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Get the directory part of a path.
</P
><PRE
>dir_part = fst . split_path
</PRE
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Asplit_path"
>split_path</A
></TT
>.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:filename_part"
><A NAME="v%3Afilename_part"
></A
></A
><B
>filename_part</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#filename_part"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Get the last path component of a path.
</P
><PRE
>filename_part = snd . split_path
</PRE
><P
>Examples:
</P
><PRE
>filename_part &quot;foo/bar&quot; == &quot;bar&quot;
filename_part &quot;.&quot;       == &quot;.&quot;
</PRE
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Asplit_path"
>split_path</A
></TT
>.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:unsplit_path"
><A NAME="v%3Aunsplit_path"
></A
></A
><B
>unsplit_path</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#unsplit_path"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
><TD CLASS="rdoc"
>Directory and file name
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path formed from the directory and file name parts
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Inverse of <TT
><A HREF="System-Path-NameManip.html#v%3Asplit_path"
>split_path</A
></TT
>, except for normalisation.
</P
><P
>This concatenates two paths, and takes care of <TT
>&quot;.&quot;</TT
> and empty paths. When the two components are the result of <TT
>split_path</TT
>, then <TT
>unsplit_path</TT
>
creates a normalised path. It is best documented by its definition:
</P
><PRE
>unsplit_path (&quot;.&quot;, &quot;&quot;) = &quot;.&quot;
unsplit_path (&quot;&quot;, &quot;.&quot;) = &quot;.&quot;
unsplit_path (&quot;.&quot;, q)  = q
unsplit_path (&quot;&quot;, q)   = q
unsplit_path (p, &quot;&quot;)   = p
unsplit_path (p, &quot;.&quot;)  = p
unsplit_path (p, q)    = p ++ &quot;/&quot; ++ q
</PRE
><P
>Examples:
</P
><PRE
>unsplit_path (&quot;&quot;, &quot;&quot;)     == &quot;&quot;
unsplit_path (&quot;.&quot;, &quot;&quot;)    == &quot;.&quot;
unsplit_path (&quot;.&quot;, &quot;.&quot;)   == &quot;.&quot;
unsplit_path (&quot;foo&quot;, &quot;.&quot;) == &quot;foo&quot;
</PRE
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Asplit_path"
>split_path</A
></TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:split_filename"
><A NAME="v%3Asplit_filename"
></A
></A
><B
>split_filename</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#split_filename"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path including the file name to be split
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
><TD CLASS="rdoc"
>The normalised path with the file prefix, and the file suffix.
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Split a file name in prefix and suffix. If there isn't any suffix in
the file name, then return an empty suffix. A dot at the beginning or at
the end is not regarded as introducing a suffix.
</P
><P
>The last path component is what is being split. This isn't the same as
splitting the string at the last dot. For instance, if the file name
doesn't contain any dot, dots in previous path component's aren't mistaken
as introducing suffixes.
</P
><P
>The path part is returned in normalised form. This means, <TT
>&quot;.&quot;</TT
> components
are removed, and multiple &quot;<TT
>/</TT
>&quot;s are reduced to one.
</P
><P
>Note that there isn't any plausibility check performed on the suffix. If the file name doesn't have a suffix, but happens to contain a dot, then this
dot is mistaken as introducing a suffix.
</P
><P
>Examples:
</P
><PRE
>split_filename &quot;path/to/foo.bar&quot;                             = (&quot;path/to/foo&quot;,&quot;bar&quot;)
split_filename &quot;path/to/foo&quot;                                 = (&quot;path/to/foo&quot;,&quot;&quot;)
split_filename &quot;/path.to/foo&quot;                                = (&quot;/path.to/foo&quot;,&quot;&quot;)
split_filename &quot;a///./x&quot;                                     = (&quot;a/x&quot;,&quot;&quot;)
split_filename &quot;dir.suffix/./&quot;                               = (&quot;dir&quot;,&quot;suffix&quot;)
split_filename &quot;Photographie, Das 20. Jahrhundert (300 dpi)&quot; = (&quot;Photographie, Das 20&quot;, &quot; Jahrhundert (300 dpi)&quot;)
</PRE
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Aslice_path"
>slice_path</A
></TT
>, 'split_filename\''
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:split_filename'"
><A NAME="v%3Asplit_filename%27"
></A
></A
><B
>split_filename'</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#split_filename%27"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Filename to be split
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
><TD CLASS="rdoc"
>Base name and the last suffix
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Variant of <TT
><A HREF="System-Path-NameManip.html#v%3Asplit_filename"
>split_filename</A
></TT
>. This is a more efficient version
of <TT
><A HREF="System-Path-NameManip.html#v%3Asplit_filename"
>split_filename</A
></TT
>, for the case that you know the string is
is a pure file name without any slashes.
</P
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Asplit_filename"
>split_filename</A
></TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:unsplit_filename"
><A NAME="v%3Aunsplit_filename"
></A
></A
><B
>unsplit_filename</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#unsplit_filename"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
><TD CLASS="rdoc"
>File name prefix and suffix
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Inverse of <TT
><A HREF="System-Path-NameManip.html#v%3Asplit_filename"
>split_filename</A
></TT
>. Concatenate prefix and suffix, adding
a dot in between, iff the suffix is not empty. The path part of the prefix is
normalised.
</P
><P
>See <TT
><A HREF="System-Path-NameManip.html#v%3Asplit_filename"
>split_filename</A
></TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:split3"
><A NAME="v%3Asplit3"
></A
></A
><B
>split3</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#split3"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path to split
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
><TD CLASS="rdoc"
>Directory part, base file name part and suffix part
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Split a path in directory, base file name and suffix.
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:unsplit3"
><A NAME="v%3Aunsplit3"
></A
></A
><B
>unsplit3</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#unsplit3"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>)</TD
><TD CLASS="rdoc"
>Directory part, base file name part and suffix part
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path consisting of dir, base and suffix
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Form path from directory, base file name and suffix parts.
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:test_suffix"
><A NAME="v%3Atest_suffix"
></A
></A
><B
>test_suffix</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#test_suffix"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Suffix to split off
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path to test
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Prefix without the suffix or <TT
>Nothing</TT
>
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Test a path for a specific suffix and split it off.
</P
><P
>If the path ends with the suffix, then the result is <TT
>Just
prefix</TT
>, where <TT
>prefix</TT
> is the normalised path
without the suffix. Otherwise it's <TT
>Nothing</TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:absolute_path"
><A NAME="v%3Aabsolute_path"
></A
></A
><B
>absolute_path</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#absolute_path"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>The path to be made absolute
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Absulte path
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Make a path absolute, using the current working directory.
</P
><P
>This makes a relative path absolute with respect to the current
working directory. An absolute path is returned unmodified.
</P
><P
>The current working directory is determined with <TT
>getCurrentDirectory</TT
>
which means that symbolic links in it are expanded and the path is
normalised. This is different from <TT
>pwd</TT
>.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:absolute_path_by"
><A NAME="v%3Aabsolute_path_by"
></A
></A
><B
>absolute_path_by</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#absolute_path_by"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>The directory relative to which the path is made absolute
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>The path to be made absolute
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Absolute path
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Make a path absolute.
</P
><P
>This makes a relative path absolute with respect to a specified
directory. An absolute path is returned unmodified.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:absolute_path'"
><A NAME="v%3Aabsolute_path%27"
></A
></A
><B
>absolute_path'</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#absolute_path%27"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>The path to be made absolute
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>The directory relative to which the path is made absolute
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Absolute path
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Make a path absolute.
</P
><P
>This makes a relative path absolute with respect to a specified
directory. An absolute path is returned unmodified.
</P
><P
>The order of the arguments can be confusing. You should rather use <TT
><A HREF="System-Path-NameManip.html#v%3Aabsolute_path_by"
>absolute_path_by</A
></TT
>. <TT
>absolute_path'</TT
> is included for backwards compatibility.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:guess_dotdot_comps"
><A NAME="v%3Aguess_dotdot_comps"
></A
></A
><B
>guess_dotdot_comps</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#guess_dotdot_comps"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="rdoc"
>List of path components
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="rdoc"
>In case the path could be transformed, the <TT
>&quot;..&quot;</TT
>-component free list of path components.
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Guess the <TT
>&quot;..&quot;</TT
>-component free form of a path, specified as a list of path components, by syntactically removing them, along with the preceding
   path components. This will produce
   erroneous results when the path contains symlinks. If the path contains leading <TT
>&quot;..&quot;</TT
> components, or more <TT
>&quot;..&quot;</TT
> components than preceeding normal
   components, then the <TT
>&quot;..&quot;</TT
> components can't be normalised away. In this case, the result is <TT
>Nothing</TT
>.
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:guess_dotdot"
><A NAME="v%3Aguess_dotdot"
></A
></A
><B
>guess_dotdot</B
></TD
><TD CLASS="declbut"
><A HREF="src/System-Path-NameManip.html#guess_dotdot"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>Path to be normalised
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>In case the path could be transformed, the normalised, <TT
>&quot;..&quot;</TT
>-component free form of the path.
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Guess the <TT
>&quot;..&quot;</TT
>-component free, normalised form of a path. The transformation is purely syntactic. <TT
>&quot;..&quot;</TT
> path components will be removed, along
   with their preceding path components. This will produce
   erroneous results when the path contains symlinks. If the path contains leading <TT
>&quot;..&quot;</TT
> components, or more <TT
>&quot;..&quot;</TT
> components than preceeding normal
   components, then the <TT
>&quot;..&quot;</TT
> components can't be normalised away. In this case, the result is <TT
>Nothing</TT
>.
</P
><PRE
>guess_dotdot = fmap unslice_path . guess_dotdot_comps . slice_path
</PRE
></TD
></TR
></TABLE
></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
>