diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,8 @@
+# Revision history for HsShellScript
+
+## 3.6.0 -- 2024-03-28
+
+* First version using the latest Cabal infrastructure.
+* Added pipe_from_full and pipe_from_full2
+* Reformatted the source code and the comments such that they aren's so wide.
+
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,504 +1,165 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
 
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
 
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
 
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
+  0. Additional Definitions.
 
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
 
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
 
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
 
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
 
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
 
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
 
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
+  1. Exception to Section 3 of the GNU GPL.
 
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
 
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
+  2. Conveying Modified Versions.
 
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
 
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
 
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
 
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
+  3. Object Code Incorporating Material from Library Header Files.
 
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
 
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
 
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
 
-			    NO WARRANTY
+  4. Combined Works.
 
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
 
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
 
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
 
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
 
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
+   d) Do one of the following:
 
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
 
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
 
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
 
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  5. Combined Libraries.
 
-Also add information on how to contact you by electronic and paper mail.
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
 
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
 
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
 
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
+  6. Revised Versions of the GNU Lesser General Public License.
 
-That's all there is to it!
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
 
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
 
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
-# Nächste Version:
-VERSION = 3.5.0
+VERSION = 3.6.0
 
 default :: lib
 
@@ -14,10 +13,10 @@
 install-global ::
 	sudo cabal install --global
 
-build :: dist/build/libHShsshellscript-$(VERSION).a
+# build :: dist-newstyle/build/libHShsshellscript-$(VERSION).a
 
-dist/build/libHShsshellscript-$(VERSION).a :: 
-	cabal build
+# dist-newstyle/build/libHShsshellscript-$(VERSION).a :: 
+# 	cabal build
 
 dist ::
 	cabal sdist
diff --git a/README b/README
deleted file mode 100644
--- a/README
+++ /dev/null
@@ -1,13 +0,0 @@
-This is HsShellScript, a library which enables you to use Haskell for tasks which
-are typically done by shell scripts. It requires the Glasgow Haskell Compiler.
-
-The installation instructions are in the user manual. It is located in the "manual"
-subdirectory. 
-
-HsShellScript is released under the terms of the GNU Lesser General Public License
-(LGPL), version 2.1, or any later version. A copy of the license is included in
-the user manual.
-
-The homepage is at http://www.volker-wysk.de/hsshellscript.
-
-Volker Wysk <post@volker-wysk.de>
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,27 @@
+# HsShellScript - Haskell for Unix shell scripting tasks
+
+This is HsShellScript, a library which enables you to use Haskell for tasks which
+are typically done by shell scripts. It requires the Glasgow Haskell Compiler.
+
+## Installation and Usage
+
+Cabal is being used. You can just import the parts of HsShellScript and build your program with cabal.
+HsShellScript will be downloaded and installed automatically.
+
+## Documentation 
+
+The documentation is in the API documentation. There you'll also find some examples.
+
+## License
+
+HsShellScript is released under the terms of the GNU Lesser General Public License
+(LGPL), version 2.1, or any later version. A copy of the license is included in
+the user manual.
+
+## Home
+
+The (outdated, at the moment) homepage is at http://www.volker-wysk.de/hsshellscript.
+
+## Author
+
+Volker Wysk <post@volker-wysk.de>
diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
--- a/Setup.hs
+++ /dev/null
@@ -1,2 +0,0 @@
-import Distribution.Simple
-main = defaultMain
diff --git a/hsshellscript.cabal b/hsshellscript.cabal
--- a/hsshellscript.cabal
+++ b/hsshellscript.cabal
@@ -1,25 +1,74 @@
-Name:                hsshellscript
-Version:             3.5.0
-Synopsis:            Haskell for Unix shell scripting tasks
+cabal-version:      3.0
+-- The cabal-version field refers to the version of the .cabal specification,
+-- and can be different from the cabal-install (the tool) version and the
+-- Cabal (the library) version you are using. As such, the Cabal (the library)
+-- version used must be equal or greater than the version stated in this field.
+-- Starting from the specification version 2.2, the cabal-version field must be
+-- the first thing in the cabal file.
+
+-- Initial package description 'hsshellscript' generated by
+-- 'cabal init'. For further documentation, see:
+--   http://haskell.org/cabal/users-guide/
+--
+-- The name of the package.
+name:               hsshellscript
+
+-- The package version.
+-- See the Haskell package versioning policy (PVP) for standards
+-- guiding when and how versions should be incremented.
+-- https://pvp.haskell.org
+-- PVP summary:     +-+------- breaking API changes
+--                  | | +----- non-breaking API additions
+--                  | | | +--- code changes with no API change
+version:            3.6.0
+
+-- A short (one-line) description of the package.
+synopsis:           Using Haskell for Unix shell scripting tasks
+
 Description:         A Haskell-library for tasks which are usually done in
                      shell scripts. This includes parsing command line
                      arguments; dealing with paths; some commands for dealing
                      with files; calling external programs and subroutines as
                      separate processes; pipes and redirection of input and
                      output; and error handling.
+
 Homepage:            http://www.volker-wysk.de/hsshellscript/
-License:             LGPL
-License-file:        LICENSE
-Author:              Volker Wysk
-Maintainer:          post@volker-wysk.de
-Copyright:           (c)2021 by Volker Wysk
-Category:            System
-Build-type:          Simple
-Extra-source-files:  README, manual/*.html, manual/LICENSE, Makefile, 
-                     test/Makefile, test/*.hs, test/*.c, test/*.chs
-cabal-version:       2.0
 
+-- A longer description of the package.
+-- description:
+
+-- The license under which the package is released.
+license:            LGPL-3.0-or-later
+
+-- The file containing the license text.
+license-file:       LICENSE
+
+-- The package author(s).
+author:             Volker Wysk
+
+-- An email address to which users can send suggestions, bug reports, and patches.
+maintainer:         post@volker-wysk.de
+
+-- A copyright notice.
+Copyright:          (C) 2021-2024 by Volker Wysk
+
+category:           System
+build-type:         Simple
+
+-- Extra doc files to be distributed with the package, such as a CHANGELOG or a README.
+extra-doc-files:    CHANGELOG.md, README.md
+
+Extra-source-files:  Makefile
+
+-- Extra source files to be distributed with the package, such as examples, or a tutorial module.
+-- extra-source-files:
+
+common warnings
+--    ghc-options: -Wall
+
+
 Library
+  import:             warnings
   Exposed-Modules:    HsShellScript
                       HsShellScript.Args
                       HsShellScript.Paths
@@ -34,17 +83,18 @@
                       ScopedTypeVariables,
                       NamedFieldPuns,
                       StandaloneDeriving
-  Build-depends:      base >= 3 && < 6,
-                      unix >= 2.3.2,
-                      directory,
-                      parsec >= 2.1.0.1,
-                      random
+  Build-depends:      base ^>=4.13.0.0,
+                      directory >= 1.3.6 && < 1.4,
+                      unix >= 2.7.2 && < 2.8,
+                      parsec >= 3.1.14 && < 3.2,
+                      random >= 1.1 && < 1.2
   hs-source-dirs:     src
   C-Sources:          src/cbits/hsshellscript.c
-
-  -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.
-  --Build-tools:        c2hs >= 0.15.1    XXX
-  -- https://cabal.readthedocs.io/en/3.4/cabal-package.html#pkg-field-build-tool-depends
-  Build-tool-depends: c2hs:c2hs >= 0.15.1
- 
   default-language:   Haskell2010
+
+
+
+source-repository head
+  type:     git
+  location: https://gitlab.com/volkerwysk/hsshellscript.git
+
diff --git a/manual/LICENSE b/manual/LICENSE
deleted file mode 100644
--- a/manual/LICENSE
+++ /dev/null
@@ -1,504 +0,0 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/manual/features.html b/manual/features.html
deleted file mode 100644
--- a/manual/features.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
-	<TITLE></TITLE>
-	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.0  (Linux)">
-	<META NAME="CREATED" CONTENT="20040206;20494700">
-	<META NAME="CHANGED" CONTENT="20040206;21432900">
-</HEAD>
-<BODY LANG="en-US" DIR="LTR">
-<H2>HsShellScript Features</H2>
-
-<h3>Command Line Argument Parser</h3><p>
-    HsShellScript has facilities for managing command line arguments, which are
-    easier to use than the GHC library GetOpt. Command line
-    arguments are specified as lists of properties. HsShellScript builds on top
-    of GHC's GetOpt, but hides it completely. Command line arguments handling
-    has been added because GetOpt was found to be too cumbersome.</p>
-<h3>Easy Interface to External Programs</h3><p>
-    Calling programs and recognizing errors (via exitcode or exception) is made more easy. There are front end functions for common programs, such as
-    <tt>/bin/mv</tt> or <tt>/bin/chmod</tt>. </p>
-<h3>Analyzing Paths</h3><p>
-    Dealing with paths is not as trivial as it sounds. Take, for example
-    <tt>../foo.bar//./../baz/</tt> (and split off the extension of the file
-    name...). HsShellScript solves this thoroughly and provides functions for such
-    tasks as splitting a path in directory and file name parts, splitting a path
-    into path components, or syntactically normalising paths.</p>
-<h3>Redirecting Input and Output</h3><p>
-    HsShellScript defines operators like <tt>->-</tt> and <tt>->>-</tt> which work like
-    redirection operators in shells.</p>
-<h3>Building Pipes</h3><p>
-    Reading the output of an external program, or piping the output of one
-    program into the input of another, is almost as easy as in shells.
-    HsShellScript provides corresponding operators.</p>
-<h3>Error Handling</h3><p>
-    Error handling is one thing which is done more thoroughly in
-    HsShellScript than in shells. Failed programs won't be silently ignored.
-    Exceptions are used for error handling. Non zero exit codes
-    are thrown as exceptions.</p>
-<h3>Quoting of Strings and Building Commands for Shells</h3><p>
-    Taking care of shell metacharacters usually isn't done right. HsShellScript
-    provides functions for doing it safely.</p>
-<h3>Non-broken, Secure Functions for Creating Temporary Files and Directories</h3><p>
-    The standard C library has <tt>mkstemp</tt>, <tt>mktemp</tt>, <tt>tempnam</tt>, <tt>tmpfile</tt> and <tt>tmpnam</tt>, which are all broken,
-    non-portable or unsuitable in some way.</p>
-</dl>
-
-<P STYLE="border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.05cm; padding-bottom: 0cm; padding-left: 0cm; padding-right: 0cm">
-<small><a href="index.html">HsShellScript User Manual main page</a></small></P>
-</BODY>
-</HTML>
diff --git a/manual/imports.html b/manual/imports.html
deleted file mode 100644
--- a/manual/imports.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
-	<TITLE></TITLE>
-</HEAD>
-<BODY LANG="en-US" DIR="LTR">
-<H1>GHC-Libraries needed for HsShellScript</H1>
-
-<p>In order to use HsShellScript's exception handling, you'll have to import
-some and restrict some GHC-libraries (all of which are included in GHC). The
-following source code will to the trick:
-
-
-<br><code>
-<br>import Prelude hiding (catch)
-<br>import IO hiding (catch)
-<br>import Control.Exception
-<br>import HsShellScript
-</code>
-
-
-<P STYLE="border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.05cm; padding-bottom: 0cm; padding-left: 0cm; padding-right: 0cm">
-<small><a href="index.html">HsShellScript User Manual main page</a></small></P>
-
-</BODY>
-</HTML>
diff --git a/manual/index.html b/manual/index.html
deleted file mode 100644
--- a/manual/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
-	<TITLE>HsShellScript User Manual</TITLE>
-</HEAD>
-<BODY LANG="en-US" DIR="LTR">
-<H1>HsShellScript User Manual</H1>
-
-<P>This is the user manual for the <A HREF="http://www.volker-wysk.de/hsshellscript">HsShellScript</A>
-Haskell shell scripting library, version 3.3.2. It has been released 2014-08-06. The API
-documentation is in a separate document.</P>
-<P>HsShellScript is a library which makes things easy to program in
-Haskell, which are typically done by shell scripts on Unix-like
-systems. You can use Haskell for writing your shell scripts.</P>
-<p>So your Haskell scripts can grow to become real programs. It's all ready.
-
-<P><A HREF="features.html">Features</A>
-<BR><A HREF="requirements.html">Requirements</A>
-<BR><A HREF="install.html">Installation</A>
-<BR><A HREF="usage.html">Usage</A>
-<BR><A HREF="imports.html">Necessary <tt>import</tt> declarations</A>
-<BR><A HREF="LICENSE">License</A></P>
-
-<P STYLE="border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.05cm; padding-bottom: 0cm; padding-left: 0cm; padding-right: 0cm">
-<small>Last changed 2014-08-06</small></P>
-</BODY>
-</HTML>
diff --git a/manual/install.html b/manual/install.html
deleted file mode 100644
--- a/manual/install.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
-	<TITLE></TITLE>
-	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.0  (Linux)">
-	<META NAME="CREATED" CONTENT="20040204;11123200">
-	<META NAME="CHANGED" CONTENT="20040921;23052000">
-</HEAD>
-<BODY LANG="de-DE" DIR="LTR">
-<H2>Building and Installing HsShellScript</H2>
-
-<p>HsShellScript is cabalized, which means that building and installing is a
-  matter of some calls to <tt>cabal</tt>. However, it also provides a
-  Makefile, which further simplifies the installation.
-
-<p>In order to install, unpack the source distribution somewhere. Go to the
-  directory, and call <tt>make</tt>. This will compile the library. If you want
-  to install it locally, in your user account, then do <tt>make
-  install-user</tt>. This calls <tt>cabal install --user</tt>. If you want to
-  install the library globally, do <tt>make install-global</tt>. You will be
-  prompted for the root password, which is needed in this case. This
-  calls <tt>sudo cabal install --global</tt>.
-
-<p>If installed as a user package, then the location of the API documentation
-  is <tt>~/.cabal/share/doc/hsshellscript-3.3.1/html/index.html</tt>. If it is
-  installed globaly, it
-  is <tt>/usr/local/share/doc/hsshellscript-3.3.1/html/index.html</tt>. 
-
-<p>Cabal's Simple Build Infrastructure doesn't provide any means to add extra
-  documenation to a project. Therefore the user manual isn't installed by default.
-  If you need it, you can just copy the "manual" directory anywhere you like,
-  but the Makefile privides
-  the make target <tt>install-manual</tt>, which copies the files to
-  <tt>/usr/local/share/hsshellscript/manual</tt>.
-
-
-<p>Further information about the Cabal can be found here:
-<a href="http://www.haskell.org/cabal/">The Haskell Cabal</a>
-
-
-<P STYLE="border-top: 1px solid #000000; border-bottom: none; border-left:
-          none; border-right: none; padding-top: 0.05cm; padding-bottom: 0cm;
-          padding-left: 0cm; padding-right:
-          0cm"><A HREF="index.html"><FONT SIZE=2>HsShellScript User Manual main
-          page</FONT></A></P>
-</BODY>
-</HTML>
diff --git a/manual/requirements.html b/manual/requirements.html
deleted file mode 100644
--- a/manual/requirements.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
-	<TITLE></TITLE>
-	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.0  (Linux)">
-	<META NAME="CREATED" CONTENT="20040206;21443400">
-	<META NAME="CHANGED" CONTENT="20040206;22570100">
-</HEAD>
-<BODY LANG="en-US" DIR="LTR">
-
-<H2>Requirements</H2>
-
-<p><b>Requirements for using and for building</b>
-<UL>
-	<LI><P>The <A HREF="http://www.haskell.org/ghc/">Glasgow Haskell
-    	Compiler</A>. 
-            It works with GHC-7.8.3, and
-            should also work with versions 7.8.0 upwards. Because of incompatible
-            changes in GHC, it <i>does not</i> work with GHC-7.6 and older.
-          </P>
-
-	<LI><P>A Unix like system. HsShellScript is being developed and tested on Linux.</P>
-</UL>
-
-<p><b>Requirements only for building</b>
-<UL>
-	<LI><P>GNU make</P>
-	<LI><P>The interface generator <A HREF="http://www.cse.unsw.edu.au/~chak/haskell/c2hs/">C2HS</A></P>
-	<LI><P><A HREF="http://haskell.cs.yale.edu/haddock/">Haddock</A> for the API documentation</P>
-</UL>
-<p>GHC and Haddock are included in
-  the <a href="http://hackage.haskell.org/platform/">The Haskell Platform</a>.
-
-<P STYLE="border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.05cm; padding-bottom: 0cm; padding-left: 0cm; padding-right: 0cm">
-<small><a href="index.html">HsShellScript User Manual main page</a></small></P>
-
-</BODY>
-</HTML>
diff --git a/manual/usage.html b/manual/usage.html
deleted file mode 100644
--- a/manual/usage.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
-	<TITLE></TITLE>
-	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.0  (Linux)">
-	<META NAME="CREATED" CONTENT="20040204;11373400">
-	<META NAME="CHANGED" CONTENT="20040206;21553600">
-	<STYLE>
-	<!--
-		@page { margin: 2cm }
-		P { margin-bottom: 0.21cm }
-	-->
-	</STYLE>
-</HEAD>
-<BODY LANG="en-US" DIR="LTR">
-<H2>Usage</H2>
-
-<P>HsShellScript registers itself in GHC's package management system during installation. Therefore all you need is to add
-"<code>-package hsshellscript</code>" to the command line when compiling and linking.</p>
-
-<P STYLE="border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.05cm; padding-bottom: 0cm; padding-left: 0cm; padding-right: 0cm">
-<small><a href="index.html">HsShellScript User Manual main page</a></small></P>
-
-</body>
-</html>
diff --git a/src/HsShellScript.hs b/src/HsShellScript.hs
--- a/src/HsShellScript.hs
+++ b/src/HsShellScript.hs
@@ -1,11 +1,11 @@
 -- HsShellScript main module
 module HsShellScript (
               -- * Command Line Arguments
-              -- Command line arguments are handled by the module "HsShellScript.Args", which is reexported by "HsShellScript".
               module HsShellScript.Args,
 
               -- * Paths and Directories
               mkdir, rmdir, pwd, cd, realpath, realpath_s, path_exists, path_exists', is_file, is_dir, with_wd,
+              
               -- ** Parsing and Composing Paths
               module HsShellScript.Paths,
 
@@ -14,7 +14,8 @@
 
               -- * Manipulating Files
               rm, chmod, chown, cp, mv,
-              HsShellScript.Commands.rename, rename_mv, force_rename, force_mv, force_rename_mv, force_cmd, force_writeable, force_writeable2,
+              HsShellScript.Commands.rename, rename_mv, force_rename, force_mv, force_rename_mv, force_cmd,
+              force_writeable, force_writeable2,
               getFileStatus', fileAccess', setFileMode',
 
               -- * Interfaces to Some Specific External Commands
@@ -55,13 +56,15 @@
               pipe_to, h_pipe_to,
               pipe_from, lazy_pipe_from, h_pipe_from,
               pipe_from2, lazy_pipe_from2, h_pipe_from2,
+              pipe_from_full, pipe_from_full2, 
               pipes,
 
               -- * Shell-like Quoting
               module HsShellScript.Shell,
 
               -- * Creating temporary files and directories
-              tmp_file, tmp_dir, temp_file, temp_dir, temp_path, with_tmp_file, with_tmp_dir, with_temp_file, with_temp_dir,
+              tmp_file, tmp_dir, temp_file, temp_dir, temp_path, with_tmp_file, with_tmp_dir, with_temp_file,
+              with_temp_dir,
 
               -- * Reading mount information
               Mntent(..), read_mounts, read_mtab, read_fstab,
@@ -287,7 +290,7 @@
    thrown, and the process continues with normal error handling. Normally, the
    @exec@ functions are used in conjunction with some of the functions which
    fork a child process. They also handle errors, so the forked action doesn't
-   need to cope with failure of @exec@. The error handling and
+   need to deal with failure of @exec@. The error handling and
    termination is done via the 'child' function.
 
    Sometimes you want to pass an open file descriptor to the program. In this
diff --git a/src/HsShellScript/Args.chs b/src/HsShellScript/Args.chs
--- a/src/HsShellScript/Args.chs
+++ b/src/HsShellScript/Args.chs
@@ -1,6 +1,6 @@
 -- |
 -- This module provides a more convient way of parsing command line
--- arguments than the GHC GetOpt package. It uses GetOpt, but hides
+-- arguments than the GHC GetOpt package. It builds on top of GetOpt, but hides
 -- it from the user. It is reexported from module HsShellScript.
 --
 -- For each command line argument, a description is to be created with
@@ -23,7 +23,7 @@
 -- >
 -- >d_onevalue = argdesc [ desc_short 'o', desc_at_most_once, desc_argname "a", desc_value_required {-...-}]
 -- >d_values   = argdesc [ desc_direct, desc_any_times {-...-} ]
--- >d_switch   = argdesc [ desc_long "doit", desc_at_most_once {-...-} ] 
+-- >d_switch   = argdesc [ desc_long "doit", desc_at_most_once {-...-} ]
 -- >-- ...
 -- >
 -- >args = unsafe_getargs header descs
@@ -146,13 +146,13 @@
    deriving (Eq, Show, Ord)
 
 
--- | Argument value tester function. This tests the format of an argument's value for errors. The tester function is specified by
--- 'desc_tester' or such, as part of the argument description.
+-- | Argument value tester function. This tests the format of an argument's value for errors. The tester function
+-- is specified by 'desc_tester' or such, as part of the argument description.
 --
--- The tester is passed the argument value. If the format is correct, then it returns @Nothing@. If there is an error, then it returns @Just msgf@,
--- with @msgf@ being an error message generation function. This function gets passed the argument description, and produces the error
--- message. The argument description typically is used to extract a descriptive name of the argument (using 'argname' or 'argname_a') to be included
--- in the error message.
+-- The tester is passed the argument value. If the format is correct, then it returns @Nothing@. If there is an
+-- error, then it returns @Just msgf@, with @msgf@ being an error message generation function. This function gets
+-- passed the argument description, and produces the error message. The argument description typically is used to
+-- extract a descriptive name of the argument (using 'argname' or 'argname_a') to be included in the error message.
 type Argtester = String                           -- Argument value to be tested
                  -> Maybe (ArgumentDescription    -- Argument description for message generation
                            -> String              -- Error message
@@ -161,20 +161,22 @@
 
 -- | Description of one command line argument. These are generated by
 -- @argdesc@ from a list of argument properties, and subsequently used by one of the
--- @getargs@... functions. 
+-- @getargs@... functions.
+
 data ArgumentDescription = ArgumentDescription {
-        argdesc_short_args :: [Char],                           -- ^ Short option names
-        argdesc_long_args :: [String],                          -- ^ Long option names
-        argdesc_argarg :: ArgumentValueSpec,                    -- ^ What about a possible value of the argument?
-        argdesc_times :: Maybe (Int,Int),                       -- ^ Minimum and maximum of number of occurences allowed
-        argdesc_argargname :: Maybe String,                     -- ^ Name for argument's value, for message generation
-        argdesc_description :: Maybe String,                    -- ^ Descrition of the argument, for message generation
-        argdesc_argarg_tester :: Maybe Argtester                -- ^ Argument value tester
+        argdesc_short_args :: [Char],             -- ^ Short option names
+        argdesc_long_args :: [String],            -- ^ Long option names
+        argdesc_argarg :: ArgumentValueSpec,      -- ^ What about a possible value of the argument?
+        argdesc_times :: Maybe (Int,Int),         -- ^ Minimum and maximum of number of occurences allowed
+        argdesc_argargname :: Maybe String,       -- ^ Name for argument's value, for message generation
+        argdesc_description :: Maybe String,      -- ^ Descrition of the argument, for message generation
+        argdesc_argarg_tester :: Maybe Argtester  -- ^ Argument value tester
       }
 
 -- excluding tester
 ad_tup ad =
-   (argdesc_short_args ad, argdesc_long_args ad, argdesc_argarg ad, argdesc_times ad, argdesc_argargname ad, argdesc_description ad)
+   (argdesc_short_args ad, argdesc_long_args ad, argdesc_argarg ad, argdesc_times ad,
+    argdesc_argargname ad, argdesc_description ad)
 
 instance Eq ArgumentDescription where
    d == e = ad_tup d == ad_tup e
@@ -185,10 +187,12 @@
 -- value for maximum number of times
 unlimited = -1
 
+
 -- Whether two argument descriptions describe the same argument.
 -- Every short or long argument name occurs in only one argument
 -- descriptor (this is checked). Every argument has a short or a long
 -- name (short = [], long = [""] for direct arguments).
+
 same_arg :: ArgumentDescription -> ArgumentDescription -> Bool
 same_arg arg1 arg2 =
    case (argdesc_short_args arg1, argdesc_short_args arg2) of
@@ -198,8 +202,10 @@
                        (_,[])  -> unnamed
                        (l1,l2) -> head l1 == head l2
       _          -> False
-   where unnamed = error "Bug in argument description: nameless, non-direct argument. desc_short or desc_long must be specified."
+   where unnamed = error "Bug in argument description: nameless, non-direct argument. \
+                         \desc_short or desc_long must be specified."
 
+
 -- | A property of a command line argument. These are generated by the
 -- @desc_@... functions, and condensed to argument
 -- descriptions of type @ArgumentDescription@ by @argdesc@. This type is abstract.
@@ -242,7 +248,8 @@
    argvalues' l
    where
       argvalues' ((d,v):r) = if same_arg desc d then v else argvalues' r
-      argvalues' []        = abort "Bug using HsShellScript: Value of unknown argument queried (add it to getarg's list)" desc
+      argvalues' []        = abort "Bug using HsShellScript: Value of unknown argument queried \
+                                   \(add it to getarg's list)" desc
 
 -- used internally to represent one occurence of a specific argument
 type ArgOcc = (ArgumentDescription, Maybe String)
@@ -250,7 +257,8 @@
 
 -- | Error thrown when there is an error in the command line arguments.
 --
--- The usage information is generated by the deprecated function usage_info. Better ignore this, and use the newer @make_usage_info@ or @print_usage_info@.
+-- The usage information is generated by the deprecated function usage_info. Better ignore this, and use the newer
+-- @make_usage_info@ or @print_usage_info@.
 --
 -- See 'make_usage_info', 'print_usage_info', 'usage_info'.
 data ArgError = ArgError {
@@ -269,8 +277,8 @@
    throw (ArgError mess (make_usage_info1 descl))
 
 
--- |
--- Make @ArgError@ an instance of @Exception@, so we can throw and catch it, using GHC-6.10\'s new exception library.
+-- | Make @ArgError@ an instance of @Exception@, so we can throw and catch it, using GHC-6.10\'s new exception
+-- library.
 instance Exception ArgError
 
 
@@ -309,11 +317,9 @@
                  else desc { argdesc_short_args = c : argdesc_short_args desc }
    )
 
--- |
--- Long name of the argument. This specifies a GNU style long name for the argument, which is
--- introduced by two dashes, like @--arg@ or @--arg=...@. There can be specified several names for
--- the same argument. Each argument needs at least either a short or a long name. Except for direct
--- arguments, which don't have a name.
+-- | Long name of the argument. This specifies a GNU style long name for the argument, which is introduced by two
+-- dashes, like @--arg@ or @--arg=...@. There can be specified several names for the same argument. Each argument
+-- needs at least either a short or a long name. Except for direct arguments, which don't have a name.
 --
 -- See 'desc_direct'
 desc_long :: String                     -- ^ The long name of the argument.
@@ -346,7 +352,8 @@
                    , argdesc_argarg = ArgumentValue_required
                    , argdesc_argargname = Just ""
                    }
-         else abort_conflict "desc_direct conflicts with desc_long, desc_short, desc_value_required and desc_value_optional." desc
+         else abort_conflict "desc_direct conflicts with desc_long, desc_short, desc_value_required \
+                             \and desc_value_optional." desc
    )
 
 -- |
@@ -442,11 +449,12 @@
          else abort "Bug in HsShellScript argument description: Multiple argument descriptions specified" desc
    )
 
--- | Specify a tester for this argument. The tester is a function which tests the argument value for format errors. Typically, it tests whether the
--- value can be parsed to some target type. If the test fails, the tester produces an error message. When parsing the command line arguments (which
--- @getargs@ or related), all the testers are applied to the respective argument values, and an 'ArgError' is thrown in case of failure. By using a
--- tester, it can be ensured that the argument values abide a specific format when extracting them, such that they can be parsed without errors, e.g.
--- @myarg = read (reqarg_req args d_myarg)@.
+-- | Specify a tester for this argument. The tester is a function which tests the argument value for format errors.
+-- Typically, it tests whether the value can be parsed to some target type. If the test fails, the tester produces
+-- an error message. When parsing the command line arguments (which @getargs@ or related), all the testers are
+-- applied to the respective argument values, and an 'ArgError' is thrown in case of failure. By using a tester, it
+-- can be ensured that the argument values abide a specific format when extracting them, such that they can be
+-- parsed without errors, e.g. @myarg = read (reqarg_req args d_myarg)@.
 --
 -- An argument tester is a function of type 'Argtester'.
 --
@@ -457,25 +465,27 @@
    (\desc ->
       case argdesc_argarg_tester desc of
          Nothing -> desc { argdesc_argarg_tester = Just t }
-         Just _  -> abort "Bug in HsShellScript argument description: Multiple argument value testers specified" desc
+         Just _  -> abort "Bug in HsShellScript argument description: Multiple argument value testers specified"
+                          desc
    )
 
 
--- |
--- Build an argument tester from a @reads@ like function. Typically, a specialisation of the standard prelude function @read@ is used.
--- Example: @readtester \"Integer expected.\" (reads :: ReadS Int)@
+-- | Build an argument tester from a @reads@ like function. Typically, a specialisation of the standard prelude
+-- function @read@ is used. Example: @readtester \"Integer expected.\" (reads :: ReadS Int)@
 readtester :: ReadS a                           -- Reader function, like the standard prelude function @reads@
            -> String                            -- Additional message
            -> Argtester                         -- Argument tester to be passed to 'desc_tester'
 readtester reader msg val =
    case filter ((== "") . snd) $ reader val of
       [(_,"")] -> Nothing
-      []       -> Just (\arg -> "Format error in the value of the " ++ argname_a arg ++ ". " ++ msg ++ "\nValue: " ++ quote val)
-      _        -> Just (\arg -> "Ambigious value of the " ++ argname_a arg ++ ". " ++ msg ++ "\nValue: " ++ quote val)
+      []       -> Just (\arg -> "Format error in the value of the " ++ argname_a arg ++ ". " ++ msg ++
+                                "\nValue: " ++ quote val)
+      _        -> Just (\arg -> "Ambigious value of the " ++ argname_a arg ++ ". " ++ msg ++ "\nValue: " ++
+                                quote val)
 
 
-{- | Specify that the value of this argument, if present, is a positive integer. This will cause an error when the command line is parsed, and the
-   argument's value doesn't specify an integer.
+{- | Specify that the value of this argument, if present, is a positive integer. This will cause an error when the
+command line is parsed, and the argument's value doesn't specify an integer.
 
 >desc_integer = desc_tester (readtester (reads :: ReadS Int) "Integer expected.")
 
@@ -485,15 +495,17 @@
 desc_integer = desc_tester (readtester (reads :: ReadS Int) "Integer expected.")
 
 
-{- | Specify that the value of this argument, if present, is a non-negative integer. This will cause an error when the command line is parsed, and the
-   value doesn't specify a non-negative integer.
+{- | Specify that the value of this argument, if present, is a non-negative integer. This will cause an error when
+the command line is parsed, and the value doesn't specify a non-negative integer.
 
->desc_nonneg_integer = desc_tester (readtester ((filter (\(a,_) -> a >= 0) . reads) :: ReadS Int) "Non-negative integer expected." )
+>desc_nonneg_integer = desc_tester (readtester ((filter (\(a,_) -> a >= 0) . reads) :: ReadS Int) \
+>                                   "Non-negative integer expected." )
 
    See 'desc_tester'.
 -}
 desc_nonneg_integer :: ArgumentProperty
-desc_nonneg_integer = desc_tester (readtester ((filter (\(a,_) -> a >= 0) . reads) :: ReadS Int) "Non-negative integer expected." )
+desc_nonneg_integer = desc_tester (readtester ((filter (\(a,_) -> a >= 0) . reads) :: ReadS Int)
+                                   "Non-negative integer expected." )
 
 
 abort_conflict msg = abort ("Conflicting properties in argument description. " ++ msg)
@@ -514,7 +526,8 @@
 argname desc =
    if (argdesc_short_args desc, argdesc_long_args desc) == ([],[""]) then "(direct argument)"
       else if (argdesc_short_args desc, argdesc_long_args desc) == ([],[]) then "yet unnamed argument"
-         else concat (intersperse "/" ( map (\s -> "-"++[s]) (argdesc_short_args desc) ++ map ("--" ++) (argdesc_long_args desc) ))
+         else concat (intersperse "/" ( map (\s -> "-"++[s]) (argdesc_short_args desc) ++
+                                        map ("--" ++) (argdesc_long_args desc) ))
 
 -- |
 -- Generate a descriptive argument name from an argument description, beginning
@@ -556,22 +569,22 @@
 >  == "-a/-b Name"
 
 See 'argdesc', 'desc_direct'. 'argname_long'.
--}              
+-}
 argname_short :: ArgumentDescription  -- ^ Argument description, as returned by @argdesc@
               -> String               -- ^ Printable name for the argument
 argname_short desc =
-   if (argdesc_short_args desc, argdesc_long_args desc) == ([],[""]) 
+   if (argdesc_short_args desc, argdesc_long_args desc) == ([],[""])
    then ""
-   else if (argdesc_short_args desc, argdesc_long_args desc) == ([],[]) 
+   else if (argdesc_short_args desc, argdesc_long_args desc) == ([],[])
         then "yet unnamed argument"
-        else 
+        else
            case (argdesc_short_args desc, argdesc_argargname desc) of
               ([], _)         -> ""
               (sl, Just name) -> concat (intersperse "/" (map (\s -> "-" ++ [s]) sl)) ++ " " ++ name
               (sl, Nothing)   -> concat (intersperse "/" (map (\s -> "-" ++ [s]) sl))
-                  
 
 
+
 {- | Create a string, which lists the long forms of one command line argument. If
 it has an subargument, it's name is listed as well. For arguments without long
 form, the result is the empty string.
@@ -594,22 +607,22 @@
 >  == "--foo/--bar Name"
 
 See 'argdesc', 'desc_direct'. 'argname_long'.
--}              
+-}
 argname_long :: ArgumentDescription  -- ^ Argument description, as returned by @argdesc@
              -> String               -- ^ Printable name for the argument
 argname_long desc =
-   if (argdesc_short_args desc, argdesc_long_args desc) == ([],[""]) 
+   if (argdesc_short_args desc, argdesc_long_args desc) == ([],[""])
    then ""
-   else if (argdesc_short_args desc, argdesc_long_args desc) == ([],[]) 
+   else if (argdesc_short_args desc, argdesc_long_args desc) == ([],[])
         then "yet unnamed argument"
-        else 
+        else
            case (argdesc_long_args desc, argdesc_argargname desc) of
               ([], _)         -> ""
               (sl, Just name) -> concat (intersperse "/" (map (\s -> "--" ++ s) sl)) ++ " " ++ name
               (sl, Nothing)   -> concat (intersperse "/" (map (\s -> "--" ++ s) sl))
-                  
 
 
+
 up1 "" = ""
 up1 (x:xs) = toUpper x : xs
 
@@ -629,11 +642,13 @@
                }
    )
 
+
 -- |
 -- Make an argument description from a list of argument properties. This
 -- condenses the list to an argument description,
 -- which can be used by the @getargs@... functions and the
 -- argument value extraction functions.
+
 argdesc :: [ArgumentProperty]     -- ^ List of properties, which describe the command line argument.
         -> ArgumentDescription    -- ^ The corresponding argument description.
 argdesc propl =
@@ -643,8 +658,10 @@
 -- Parse command line arguments.
 getargs0 :: String                      -- Header for usage info
          -> ArgOrder ArgOcc             -- HsShellScript.GetOpt.Permute or HsShellScript.GetOpt.RequireOrder
-                                        --   Permute:      Named arguments (like -x or --arg) and direct arguments may occur in any order.
-                                        --   RequireOrder: All arguments after the first direct argument are regarded as direct arguments.
+                                        --   Permute:      Named arguments (like -x or --arg) and direct arguments
+                                        --                 may occur in any order.
+                                        --   RequireOrder: All arguments after the first direct argument are
+                                        --                 regarded as direct arguments.
          -> [String]                    -- The command line arguments as returned by System.Environment.getArgs
          -> [ArgumentDescription]       -- The arguments descriptions
          -> Either ArgError             -- Error
@@ -661,7 +678,8 @@
        test_unique :: (Show a, Ord a) => (ArgumentDescription -> [a]) -> String -> b -> b
        test_unique extr what x =
            case nonunique (sort (concat (map extr descs))) of
-              Just y -> error ("Bug: Several occurences of " ++ what ++ " " ++ show y ++ " in command line argument specifications")
+              Just y -> error ("Bug: Several occurences of " ++ what ++ " " ++ show y ++
+                               " in command line argument specifications")
               Nothing -> x
 
        optdescr = map make_optdescr descs_regular
@@ -696,9 +714,12 @@
                      )
              _ ->
                 -- several descriptions for direct arguments
-                error "Bug in argument descriptions: Several descriptions for direct arguments (desc_direct) specified."
+                error "Bug in argument descriptions: Several descriptions for direct arguments \
+                      \(desc_direct) specified."
 
-       add :: (ArgumentDescription, Maybe String) -> [(ArgumentDescription, [Maybe String])] -> [(ArgumentDescription, [Maybe String])]
+       add :: (ArgumentDescription, Maybe String)
+           -> [(ArgumentDescription, [Maybe String])]
+           -> [(ArgumentDescription, [Maybe String])]
        add (a,str) []        = [(a,[str])]
        add (b,str) ((a,l):r) =
           if same_arg a b then (a,str:l) : r
@@ -744,7 +765,8 @@
                  case argdesc_argarg_tester desc of
                     Just argdesc_argarg_tester ->
                        if argdesc_argarg desc == ArgumentValue_none
-                          then abort "Bug in HsShellScript argument descriptions: Argument value tester specified,\n\
+                          then abort "Bug in HsShellScript argument descriptions: Argument value tester \
+                                     \specified,\n\
                                      \but no argument value has been allowed. Add desc_value_optional or\n\
                                      \desc_value_required."
                                      desc
@@ -864,8 +886,8 @@
 -- or @--@ no longer take effect.
 --
 -- See 'usage_info', 'make_usage_info', 'print_usage_info'.
-getargs_ordered' :: String                              -- ^ Header to be used by the deprecated @usage_info@ function.
-                 -> [String]                            -- ^ Command line to be parsed.
+getargs_ordered' :: String                        -- ^ Header to be used by the deprecated @usage_info@ function.
+                 -> [String]                      -- ^ Command line to be parsed.
                  -> [ArgumentDescription]         -- ^ The argument descriptions.
                  -> Either ArgError Arguments     -- ^ The contents of the command line.
 getargs_ordered' header args descs = getargs0 header RequireOrder args descs
@@ -911,7 +933,8 @@
          -> [Maybe String]                      -- ^ The occurences of the argument.
 args_opt args desc =
    test_desc desc (argdesc_argarg desc == ArgumentValue_optional && snd (fromJust (argdesc_times desc)) /= 1)
-             "Bug: Querying argument which doesn't take an optional value, or may not occur several times, with args_opt."
+             "Bug: Querying argument which doesn't take an optional value, or may not occur several times, \
+             \with args_opt."
    $ argvalues args desc
 
 -- |
@@ -922,7 +945,8 @@
          -> [String]                            -- ^ The values of the argument.
 args_req args desc =
    test_desc desc (argdesc_argarg desc == ArgumentValue_required && snd (fromJust (argdesc_times desc)) /= 1)
-             "Bug: Querying argument which doesn't require a value, or may not occur several times, with args_req." $
+             "Bug: Querying argument which doesn't require a value, or may not occur several times, with \
+             \args_req." $
    map fromJust (argvalues args desc)
 
 -- |
@@ -935,9 +959,11 @@
            -> Maybe String                      -- ^ The value of the argument, if it occurs.
 reqarg_opt args desc =
    test_desc desc (argdesc_argarg desc == ArgumentValue_optional && argdesc_times desc == Just (1,1))
-             "Bug: Querying argument which doesn't take an optional value, or which must not occur exactly once, with reqarg_opt." $
+             "Bug: Querying argument which doesn't take an optional value, or which must not occur exactly \
+             \once, with reqarg_opt." $
    head (argvalues args desc)
 
+
 -- |
 -- Query the value of a required argument. This is for arguments which must
 -- occur exactly once, and require a value.
@@ -959,11 +985,15 @@
            -> ArgumentDescription         -- ^ Description of the argument.
            -> Maybe (Maybe String)              -- ^ The occurence of the argument and its value (see above).
 optarg_opt args desc =
-   test_desc desc (argdesc_argarg desc == ArgumentValue_optional)  "Bug: Querying argument with non-optional value with optarg_opt." $
-   test_desc desc (fst (fromJust (argdesc_times desc)) == 0)       "Bug: Querying argument which isn't optional with optarg_opt." $
-   test_desc desc (snd (fromJust (argdesc_times desc)) == 1)       "Bug: Querying argument which may occur several times optarg_opt." $
+   test_desc desc (argdesc_argarg desc == ArgumentValue_optional)
+             "Bug: Querying argument with non-optional value with optarg_opt." $
+   test_desc desc (fst (fromJust (argdesc_times desc)) == 0)
+             "Bug: Querying argument which isn't optional with optarg_opt." $
+   test_desc desc (snd (fromJust (argdesc_times desc)) == 1)
+             "Bug: Querying argument which may occur several times optarg_opt." $
    maybe_head (argvalues args desc)
 
+
 -- |
 -- Query the value of an optional argument. This is for optional arguments
 -- which require a value, and may occur at most once. The result is
@@ -973,9 +1003,12 @@
            -> ArgumentDescription         -- ^ Description of the argument.
            -> Maybe String                      -- ^ The value of the argument, if it occurs.
 optarg_req args desc =
-   test_desc desc (argdesc_argarg desc == ArgumentValue_required)        "Bug: Querying argument with non-required value with optarg_req."
-   $ test_desc desc (fst (fromJust (argdesc_times desc)) == 0)          "Bug: Querying argument which isn't optional with optarg_req."
-   $ test_desc desc (snd (fromJust (argdesc_times desc)) == 1)          "Bug: Querying argument which may occur several times optarg_req."
+   test_desc desc (argdesc_argarg desc == ArgumentValue_required)
+             "Bug: Querying argument with non-required value with optarg_req."
+   $ test_desc desc (fst (fromJust (argdesc_times desc)) == 0)
+               "Bug: Querying argument which isn't optional with optarg_req."
+   $ test_desc desc (snd (fromJust (argdesc_times desc)) == 1)
+               "Bug: Querying argument which may occur several times optarg_req."
    $ fmap fromJust (maybe_head (argvalues args desc))
 
 
@@ -1040,8 +1073,8 @@
 -- At least one of the specified arguments must be present.
 --
 -- Otherwise throw an ArgError.
-args_at_least_one :: [ArgumentDescription]        -- ^ List of the arguments, of which at least one must be present.
-                  -> Arguments                    -- ^ Command line parse result.
+args_at_least_one :: [ArgumentDescription]    -- ^ List of the arguments, of which at least one must be present.
+                  -> Arguments                -- ^ Command line parse result.
                   -> IO ()
 args_at_least_one descs args@(Arguments argl) =
    when (occuring descs args == 0) $
@@ -1080,9 +1113,9 @@
    occuring [desc] args == 1
 
 
--- |
--- /Deprecated/. This is left here for backwards compatibility. New programs should use @make_usage_info@ and/or @print_usage_info@.
---
+-- | /Deprecated/. This is left here for backwards compatibility. New programs should use @make_usage_info@ and/or
+-- @print_usage_info@.
+-- 
 -- Get the usage information from the parsed arguments. The usage info
 -- contains the header specified to the corresponding @getargs...@
 -- function, and descriptions of the command line arguments.
@@ -1097,15 +1130,17 @@
 
 
 
-{- | @getargs@ as a pure function, instead of an IO action. This allows to make evaluated command line arguments global values. This calls @getargs@
-   to parse the command line arguments. @GHC.IO.unsafePerformIO@ is used to take the result out of the IO monad.
+{- | @getargs@ as a pure function, instead of an IO action. This allows to make evaluated command line arguments
+global values. This calls @getargs@ to parse the command line arguments. @GHC.IO.unsafePerformIO@ is used to take
+the result out of the IO monad.
 
    >unsafe_getargs header descs = GHC.IO.unsafePerformIO $ getargs "" descs
 
-   The @getargs@ action is performed on demand, when the parse result is evaluated. It may result in an 'ArgError' being thrown. In order to avoid
-   this happening at unexpected times, the @main@ function should, start with the line @seq args (return ())@, where @args@ is the result of
-   @unsafe_getargs@,. This will trigger any command line argument errors at the beginning of the program. (See section 6.2 of the Hakell Report for the
-   definition of @seq@).
+   The @getargs@ action is performed on demand, when the parse result is evaluated. It may result in an 'ArgError'
+   being thrown. In order to avoid this happening at unexpected times, the @main@ function should, start with the
+   line @seq args (return ())@, where @args@ is the result of @unsafe_getargs@,. This will trigger any command line
+   argument errors at the beginning of the program. (See section 6.2 of the Hakell Report for the definition of
+   @seq@).
 
    The header is used only by the deprecated @usage_info@ function. If you don't
    use it, you don't need to specify a header. Just pass an empty string.
@@ -1132,8 +1167,8 @@
    GHC.IO.unsafePerformIO $ getargs header descs
 
 
-{- | @getargs_ordered@ as a pure function, instead of an IO action. This is exactly like @unsafe_getargs@, but using @getargs_ordered@ instead of
-   @getargs@.
+{- | @getargs_ordered@ as a pure function, instead of an IO action. This is exactly like @unsafe_getargs@, but
+   using @getargs_ordered@ instead of @getargs@.
 
    The header is used only by the deprecated @usage_info@ function. If you don't
    use it, you don't need to specify a header. Just pass an empty string.
@@ -1144,7 +1179,7 @@
 
    See 'unsafe_getargs', 'usage_info', 'make_usage_info', 'print_usage_info'.
 -}
-unsafe_getargs_ordered :: String                        -- ^ Header to be used by the deprecated @usage_info@ function.
+unsafe_getargs_ordered :: String                  -- ^ Header to be used by the deprecated @usage_info@ function.
                        -> [ArgumentDescription]   -- ^ The argument descriptions
                        -> Arguments               -- ^ The parsed command line arguments
 unsafe_getargs_ordered header descs =
@@ -1173,18 +1208,21 @@
 -- The specified maximum breadths must fit in the specified width, or an error
 -- is raised. This happens, when @colsleft + colsshort + 2 + colslong + 2 + 2 >
 -- width@.
--- 
+--
 -- See 'print_usage_info', 'getargs', 'usage_info', 'ArgumentDescription',
 -- 'desc_description', 'argdesc', 'terminal_width', 'terminal_width_ioe'.
-make_usage_info :: [ArgumentDescription]                -- ^ List of argument descriptions, as created by a @argdesc@
-                -> Int                                  -- ^ The output is indented this many columns. Probably zero.
-                -> Int                                  -- ^ Maximum width of the column of the short form of each argument. When this many aren't
-                                                        --   needed, less are used.
-                -> Int                                  -- ^ Maximum width of the column of the long form of each argument. When this many aren't
-                                                        --   needed, less are used.
-                -> Int                                  -- ^ Wrap everything at this column. Should probably be the terminal width.
-                -> [String]                             -- ^ Pretty printed usage information, in paragraphs, which contain one or several 
-                                                        --   lines, which are separated by newlines.
+
+make_usage_info :: [ArgumentDescription]      -- ^ List of argument descriptions, as created by a @argdesc@
+                -> Int                        -- ^ The output is indented this many columns. Probably zero.
+                -> Int                        -- ^ Maximum width of the column of the short form of each argument.
+                                              --   When this many aren'tneeded, less are used.
+                -> Int                        -- ^ Maximum width of the column of the long form of each argument.
+                                              --   When this many aren't needed, less are used.
+                -> Int                        -- ^ Wrap everything at this column. Should probably be the
+                                              --   terminal width.
+                -> [String]                   -- ^ Pretty printed usage information, in paragraphs, which contain
+                                              --   one or several lines, which are separated by newlines.
+
 make_usage_info descs colsleft colsshort colslong width =
 
     if colsleft + colsshort + 2 + colslong + 2 + 2 > width
@@ -1194,47 +1232,47 @@
                     \colsshort = " ++ show colsshort ++ "  \n\
                     \colslong  = " ++ show colslong ++ "  \n\
                     \width     = " ++ show width
-       else 
-          map unlines (verbinden (zll' (filter (\d -> not (is_direct d)) 
+       else
+          map unlines (verbinden (zll' (filter (\d -> not (is_direct d))
                                                descs)
                                  ))
-      
+
     where
-          -- Die Argumentbeschreibung, auf die richtige Breite umgebrochen
+          -- The argument description, wrapped to the right width.
           beschr :: ArgumentDescription -> [String]
           beschr desc = wrap (width - colsleft - gesamtbr_kurz - 2 - gesamtbr_lang - 2)
                              (fromMaybe "" (argdesc_description desc))
-   
-          -- Eine ArgumentDescription rendern. Die fertigen Zeilen sind alle gleich viele (mit "" aufgefüllt).
+
+          -- Render an argument description.
           auff1 :: ArgumentDescription 
                 -> ([String], [String], [String])
           auff1 desc = auff (kurzname desc)
                             (langname desc)
                             (beschr desc)
-   
-          -- Wir haben für eine Argumentbeschreibung die Listen von Zeilen, aus denen der kurze, und lange Argumentname besteht, sowie die Zeilen, aus
-          -- denen die Argumentbeschreibung besteht.
+
+          -- Wir haben für eine Argumentbeschreibung die Listen von Zeilen, aus denen der kurze, und lange
+          -- Argumentname besteht, sowie die Zeilen, aus denen die Argumentbeschreibung besteht.
           zus :: ([String], [String], [String]) -> [(String, String, String)]
           zus (as, bs, cs) = zip3 as bs cs
-   
+
           -- Die für die Kurzform einses Arguments benötigte Zahl von Spalten
           kurzbr :: ArgumentDescription -> Int
           kurzbr desc =
              foldr max 0 (map length (kurzname desc))
-   
+
           -- Die für die Langform einses Arguments benötigte Zahl von Spalten
           langbr :: ArgumentDescription -> Int
           langbr desc =
              foldr max 0 (map length (langname desc))
-   
+
           -- Breite der Kurzform, über alle Argumente hinweg
           gesamtbr_kurz =
              foldr max 0 (map (\desc -> kurzbr desc) descs)
-   
+
           -- Breite der Langform, über alle Argumente hinweg
           gesamtbr_lang =
              foldr max 0 (map (\desc -> langbr desc) descs)
-   
+
           -- Breite der Beschreibungen
           breite_descr :: Int
           breite_descr = width - colsleft - gesamtbr_kurz - 2 - gesamtbr_lang - 2
@@ -1244,63 +1282,63 @@
               -> [[(String, String, String)]]
           zll descs =
              map (zus . auff1) descs
-   
+
           -- Für jedes Kommandozeilenargument die Liste der Zeilen, aufgefüllt auf einheitliche Breite
           zll' :: [ArgumentDescription]
                -> [[(String, String, String)]]
-          zll' [] = 
+          zll' [] =
              []
-          zll' descs = 
-             map (\l -> map (\(a,b,c) -> (fuell gesamtbr_kurz a, 
-                                          fuell gesamtbr_lang b, 
+          zll' descs =
+             map (\l -> map (\(a,b,c) -> (fuell gesamtbr_kurz a,
+                                          fuell gesamtbr_lang b,
                                           c))
                             l)
                  (zll descs)
-   
-          -- Die Tripel 
+
+          -- Die Tripel
           verbinden :: [[(String, String, String)]]
                     -> [[String]]
           verbinden l =
-             map (\l' -> map (\(a,b,c) -> take colsleft (repeat ' ') 
+             map (\l' -> map (\(a,b,c) -> take colsleft (repeat ' ')
                                           ++ a ++ "  " ++ b ++ "  " ++ c) l')
                  l
-                 
+
           -- Die Kurzform des angegebenen Arguments. In Zeilen heruntergebrochen,
           -- wenn die Breite colsshort überschritten wird.
           kurzname :: ArgumentDescription -> [String]
           kurzname desc =
              wrap colsshort (argname_short desc)
-   
+
           -- Die Langform des angegebenen Arguments. In Zeilen heruntergebrochen,
           -- wenn die Breite colslong überschritten wird
           langname :: ArgumentDescription -> [String]
           langname desc =
              wrap colslong (argname_long desc)
-   
-          -- Den gegebenen String um so viele Leerzeichen ergänzen, daß daraus ein String der gegebenen Länge wird. Ist er dafür zu lang, denn den
-          -- unveränderten String zurückgeben.
+
+          -- Den gegebenen String um so viele Leerzeichen ergänzen, daß daraus ein String der gegebenen Länge
+          -- wird. Ist er dafür zu lang, denn den unveränderten String zurückgeben.
           fuell :: Int -> String -> String
           fuell br txt =
              txt ++ take (br - length txt) (repeat ' ')
-         
 
+
           -- Complete three lists of Strings. All three strings are made to be made up
           -- of the same number of entries. Missing entries at the end are filled up with
           -- empty strings.
           auff :: [String] -> [String] -> [String] -> ([String], [String], [String])
           auff a b c =
              (reverse x, reverse y, reverse z)
-          
+
              where
                 (x,y,z) = auff' a b c [] [] []
-          
+
                 auff' :: [String] -> [String] -> [String]
                       -> [String] -> [String] -> [String]
                       -> ([String], [String], [String])
-          
+
                 auff' [] [] [] a1 b1 c1 =
                    (a1, b1, c1)
-          
+
                 auff' a b c a1 b1 c1 =
                    auff' (if null a then [] else tail a)
                          (if null b then [] else tail b)
@@ -1308,10 +1346,10 @@
                          ((if null a then "" else head a) : a1)
                          ((if null b then "" else head b) : b1)
                          ((if null c then "" else head c) : c1)
-          
 
 
 
+
 -- |
 -- Print the usage information (about the command line arguments), for the
 -- specified header and arguments to the specified handle. When the handle is
@@ -1329,7 +1367,7 @@
 --
 -- You should specify one long line for each paragraph in the header and the
 -- argument descriptions, and let print_usage_info do the wrapping. When you
--- have several paragraphs, separate them by a double @\\n\\n@. This also applies 
+-- have several paragraphs, separate them by a double @\\n\\n@. This also applies
 -- for an empty line, which should be printed after the actual header.
 --
 -- The arguments are printed in the order, in which they occur in the argument
@@ -1360,20 +1398,20 @@
       else
    -}
 
-   if w < 12 
+   if w < 12
       then hPutStr h "Terminal too narrow"
 
       else do -- Wrap and print the header
               hPutStr h (unlines (wrap w header))
-           
+
               -- Print the argument descriptions.
               mapM_ (hPutStr h)
-                    (make_usage_info descs 
-                                     0 
-                                     (w `div` 5) 
+                    (make_usage_info descs
+                                     0
+                                     (w `div` 5)
                                      (w `div` 3)
                                      w)
-              
+
 
 -- |
 -- Break down a text to lines, such that each one has the specified
diff --git a/src/HsShellScript/Commands.chs b/src/HsShellScript/Commands.chs
--- a/src/HsShellScript/Commands.chs
+++ b/src/HsShellScript/Commands.chs
@@ -25,9 +25,8 @@
 import System.Random
 import System.Directory
 
--- |
--- Do a call to the @realpath(3)@ system library function. This makes the path absolute, normalizes it and expands all symbolic links. In case of an
--- error, an @IOError@ is thrown.
+-- | Do a call to the @realpath(3)@ system library function. This makes the path absolute, normalizes it and
+-- expands all symbolic links. In case of an error, an @IOError@ is thrown.
 realpath :: String    -- ^ path
          -> IO String -- ^ noramlized, absolute path, with symbolic links expanded
 realpath path =
@@ -37,10 +36,11 @@
          then throwErrno' "realpath" Nothing (Just path)
          else peekCString res
 
--- | Determine the target of a symbolic link. This uses the @readlink(2)@ system call. The result is a path which is either absolute, or relative to
--- the directory which the symlink is in. In case of an error, an @IOError@ is thrown. The path is included and can be accessed with
--- @IO.ioeGetFileName@. Note that, if the path to the symlink ends with a slash, this path denotes the directory pointed to, /not/ the symlink. In
--- this case the call to will fail because of \"Invalid argument\".
+-- | Determine the target of a symbolic link. This uses the @readlink(2)@ system call. The result is a path which
+-- is either absolute, or relative to the directory which the symlink is in. In case of an error, an @IOError@ is
+-- thrown. The path is included and can be accessed with @IO.ioeGetFileName@. Note that, if the path to the symlink
+-- ends with a slash, this path denotes the directory pointed to, /not/ the symlink. In this case the call to will
+-- fail because of \"Invalid argument\".
 readlink :: String    -- ^ Path of the symbolic link
          -> IO String -- ^ The link target - where the symbolic link points to
 readlink path =
@@ -50,10 +50,11 @@
          then throwErrno' "readlink" Nothing (Just path)
          else peekCString res
 
--- | Determine the target of a symbolic link. This uses the @readlink(2)@ system call. The target is converted, such that it is relative to the
--- current working directory, if it isn't absolute. Note that, if the path to the symlink ends with a slash, this path denotes the directory pointed
--- to, /not/ the symlink. In this case the call to @readlink@ will fail with an @IOError@ because of \"Invalid argument\". In case of any error, a
--- proper @IOError@ is thrown.
+-- | Determine the target of a symbolic link. This uses the @readlink(2)@ system call. The target is converted,
+-- such that it is relative to the current working directory, if it isn't absolute. Note that, if the path to the
+-- symlink ends with a slash, this path denotes the directory pointed to, /not/ the symlink. In this case the call
+-- to @readlink@ will fail with an @IOError@ because of \"Invalid argument\". In case of any error, a proper
+-- @IOError@ is thrown.
 readlink' :: String     -- ^ path of the symbolic link
           -> IO String  -- ^ target; where the symbolic link points to
 readlink' symlink = do
@@ -61,8 +62,8 @@
    return (absolute_path' target (fst (split_path symlink)))
 
 
--- | Determine whether a path is a symbolic link. The result for a dangling symlink is @True@. The path must exist in the file system. In case of an
--- error, a proper @IOError@ is thrown.
+-- | Determine whether a path is a symbolic link. The result for a dangling symlink is @True@. The path must exist
+-- in the file system. In case of an error, a proper @IOError@ is thrown.
 is_symlink :: String    -- ^ path
            -> IO Bool   -- ^ Whether the path is a symbolic link.
 is_symlink path =
@@ -72,9 +73,10 @@
        (\(ioe::IOError) -> if (ioeGetErrorType ioe == InvalidArgument) then return False else ioError ioe)
 
 
--- | Return the normalised, absolute version of a specified path. The path is made absolute with the current working directory, and is syntactically
--- normalised afterwards. This is the same as what the @realpath@ program reports with the @-s@ option. It's almost the same as what it reports when
--- called from a shell. The difference lies in the shell's idea of the current working directory. See 'cd' for details.
+-- | Return the normalised, absolute version of a specified path. The path is made absolute with the current
+-- working directory, and is syntactically normalised afterwards. This is the same as what the @realpath@ program
+-- reports with the @-s@ option. It's almost the same as what it reports when called from a shell. The difference
+-- lies in the shell's idea of the current working directory. See 'cd' for details.
 --
 -- See 'cd', 'normalise_path'.
 realpath_s :: String    -- ^ path
@@ -84,10 +86,9 @@
       return (normalise_path (absolute_path_by cwd pfad))
 
 
--- |
--- Make a symbolic link. This is the @symlink(2)@ function. Any error results in an @IOError@ thrown. The path of the intended symlink is included in
--- the @IOError@ and
--- can be accessed with @ioeGetFileName@ from the Haskell standard library @IO@.
+-- | Make a symbolic link. This is the @symlink(2)@ function. Any error results in an @IOError@ thrown. The path of
+-- the intended symlink is included in the @IOError@ and can be accessed with @ioeGetFileName@ from the Haskell
+-- standard library @IO@.
 symlink :: String       -- ^ contents of the symlink
         -> String       -- ^ path of the symlink
         -> IO ()
@@ -98,8 +99,7 @@
    when (res == -1) $ throwErrno' ("symlink " ++ shell_quote oldpath ++ " to " ++ shell_quote newpath) Nothing (Just newpath)
 
 
--- |
--- Call the @du@ program. See du(1).
+-- | Call the @du@ program. See du(1).
 du :: (Integral int, Read int, Show int)
    => int               -- ^ block size, this is the @--block-size@ option.
    -> String            -- ^ path of the file or directory to determine the size of
@@ -115,9 +115,8 @@
 
 
 
--- |
--- Create directory. This is a shorthand to @System.Directory.createDirectory@ from the Haskell standard
--- library. In case of an error, the path is included in the @IOError@, which GHC's implementation neglects to do.
+-- | Create directory. This is a shorthand to @System.Directory.createDirectory@ from the Haskell standard library.
+-- In case of an error, the path is included in the @IOError@, which GHC's implementation neglects to do.
 mkdir :: String         -- ^ path
       -> IO ()
 mkdir path = 
@@ -125,10 +124,8 @@
    `catch` (\(ioe::IOError) -> ioError (ioe { ioe_filename = Just path }))
 
 
--- |
--- Remove directory. This is
--- @Directory.removeDirectory@ from the Haskell standard
--- library. In case of an error, the path is included in the @IOError@, which GHC's implementation neglects to do.
+-- | Remove directory. This is @Directory.removeDirectory@ from the Haskell standard library. In case of an error,
+-- the path is included in the @IOError@, which GHC's implementation neglects to do.
 rmdir :: String         -- ^ path
       -> IO ()
 rmdir path = 
@@ -136,26 +133,29 @@
    `catch` (\(ioe::IOError) -> ioError (ioe { ioe_filename = Just path }))
 
 
--- | Remove file. This is @Directory.removeFile@ from the Haskell standard library, which is a direct frontend to the @unlink(2)@ system call in GHC.
+-- | Remove file. This is @Directory.removeFile@ from the Haskell standard library, which is a direct frontend to
+-- the @unlink(2)@ system call in GHC.
 rm :: String         -- ^ path
    -> IO ()
 rm = removeFile
 
 
-{- | Change directory. This is an alias for @Directory.setCurrentDirectory@ from the Haskell standard
-   library. In case of an error, the path is included in the @IOError@, which GHC's implementation neglects to do.
+{- | Change directory. This is an alias for @Directory.setCurrentDirectory@ from the Haskell standard library. In
+case of an error, the path is included in the @IOError@, which GHC's implementation neglects to do.
 
-   Note that this command is subtly different from the shell's @cd@ command. It changes the process' working directory. This is always a realpath.
-   Symlinks are expanded. The shell, on the other hand, keeps track of the current working directory separately, in a different way: symlinks are
-   /not/ expanded. The shell's idea of the working directory is different from the working directory which a process has.
+Note that this command is subtly different from the shell's @cd@ command. It changes the process' working
+directory. This is always a realpath. Symlinks are expanded. The shell, on the other hand, keeps track of the
+current working directory separately, in a different way: symlinks are /not/ expanded. The shell's idea of the
+working directory is different from the working directory which a process has.
 
-   This means that the same sequence of @cd@ commands, when done in a real shell script, will lead into the same directory. But the working directory
-   as reported by the shell's @pwd@ command may differ from the corresponding one, reported by @getCurrentDirectory@.
+This means that the same sequence of @cd@ commands, when done in a real shell script, will lead into the same
+directory. But the working directory as reported by the shell's @pwd@ command may differ from the corresponding
+one, reported by @getCurrentDirectory@.
 
-   (When talking about the \"shell\", I'm talking about bash, regardless of whether started as @\/bin\/bash@ or in compatibility mode, as @\/bin\/sh@. I
-   presume it's the standard behavior for the POSIX standard shell.)
+(When talking about the \"shell\", I'm talking about bash, regardless of whether started as @\/bin\/bash@ or in
+compatibility mode, as @\/bin\/sh@. I presume it's the standard behavior for the POSIX standard shell.)
 
-   See 'pwd', 'with_wd'
+See 'pwd', 'with_wd'
 -}
 cd :: String         -- ^ path
    -> IO ()
@@ -177,8 +177,8 @@
 
 
 
--- | Change the working directory temporarily. This executes the specified IO action with a new working directory, and restores it afterwards
--- (exception-safely).
+-- | Change the working directory temporarily. This executes the specified IO action with a new working directory,
+-- and restores it afterwards (exception-safely).
 with_wd :: FilePath     -- ^ New working directory
         -> IO a         -- ^ Action to run
         -> IO a
@@ -221,8 +221,9 @@
 -- |
 -- Execute the mv program. 
 --
--- This calls the @\/bin\/mv@ to rename a file, or move it to another directory. You can move a file to another file system with this.
--- This starts a new process, which is rather slow. Consider using @rename@ instead, when possible.
+-- This calls the @\/bin\/mv@ to rename a file, or move it to another directory. You can move a file to another
+-- file system with this. This starts a new process, which is rather slow. Consider using @rename@ instead, when
+-- possible.
 --
 -- See 'rename'.
 mv :: String    -- ^ source
@@ -280,11 +281,9 @@
 
 
 
--- |
--- The @rename(2)@ system call to rename and\/or move a file. The @renameFile@ action from the Haskell standard library doesn\'t do it, because
--- the two paths may not refer to directories. Failure results in an @IOError@ thrown. The /new/ path is included in
--- the @IOError@ and
--- can be accessed with @IO.ioeGetFileName@.
+-- | The @rename(2)@ system call to rename and\/or move a file. The @renameFile@ action from the Haskell standard
+-- library doesn\'t do it, because the two paths may not refer to directories. Failure results in an @IOError@
+-- thrown. The /new/ path is included in the @IOError@ and can be accessed with @IO.ioeGetFileName@.
 rename :: String        -- ^ Old path
        -> String        -- ^ New path
        -> IO ()
@@ -296,9 +295,8 @@
 
 
 
--- |
--- Rename a file. This first tries 'rename', which is most efficient. If it fails, because source and target path point to different file systems
--- (as indicated by the @errno@ value @EXDEV@), then @\/bin\/mv@ is called.
+-- | Rename a file. This first tries 'rename', which is most efficient. If it fails, because source and target path
+-- point to different file systems (as indicated by the @errno@ value @EXDEV@), then @\/bin\/mv@ is called.
 --
 -- See 'rename', 'mv'.
 rename_mv :: FilePath           -- ^ Old path
@@ -309,8 +307,9 @@
       `catch` (\(ioe::IOError) -> 
                           if ioeGetErrorType ioe == UnsupportedOperation
                              then do errno <- getErrno
-                                     -- Foreign.C.Error.errnoToIOError matches many errno values to UnsupportedOperation. In order to determine
-                                     -- if it is the right one, the errno is taken again. This relies on no system calls in between.
+                                     -- Foreign.C.Error.errnoToIOError matches many errno values to
+                                     -- UnsupportedOperation. In order to determine if it is the right one, the
+                                     -- errno is taken again. This relies on no system calls in between.
                                      if (errno == eXDEV)
                                         then run "/bin/mv" ["--", old, new]
                                         else ioError ioe
@@ -318,14 +317,15 @@
                  )
 
 
-{- | Rename a file or directory, and cope with read only issues.
+{- | Rename a file or directory, and manage read only issues.
 
-This renames a file or directory, using @rename@, sets the necessary write permissions beforehand, and restores them afterwards. This is more
-efficient than @force_mv@, because no external program needs to be called, but it can rename files only inside the same file system. See @force_cmd@
-for a detailed description.
+This renames a file or directory, using @rename@, sets the necessary write permissions beforehand, and restores
+them afterwards. This is more efficient than @force_mv@, because no external program needs to be called, but it can
+rename files only inside the same file system. See @force_cmd@ for a detailed description.
 
-The new path may be an existing directory. In this case, it is assumed that the old file is to be moved into this directory (like with @mv@). The
-new path is then completed with the file name component of the old path. You won't get an \"already exists\" error.
+The new path may be an existing directory. In this case, it is assumed that the old file is to be moved into this
+directory (like with @mv@). The new path is then completed with the file name component of the old path. You won't
+get an \"already exists\" error.
 
 >force_rename = force_cmd rename
 
@@ -337,11 +337,11 @@
 force_rename = force_cmd HsShellScript.Commands.rename
 
 
-{- | Move a file or directory, and cope with read only issues.
+{- | Move a file or directory, and manage read only issues.
 
-This moves a file or directory, using the external command @mv@, sets the necessary write permissions beforehand, and restores them afterwards.
-This is less efficient than @force_rename@, because the external program @mv@ needs to be called, but it can move files between file systems. See
-@force_cmd@ for a detailed description.
+This moves a file or directory, using the external command @mv@, sets the necessary write permissions beforehand,
+and restores them afterwards. This is less efficient than @force_rename@, because the external program @mv@ needs
+to be called, but it can move files between file systems. See @force_cmd@ for a detailed description.
 
 >force_mv src tgt = fill_in_location "force_mv" $ force_cmd (\src tgt -> run "/bin/mv" ["--", src, tgt]) src tgt
 
@@ -355,12 +355,12 @@
       force_cmd (\src tgt -> run "/bin/mv" ["--", src, tgt]) src tgt
 
 
-{- | Rename a file with 'rename', or when necessary with 'mv', and cope with read only issues.
+{- | Rename a file with 'rename', or when necessary with 'mv', and manage read only issues.
 
 The necessary write permissions are set, then the file is renamed, then the permissions are restored.
 
-First, the 'rename' system call is tried, which is most efficient. If it fails, because source and target path point to different file systems
-(as indicated by the @errno@ value @EXDEV@), then @\/bin\/mv@ is called.
+First, the 'rename' system call is tried, which is most efficient. If it fails, because source and target path
+point to different file systems (as indicated by the @errno@ value @EXDEV@), then @\/bin\/mv@ is called.
 
 >force_rename_mv old new = fill_in_location "force_rename_mv" $ force_cmd rename_mv old new
 
@@ -374,26 +374,29 @@
       force_cmd rename_mv old new
 
 
-{- | Call a command which moves a file or directory, and cope with read only issues.
+{- | Call a command which moves a file or directory, and manage read only issues.
 
-This function is for calling a command, which renames files. Beforehand, write permissions are set in order to enable the
-operation, and afterwards the permissions are restored. The command is meant to be something like @rename@ or @run \"\/bin\/mv\"@.
+This function is for calling a command, which renames files. Beforehand, write permissions are set in order to
+enable the operation, and afterwards the permissions are restored. The command is meant to be something like
+@rename@ or @run \"\/bin\/mv\"@.
 
-In order to change the name of a file or dirctory, but leave it in the super directory
-it is in, the super directory must be writeable. In order to move a file or directory to a different super directory, both super directories and
-the file\/directory to be moved must be writeable. I don't know what this behaviour is supposed to be good for.
+In order to change the name of a file or dirctory, but leave it in the super directory it is in, the super
+directory must be writeable. In order to move a file or directory to a different super directory, both super
+directories and the file\/directory to be moved must be writeable. I don't know what this behaviour is supposed to
+be good for.
 
-This function copes with the case that the file\/directory to be moved or renamed, or the super directories are read only. It makes the necessary
-places writeable, calls the command, and makes them read only again, if they were before. The user needs the necessary permissions for changing the
-corresponding write permissions. If an error occurs (such as file not found, or insufficient permissions), then the write permissions are restored
-to the state before, before the exception is passed through to the caller.
+This function concerns itself with the case that the file\/directory to be moved or renamed, or the super
+directories are read only. It makes the necessary places writeable, calls the command, and makes them read only
+again, if they were before. The user needs the necessary permissions for changing the corresponding write
+permissions. If an error occurs (such as file not found, or insufficient permissions), then the write permissions
+are restored to the state before, before the exception is passed through to the caller.
 
-The command must take two arguments, the old path and the new path. It is expected to create the new path in the file system, such that the correct
-write permissions of the new path can be set by @force_cmd@ after executing it.
+The command must take two arguments, the old path and the new path. It is expected to create the new path in the
+file system, such that the correct write permissions of the new path can be set by @force_cmd@ after executing it.
 
-The new path may be an existing directory. In this case, it is assumed that the old file is to be moved into this directory (like with @mv@). The
-new path is completed with the file name component of the old path, before it is passed to the command, such that the command is supplied the
-complete new path.
+The new path may be an existing directory. In this case, it is assumed that the old file is to be moved into this
+directory (like with @mv@). The new path is completed with the file name component of the old path, before it is
+passed to the command, such that the command is supplied the complete new path.
 
 Examples:
 
@@ -429,8 +432,8 @@
 
 
 
-{- | Make a file or directory writeable for the user, perform an action, and restore its writeable status. An IOError is raised when the user doesn't
-   have permission to make the file or directory writeable.
+{- | Make a file or directory writeable for the user, perform an action, and restore its writeable status. An
+IOError is raised when the user doesn't have permission to make the file or directory writeable.
 
 >force_writeable path io = force_writeable2 path (io >>= \res -> return (path, res))
 
@@ -449,13 +452,15 @@
       force_writeable2 path (io >>= \res -> return (path, res))
 
 
-{- | Make a file or directory writeable for the user, perform an action, and restore its writeable status. The action may change the name of the file
-   or directory. Therefore it returns the new name, along with another return value, which is passed to the caller.
+{- | Make a file or directory writeable for the user, perform an action, and restore its writeable status. The
+action may change the name of the file or directory. Therefore it returns the new name, along with another return
+value, which is passed to the caller.
 
-   The writeable status is only changed back if it has been changed by @force_writeable2@ before. An IOError is raised when the user doesn'h have
-   permission to make the file or directory writeable, or when the new path doesn't exist.
+The writeable status is only changed back if it has been changed by @force_writeable2@ before. An IOError is
+raised when the user doesn'h have permission to make the file or directory writeable, or when the new path
+doesn't exist.
 
-   See 'force_cmd', 'force_writeable'.
+See 'force_cmd', 'force_writeable'.
 -}
 force_writeable2 :: String          -- ^ File or directory to make writeable
                  -> IO (String, a)  -- ^ Action to perform
@@ -470,7 +475,8 @@
                (\(e::SomeException) -> 
                       do when (not writeable) $
                             catch (set_user_readonly path_before)
-                                  ignore                        -- Don't let failure to restore the status make us loose the actual exception
+                                  ignore                        -- Don't let failure to restore the status make
+                                                                -- us loose the actual exception.
                          throwIO e
                )
          when (not writeable) $ set_user_readonly path_after
@@ -489,22 +495,21 @@
          fill_in_filename path $ setFileMode' path (filemode .&. (complement ownerWriteMode))
 
 
--- |
--- Call the @fdupes@ program in order to find identical files. It outputs a
--- list of groups of file names, such that the files in each group are
--- identical. Each of these groups is further analysed by the @fdupes@
--- action. It is split to a list of lists of paths, such that each list
--- of paths corresponds to one of the directories which have been searched
--- by the @fdupes@ program. If you just want groups of identical files, then apply @map concat@ to the result.
+-- | Call the @fdupes@ program in order to find identical files. It outputs a list of groups of file names, such
+-- that the files in each group are identical. Each of these groups is further analysed by the @fdupes@ action.
+-- It is split to a list of lists of paths, such that each list of paths corresponds to one of the directories
+-- which have been searched by the @fdupes@ program. If you just want groups of identical files, then apply @map
+-- concat@ to the result.
 --
--- /The/ @fdupes@ /program doesn\'t handle multiple occurences of the same directory, or in recursive mode one specified directory containing another,
--- properly. The same file may get reported multiple times, and identical files may not get reported./
+-- /The/ @fdupes@ /program doesn\'t handle multiple occurences of the same directory, or in recursive mode one
+-- specified directory containing another, properly. The same file may get reported multiple times, and identical
+-- files may not get reported./
 --
 -- The paths are normalised (using 'normalise_path').
 fdupes :: [String]              -- ^ Options for the fdupes program
        -> [String]              -- ^ Directories with files to compare
-       -> IO [[[String]]]       -- ^ For each set of identical files, and each of the specified directories, the paths of the identical files in this
-                                --   directory.
+       -> IO [[[String]]]       -- ^ For each set of identical files, and each of the specified directories,
+                                -- the paths of the identical files in this directory.
 fdupes opts paths = do
    let paths'  = map normalise_path paths
        paths'' = map (++"/") paths'
diff --git a/src/HsShellScript/Misc.chs b/src/HsShellScript/Misc.chs
--- a/src/HsShellScript/Misc.chs
+++ b/src/HsShellScript/Misc.chs
@@ -22,9 +22,8 @@
 
 
 
--- |
--- Format an @Int@ with leading zeros. If the string representation of the @Inŧ@ is longer than the number of characters to fill up, this produces as 
--- many characters as needed.
+-- | Format an @Int@ with leading zeros. If the string representation of the @Inŧ@ is longer than the number of
+-- characters to fill up, this produces as many characters as needed.
 zeros :: Int            -- ^ How many characters to fill up
       -> Int            -- ^ Value to represent as a string
       -> String         -- ^ String representation of the value, using the specified number of characters
@@ -46,13 +45,11 @@
                in  if xs' == "" && x == '\n' then "" else x:xs'
 
 
-{- | Get contents of a file or of @stdin@. This is a simple frontend to
-@hGetContents@. A file name of @\"-\"@ designates stdin. The contents are read
-lazily as the string is evaluated.
+{- | Get contents of a file or of @stdin@. This is a simple frontend to @hGetContents@. A file name of @\"-\"@
+designates stdin. The contents are read lazily as the string is evaluated.
 
-(The handle which we read from will be in semi-closed state. Once all input
-has read, it is closed automatically (Haskell Library Report 11.2.1).
-Therefore we don't need to return it).
+(The handle which we read from will be in semi-closed state. Once all input has read, it is closed automatically
+(Haskell Library Report 11.2.1). Therefore we don't need to return it).
 
 >lazy_contents path = do
 >    h   <- if path == "-" then return stdin else openFile path ReadMode
@@ -64,10 +61,10 @@
     h <- if path == "-" then return stdin else openFile path ReadMode
     hGetContents h
 
--- |
--- Get contents of a file or of @stdin@ eagerly. This is the
--- same as @lazy_contents@, except for the contents being
--- read immediately.
+
+-- | Get contents of a file or of @stdin@ eagerly. This is the same as @lazy_contents@, except for the contents
+-- being read immediately.
+
 contents :: String              -- ^ either the name of a file, or @\"-\"@ for @stdin@
          -> IO String           -- ^ the contents of the file or of standard input
 contents pfad = do
@@ -76,9 +73,8 @@
     return txt
 
 
--- |
--- Test for the existence of a path. This is the disjunction of
--- @Directory.doesDirectoryExist@ and @Directory.doesFileExist@. For an dangling symlink, this will return @False@.
+-- | Test for the existence of a path. This is the disjunction of @Directory.doesDirectoryExist@ and
+-- @Directory.doesFileExist@. For an dangling symlink, this will return @False@.
 path_exists :: String    -- ^ Path
             -> IO Bool   -- ^ Whether the path exists in the file system
 path_exists pfad = do
@@ -87,9 +83,8 @@
     return (de || fe)
 
 
--- |
--- Test for the existence of a path. This uses @System.Posix.Files.getFileStatus@ to determine whether the path exists in any form in the file system.
--- For a dangling symlink, the result is @True@.
+-- | Test for the existence of a path. This uses @System.Posix.Files.getFileStatus@ to determine whether the path
+-- exists in any form in the file system. For a dangling symlink, the result is @True@.
 path_exists' :: String    -- ^ Path
              -> IO Bool   -- ^ Whether the path exists in the file system
 path_exists' path =
@@ -100,9 +95,8 @@
                                         else ioError ioe)
              
 
--- |
--- Test if path points to a directory. This will return @True@ for a symlink pointing to a directory. It's a shortcut for
--- @Directory.doesDirectoryExist@.
+-- | Test if path points to a directory. This will return @True@ for a symlink pointing to a directory. It's a
+-- shortcut for @Directory.doesDirectoryExist@.
 is_dir :: String        -- ^ Path
        -> IO Bool       -- ^ Whether the path exists and points to a directory.
 is_dir = doesDirectoryExist
@@ -116,9 +110,9 @@
 is_file = doesFileExist
 
 
--- |
--- This is the @System.Posix.Files.getFileStatus@ function from the GHC libraries, with improved error reporting. The GHC function doesn't include the
--- file name in the @IOError@ when the call fails, making error messages much less useful. @getFileStatus\'@ rectifies this.
+-- | This is the @System.Posix.Files.getFileStatus@ function from the GHC libraries, with improved error reporting.
+-- The GHC function doesn't include the file name in the @IOError@ when the call fails, making error messages much
+-- less useful. @getFileStatus\'@ rectifies this.
 --
 -- See 'System.Posix.Files.getFileStatus'.
 getFileStatus' :: FilePath              -- ^ Path of the file, whose status is to be queried
@@ -128,9 +122,9 @@
       `catch` (\ioe -> ioError (ioe { ioe_filename = Just path }))
 
 
--- |
--- This is the @System.Posix.Files.fileAccess@ function from the GHC libraries, with improved error reporting. The GHC function doesn't include the
--- file name in the @IOError@ when the call fails, making error messages much less useful. @fileAccess\'@ rectifies this.
+-- | This is the @System.Posix.Files.fileAccess@ function from the GHC libraries, with improved error reporting.
+-- The GHC function doesn't include the file name in the @IOError@ when the call fails, making error messages much
+-- less useful. @fileAccess\'@ rectifies this.
 --
 -- See 'System.Posix.Files.fileAccess'.
 fileAccess' :: FilePath -> Bool -> Bool -> Bool -> IO Bool
@@ -139,15 +133,16 @@
       `catch` (\ioe -> ioError (ioe { ioe_filename = Just p }))
 
 
--- |
--- Create a temporary file. This will create a new, empty file, with a path which did not previously exist in the file system. The path consists
--- of the specified prefix, a sequence of random characters (digits and letters), and the specified suffix. The file is created with read-write
--- permissions for the user, and no permissons for the group and others. The ownership is set to the effective user ID of the process. The group
--- ownership is set either to the effective group ID of the process or to the group ID of the parent directory (depending on filesystem type and mount
--- options on Linux - see @open(2)@ for details).
+-- | Create a temporary file. This will create a new, empty file, with a path which did not previously exist in the
+-- file system. The path consists of the specified prefix, a sequence of random characters (digits and letters),
+-- and the specified suffix. The file is created with read-write permissions for the user, and no permissons for
+-- the group and others. The ownership is set to the effective user ID of the process. The group ownership is set
+-- either to the effective group ID of the process or to the group ID of the parent directory (depending on
+-- filesystem type and mount options on Linux - see @open(2)@ for details).
 --
 -- See 'tmp_file', 'temp_dir', 'with_temp_file'.
-temp_file :: Int                        -- ^ Number of random characters to intersperse. Must be large enough, such that most combinations can't already
+temp_file :: Int                        -- ^ Number of random characters to intersperse. Must be large enough,
+                                        -- such that most combinations can't already
                                         -- exist.
           -> String                     -- ^ Prefix for the path to generate.
           -> String                     -- ^ Suffix for the path to generate.
@@ -169,19 +164,20 @@
    when (res == -1) $ throwErrno' "temp_file" Nothing (Just path)
    return path
 
--- |
--- Create a temporary directory. This will create a new directory, with a path which did not previously exist in the file system. The path consists
--- of the specified prefix, a sequence of random characters (digits and letters), and the specified suffix. The directory is normally created with
--- read-write-execute permissions for the user, and no permissons for the group and others. But this may be further restricted by the process's umask
+-- | Create a temporary directory. This will create a new directory, with a path which did not previously exist in
+-- the file system. The path consists of the specified prefix, a sequence of random characters (digits and
+-- letters), and the specified suffix. The directory is normally created with read-write-execute permissions for
+-- the user, and no permissons for the group and others. But this may be further restricted by the process's umask
 -- in the usual way.
 --
--- The newly created directory will be owned by the effective uid of the process.  If the directory containing the it has the  set  group
--- id  bit  set, or if the filesystem is mounted with BSD group semantics, the new directory will inherit the group ownership from its parent;
--- otherwise it will be owned by the effective gid of the process. (See @mkdir(2)@)
+-- The newly created directory will be owned by the effective uid of the process. If the directory containing the
+-- it has the set group id bit set, or if the filesystem is mounted with BSD group semantics, the new directory
+-- will inherit the group ownership from its parent; otherwise it will be owned by the effective gid of the
+-- process. (See @mkdir(2)@)
 --
 -- See 'tmp_dir', 'temp_file', 'with_temp_dir'.
-temp_dir :: Int                        -- ^ Number of random characters to intersperse. Must be large enough, such that most combinations can't already
-                                       -- exist.
+temp_dir :: Int                        -- ^ Number of random characters to intersperse. Must be large enough,
+                                       -- such that most combinations can't already exist.
          -> String                     -- ^ Prefix for the path to generate.
          -> String                     -- ^ Suffix for the path to generate.
          -> IO FilePath                -- ^ Generated path.
@@ -199,9 +195,9 @@
                         )
    return path
 
--- |
--- Create a temporary file. This will create a new, empty file, with read-write permissions for the user, and no permissons for the group and others.
--- The path consists of the specified prefix, a dot, and six random characters (digits and letters).
+-- | Create a temporary file. This will create a new, empty file, with read-write permissions for the user, and no
+-- permissons for the group and others. The path consists of the specified prefix, a dot, and six random characters
+-- (digits and letters).
 --
 -- @tmp_file prefix = temp_file 6 (prefix ++ \".\") \"\"@
 --
@@ -211,10 +207,9 @@
 tmp_file prefix = temp_file 6 (prefix ++ ".") ""
 
 
--- |
--- Create a temporary directory. This will create a new directory, with read-write-execute permissions for the user (unless further restricted by the
--- process's umask), and no permissons for the group and others.
--- The path consists of the specified prefix, a dot, and six random characters (digits and letters).
+-- | Create a temporary directory. This will create a new directory, with read-write-execute permissions for the
+-- user (unless further restricted by the process's umask), and no permissons for the group and others. The path
+-- consists of the specified prefix, a dot, and six random characters (digits and letters).
 --
 -- @tmp_dir prefix = temp_dir 6 (prefix ++ \".\") \"\"@
 --
@@ -224,13 +219,13 @@
 tmp_dir prefix = temp_dir 6 (prefix ++ ".") ""
 
 
--- |
--- Create and open a temporary file, perform some action with it, and delete it afterwards. This is a front end to the 'temp_file' function. The file
--- and its path are created in the same way. The IO action is passed a handle of the new file. When it finishes - normally or with an exception -
--- the file is deleted.
+-- | Create and open a temporary file, perform some action with it, and delete it afterwards. This is a front end
+-- to the 'temp_file' function. The file and its path are created in the same way. The IO action is passed a handle
+-- of the new file. When it finishes - normally or with an exception - the file is deleted.
 --
 -- See 'temp_file', 'with_tmp_file', 'with_temp_dir'.
-with_temp_file :: Int                        -- ^ Number of random characters to intersperse. Must be large enough, such that most combinations can't
+with_temp_file :: Int                        -- ^ Number of random characters to intersperse. Must be large enough,
+                                             -- such that most combinations can't
                                              -- already exist.
                -> String                     -- ^ Prefix for the path to generate.
                -> String                     -- ^ Suffix for the path to generate.
@@ -251,19 +246,19 @@
 
 
 
--- |
--- Create a temporary directory, perform some action with it, and delete it afterwards. This is a front end to the 'temp_dir' function. The directory
--- and its path are created in the same way. The IO action is passed the path of the new directory. When it finishes - normally or with an exception -
--- the directory is deleted.
+-- | Create a temporary directory, perform some action with it, and delete it afterwards. This is a front end to
+-- the 'temp_dir' function. The directory and its path are created in the same way. The IO action is passed the
+-- path of the new directory. When it finishes - normally or with an exception - the directory is deleted.
 --
--- The action must clean up any files it creates inside the directory by itself. @with_temp_dir@ doesn't delete any files inside, so the directory
--- could be removed. If the directory isn't empty, an @IOError@ results (with the path filled in). When the action throws an exception, and the
--- temporary directory cannot be removed, then the exception is passed through, rather than replacing it with the IOError. (This is because it's
--- probably exactly because of that exception that the directory isn't empty and can't be removed).
+-- The action must clean up any files it creates inside the directory by itself. @with_temp_dir@ doesn't delete any
+-- files inside, so the directory could be removed. If the directory isn't empty, an @IOError@ results (with the
+-- path filled in). When the action throws an exception, and the temporary directory cannot be removed, then the
+-- exception is passed through, rather than replacing it with the IOError. (This is because it's probably exactly
+-- because of that exception that the directory isn't empty and can't be removed).
 --
 -- See 'temp_dir', 'with_tmp_dir', 'with_temp_file'.
-with_temp_dir :: Int                        -- ^ Number of random characters to intersperse. Must be large enough, such that most combinations can't
-                                            --   already exist.
+with_temp_dir :: Int                        -- ^ Number of random characters to intersperse. Must be large enough,
+                                            --   such that most combinations can't already exist.
               -> String                     -- ^ Prefix for the path to generate.
               -> String                     -- ^ Suffix for the path to generate.
               -> (FilePath -> IO a)         -- ^ Action to perform.
@@ -281,10 +276,9 @@
                     `catch` (\ioe -> ioError (ioe { ioe_filename = Just path }))
 
 
--- |
--- Create and open a temporary file, perform some action with it, and delete it afterwards. This is a front end to the 'tmp_file' function. The file
--- and its path are created in the same way. The IO action is passed a handle of the new file. When it finishes - normally or with an exception -
--- the file is deleted.
+-- | Create and open a temporary file, perform some action with it, and delete it afterwards. This is a front end
+-- to the 'tmp_file' function. The file and its path are created in the same way. The IO action is passed a handle
+-- of the new file. When it finishes - normally or with an exception - the file is deleted.
 --
 -- See 'tmp_file', 'with_temp_file', 'with_tmp_dir'.
 with_tmp_file :: String                     -- ^ Prefix for the path to generate.
@@ -304,15 +298,15 @@
                return e
           )
 
--- |
--- Create a temporary directory, perform some action with it, and delete it afterwards. This is a front end to the 'tmp_dir' function. The directory
--- and its path are created in the same way. The IO action is passed the path of the new directory. When it finishes - normally or with an exception -
--- the directory is deleted.
+-- | Create a temporary directory, perform some action with it, and delete it afterwards. This is a front end to
+-- the 'tmp_dir' function. The directory and its path are created in the same way. The IO action is passed the path
+-- of the new directory. When it finishes - normally or with an exception - the directory is deleted.
 --
--- The action must clean up any files it creates inside the directory by itself. @with_temp_dir@ doesn't delete any files inside, so the directory
--- could be removed. If the directory isn't empty, an @IOError@ results (with the path filled in). When the action throws an exception, and the
--- temporary directory cannot be removed, then the exception is passed through, rather than replacing it with the IOError. (This is because it's
--- probably exactly because of that exception that the directory isn't empty and can't be removed).
+-- The action must clean up any files it creates inside the directory by itself. @with_temp_dir@ doesn't delete any
+-- files inside, so the directory could be removed. If the directory isn't empty, an @IOError@ results (with the
+-- path filled in). When the action throws an exception, and the temporary directory cannot be removed, then the
+-- exception is passed through, rather than replacing it with the IOError. (This is because it's probably exactly
+-- because of that exception that the directory isn't empty and can't be removed).
 --
 -- >with_tmp_dir prefix io = with_temp_dir 6 (prefix ++ ".") "" io
 --
@@ -323,17 +317,18 @@
 with_tmp_dir prefix io = with_temp_dir 6 (prefix ++ ".") "" io
 
 
--- |
--- Create a temporary path. This will generate a path which does not yet exist in the file system. It consists of the specified prefix, a
--- sequence of random characters (digits and letters), and the specified suffix.
+-- | Create a temporary path. This will generate a path which does not yet exist in the file system. It consists of
+-- the specified prefix, a sequence of random characters (digits and letters), and the specified suffix.
 --
--- /Avoid relying on the generated path not to exist in the file system./ Or else you'll get a potential race condition, since some other process might
--- create the path after @temp_path@, before you use it. This is a security risk. The global random number generator (@Random.randomRIO@) is used to
--- generate the random characters. These might not be that random after all, and could potentially be guessed. Rather use @temp_file@ or @temp_dir@.
+-- /Avoid relying on the generated path not to exist in the file system./ Or else you'll get a potential race
+-- condition, since some other process might create the path after @temp_path@, before you use it. This is a
+-- security risk. The global random number generator (@Random.randomRIO@) is used to generate the random
+-- characters. These might not be that random after all, and could potentially be guessed. Rather use @temp_file@
+-- or @temp_dir@.
 --
 -- See 'temp_file', 'temp_dir'.
-temp_path :: Int                        -- ^ Number of random characters to intersperse. Must be large enough, such that most combinations can't already
-                                        -- exist.
+temp_path :: Int                        -- ^ Number of random characters to intersperse. Must be large enough,
+                                        -- such that most combinations can't already exist.
           -> String                     -- ^ Prefix for the path to generate.
           -> String                     -- ^ Suffix for the path to generate.
           -> IO FilePath                -- ^ Generated path.
@@ -354,8 +349,8 @@
         else untilIO io cond
 
 
-{- | One entry of mount information. This is the same as @struct mntent@ from @\<mntent.h\>@.
-A list of these is returned by the functions which read mount information.
+{- | One entry of mount information. This is the same as @struct mntent@ from @\<mntent.h\>@. A list of these is
+returned by the functions which read mount information.
 
 See 'read_mounts', 'read_mtab', 'read_fstab'.
 -}
@@ -368,7 +363,8 @@
                      }
    deriving (Read, Show, Typeable, Eq)
 
-{- | Read mount information. This is a front end to the @setmntent(3)@, @getmntent(3)@, @endmntent(3)@ system library functions.
+{- | Read mount information. This is a front end to the @setmntent(3)@, @getmntent(3)@, @endmntent(3)@ system
+library functions.
 
 When the @setmntent@ call fails, the @errno@ value is converted to an @IOError@ and thrown.
 
@@ -424,9 +420,9 @@
 read_fstab = read_mounts "/etc/fstab"
 
 
--- Taken from the source code of the GHC 6 libraries (in System.Posix.Internals). It isn't exported from there. "HsBase.h" belongs to the files which
--- are visible to users of GHC, but it isn't documented. The comment at the beginning says "Definitions for package `base' which are visible in
--- Haskell land.".
+-- Taken from the source code of the GHC 6 libraries (in System.Posix.Internals). It isn't exported from there.
+-- "HsBase.h" belongs to the files which are visible to users of GHC, but it isn't documented. The comment at the
+-- beginning says "Definitions for package `base' which are visible in Haskell land.".
 foreign import ccall unsafe "HsBase.h __hscore_o_creat"  o_CREAT  :: CInt
 foreign import ccall unsafe "HsBase.h __hscore_o_excl"   o_EXCL   :: CInt
 
@@ -519,8 +515,8 @@
 int close(int fd);
 
 
-/* open(2) is defined in fcntl.h as "extern int open (__const char *__file, int __oflag, ...)", with variable number of arguments, which isn's
-   supported by the FFI.
+/* open(2) is defined in fcntl.h as "extern int open (__const char *__file, int __oflag, ...)", with variable
+   number of arguments, which isn's supported by the FFI.
 */
 int hsshellscript_open_nonvariadic(const char *pathname, int flags, mode_t mode);
 
diff --git a/src/HsShellScript/Paths.hs b/src/HsShellScript/Paths.hs
--- a/src/HsShellScript/Paths.hs
+++ b/src/HsShellScript/Paths.hs
@@ -57,15 +57,16 @@
 
 
 {- | Normalise a path. This is done by reducing repeated @\/@ characters to one, and removing
-   @.@ path components. @..@ path components are left intact, because of possible symlinks.
+@.@ path components. @..@ path components are left intact, because of possible symlinks.
 
-   Note that the normalised path isn't 100% equivalent to the original one. Any trailing slash is removed. When the last path component is a symbolic
-   link, then both paths denote the same thing, except for in the context of the 'readlink' call. It will fail when the trailing slash is present
-   (because then the path denotes the directory which the link points to), but it will succeed when it is absent.
+Note that the normalised path isn't 100% equivalent to the original one. Any trailing slash is removed. When the
+last path component is a symbolic link, then both paths denote the same thing, except for in the context of the
+'readlink' call. It will fail when the trailing slash is present (because then the path denotes the directory which
+the link points to), but it will succeed when it is absent.
 
-   >normalise_path = unslice_path . slice_path
+>normalise_path = unslice_path . slice_path
 
-   See 'unslice_path', 'slice_path'.
+See 'unslice_path', 'slice_path'.
 -}
 normalise_path :: String        -- ^ Path to be normalised
                -> String        -- ^ Path in normalised form
@@ -181,7 +182,8 @@
 See 'slice_path'.
 -}
 split_path :: String            -- ^ Path to be split
-           -> (String, String)  -- ^ Directory and file name components of the path. The directory path is normalized.
+           -> (String, String)  -- ^ Directory and file name components of the path. The directory path is
+                                --   normalized.
 split_path "" = ("","")
 split_path path =
    case slice_path path of
@@ -220,8 +222,8 @@
 
 {- | Inverse of 'split_path', except for normalisation.
 
-This forms a path from two parts, and takes care of @\".\"@ and empty parts. When the two components are in normalised form, then @unsplit_path@
-creates a normalised path.
+This forms a path from two parts, and takes care of @\".\"@ and empty parts. When the two components are in
+normalised form, then @unsplit_path@ creates a normalised path.
 
 The definition:
 
@@ -253,11 +255,12 @@
 -}
 
 
-{- | Concatenate a list of path parts. The idea is that you can throw in reasonably formed parts, and get a reasonably
-formed version of the concatenated path out.
+{- | Concatenate a list of path parts. The idea is that you can throw in reasonably formed parts, and get a
+reasonably formed version of the concatenated path out.
 
-@\".\"@ parts are removed. Empty parts are treated as @\".\"@ parts. One leading slash in each of any but the first part is removed. The result is
-then interspersed with slashes and string wise concatenated. The interior of the parts isn't examined. @\"..\"@ components aren't treated specially.
+@\".\"@ parts are removed. Empty parts are treated as @\".\"@ parts. One leading slash in each of any but the first
+part is removed. The result is then interspersed with slashes and string wise concatenated. The interior of the
+parts isn't examined. @\"..\"@ components aren't treated specially.
 
 Examples:
 
@@ -274,6 +277,7 @@
 
 See 'unsplit_path', 'unslice_path', 'split_path'.
 -}
+
 unsplit_parts :: [String]               -- ^ List of path parts to concatenate.
               -> String                 -- ^ Formed path, which concatenates the parts.
 unsplit_parts [] = "."
@@ -303,8 +307,8 @@
 The path part is returned in normalised form. This means, @\".\"@ components
 are removed, and multiple \"@\/@\"s are reduced to one.
 
-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.
+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.
 
 Examples:
 
@@ -433,7 +437,8 @@
 This makes a relative path absolute with respect to a specified
 directory. An absolute path is returned unmodified.
 
-The order of the arguments can be confusing. You should rather use 'absolute_path_by'. @absolute_path\'@ is included for backwards compatibility.
+The order of the arguments can be confusing. You should rather use 'absolute_path_by'. @absolute_path\'@ is
+included for backwards compatibility.
 -}
 absolute_path' :: String        -- ^ The path to be made absolute
                -> String        -- ^ The directory relative to which the path is made absolute
@@ -442,13 +447,14 @@
 absolute_path' path dir = dir ++ "/" ++ path
 
 
-{- | Guess the @\"..\"@-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 @\"..\"@ components, or more @\"..\"@ components than preceeding normal
-   components, then the @\"..\"@ components can't be normalised away. In this case, the result is @Nothing@.
+{- | Guess the @\"..\"@-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 @\"..\"@ components, or more @\"..\"@ components than preceeding normal
+components, then the @\"..\"@ components can't be normalised away. In this case, the result is @Nothing@.
 -}
 guess_dotdot_comps :: [String]          -- ^ List of path components
-                   -> Maybe [String]    -- ^ In case the path could be transformed, the @\"..\"@-component free list of path components.
+                   -> Maybe [String]    -- ^ In case the path could be transformed, the @\"..\"@-component free
+                                        --   list of path components.
 guess_dotdot_comps = guess_dotdot_comps' []
    where
       guess_dotdot_comps' schon [] = Just schon
@@ -457,10 +463,11 @@
       guess_dotdot_comps' schon (teil:teile) = guess_dotdot_comps' (schon ++ [teil]) teile
 
 
-{- | Guess the @\"..\"@-component free, normalised form of a path. The transformation is purely syntactic. @\"..\"@ 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 @\"..\"@ components, or more @\"..\"@ components than preceeding normal
-   components, then the @\"..\"@ components can't be normalised away. In this case, the result is @Nothing@.
+{- | Guess the @\"..\"@-component free, normalised form of a path. The transformation is purely syntactic. @\"..\"@
+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 @\"..\"@ components, or more @\"..\"@ components than
+preceeding normal components, then the @\"..\"@ components can't be normalised away. In this case, the result is
+@Nothing@.
 
 >guess_dotdot = fmap unslice_path . guess_dotdot_comps . slice_path
 
diff --git a/src/HsShellScript/ProcErr.chs b/src/HsShellScript/ProcErr.chs
--- a/src/HsShellScript/ProcErr.chs
+++ b/src/HsShellScript/ProcErr.chs
@@ -56,8 +56,8 @@
 
 
 
-{- | Improved version of @System.Posix.Files.setFileMode@, which sets the file name in the @IOError@ which is thrown in case of an error. The
-   implementation in GHC 6.2.2 neglects to do this.
+{- | Improved version of @System.Posix.Files.setFileMode@, which sets the file name in the @IOError@ which is
+thrown in case of an error. The implementation in GHC 6.2.2 neglects to do this.
 
 >setFileMode' path mode =
 >   fill_in_filename path $
@@ -303,10 +303,12 @@
                        Just name -> " (" ++ name ++ ")"
                        Nothing   -> ""
 
-      signals = [(sigABRT, "SIGABRT"), (sigALRM, "SIGALRM"), (sigBUS, "SIGBUS"), (sigCHLD, "SIGCHLD"), (sigCONT, "SIGCONT"), (sigFPE, "SIGFPE"),
-                 (sigHUP, "SIGHUP"), (sigILL, "SIGILL"), (sigINT, "SIGINT"), (sigKILL, "SIGKILL"), (sigPIPE, "SIGPIPE"), (sigQUIT, "SIGQUIT"),
-                 (sigSEGV, "SIGSEGV"), (sigSTOP, "SIGSTOP"), (sigTERM, "SIGTERM"), (sigTSTP, "SIGTSTP"), (sigTTIN, "SIGTTIN"), (sigTTOU, "SIGTTOU"),
-                 (sigUSR1, "SIGUSR1"), (sigUSR2, "SIGUSR2"), (sigPOLL, "SIGPOLL"), (sigPROF, "SIGPROF"), (sigSYS, "SIGSYS"), (sigTRAP, "SIGTRAP"),
+      signals = [(sigABRT, "SIGABRT"), (sigALRM, "SIGALRM"), (sigBUS, "SIGBUS"), (sigCHLD, "SIGCHLD"),
+                 (sigCONT, "SIGCONT"), (sigFPE, "SIGFPE"), (sigHUP, "SIGHUP"), (sigILL, "SIGILL"),
+                 (sigINT, "SIGINT"), (sigKILL, "SIGKILL"), (sigPIPE, "SIGPIPE"), (sigQUIT, "SIGQUIT"),
+                 (sigSEGV, "SIGSEGV"), (sigSTOP, "SIGSTOP"), (sigTERM, "SIGTERM"), (sigTSTP, "SIGTSTP"),
+                 (sigTTIN, "SIGTTIN"), (sigTTOU, "SIGTTOU"), (sigUSR1, "SIGUSR1"), (sigUSR2, "SIGUSR2"),
+                 (sigPOLL, "SIGPOLL"), (sigPROF, "SIGPROF"), (sigSYS, "SIGSYS"), (sigTRAP, "SIGTRAP"),
                  (sigURG, "SIGURG"), (sigVTALRM, "SIGVTALRM"), (sigXCPU, "SIGXCPU"), (sigXFSZ, "SIGXFSZ")]
 
 
@@ -425,8 +427,8 @@
    action path args
 
 
--- | Execute an external program. This replaces the running process. The path isn't searched, the environment isn't changed. In case of failure,
--- an IOError is thrown.
+-- | Execute an external program. This replaces the running process. The path isn't searched, the environment
+-- isn't changed. In case of failure, an IOError is thrown.
 --
 -- >exec path args =
 -- >   execute_file path False args Nothing
@@ -439,8 +441,8 @@
    execute_file path False args Nothing
 
 
--- | Execute an external program. This replaces the running process. The path is searched, the environment isn't changed. In case of failure,
--- an IOError is thrown.
+-- | Execute an external program. This replaces the running process. The path is searched, the environment
+-- isn't changed. In case of failure, an IOError is thrown.
 --
 -- >execp prog args =
 -- >   execute_file prog True args Nothing
@@ -453,8 +455,8 @@
    execute_file prog True args Nothing
 
 
--- | Execute an external program. This replaces the running process. The path isn't searched, the environment of the program is set as specified. In
--- case of failure, an IOError is thrown.
+-- | Execute an external program. This replaces the running process. The path isn't searched, the environment
+-- of the program is set as specified. In case of failure, an IOError is thrown.
 --
 -- >exece path args env =
 -- >   execute_file path False args (Just env)
@@ -468,8 +470,8 @@
    execute_file path False args (Just env)
 
 
--- | Execute an external program. This replaces the running process. The path is searched, the environment of the program is set as specified. In
--- case of failure, an IOError is thrown.
+-- | Execute an external program. This replaces the running process. The path is searched, the environment of
+-- the program is set as specified. In case of failure, an IOError is thrown.
 --
 -- >execpe prog args env =
 -- >   execute_file prog True args (Just env)
@@ -642,8 +644,9 @@
    return res
 
 
--- | Temporarily replace a handle. This makes a backup copy of the original handle (typically a standard handle), overwrites it with the specified one,
--- runs the specified action, and restores the handle from the backup.
+-- | Temporarily replace a handle. This makes a backup copy of the original handle (typically a standard
+-- handle), overwrites it with the specified one, runs the specified action, and restores the handle from the
+-- backup.
 --
 -- Example:
 --
@@ -687,7 +690,8 @@
    return res
 
 
-{- | Redirect the standard output of the specified IO action to a file. The file will be overwritten, if it already exists.
+{- | Redirect the standard output of the specified IO action to a file. The file will be overwritten, if it
+already exists.
 
 What's actually modified is the @stdout@ handle, not the file descriptor 1. The
 @exec@ functions know about this. See "HsShellScript#fdpipes" and
@@ -713,7 +717,8 @@
    redirect_helper stdout WriteMode io path
 
 
-{- | Redirect the standard output of the specified IO action to a file. If the file already exists, the output will be appended.
+{- | Redirect the standard output of the specified IO action to a file. If the file already exists, the output
+will be appended.
 
 What's actually modified is the @stdout@ handle, not the file descriptor 1. The
 @exec@ functions know about this. See "HsShellScript#fdpipes" and
@@ -736,7 +741,8 @@
    redirect_helper stdout AppendMode io path
 
 
-{- | Redirect the standard error output of the specified IO action to a file. If the file already exists, it will be overwritten.
+{- | Redirect the standard error output of the specified IO action to a file. If the file already exists, it
+will be overwritten.
 
 What's actually modified is the @stderr@ handle, not the file descriptor 2. The
 @exec@ functions know about this. See "HsShellScript#fdpipes" and
@@ -762,7 +768,8 @@
    redirect_helper stderr WriteMode
 
 
-{- | Redirect the standard error output of the specified IO action to a file. If the file already exists, the output will be appended.
+{- | Redirect the standard error output of the specified IO action to a file. If the file already exists, the
+output will be appended.
 
 What's actually modified is the @stderr@ handle, not the file descriptor 2. The
 @exec@ functions know about this. See "HsShellScript#fdpipes" and
@@ -1042,7 +1049,7 @@
 -- the returned file handle.
 --
 -- This gives you full control of the pipe, and of the forked process. But you
--- must cope with the child process by yourself.
+-- need to deal with the child process by yourself.
 --
 -- Unless you replace the child process, calling an @exec@ variant, the child
 -- should let the control flow leave the action normally.
@@ -1078,7 +1085,8 @@
 --
 -- See '-<-', 'pipe_to', 'pipe_from', 'pipe_from2'. See "HsShellScript#fdpipes" for more details.
 h_pipe_to :: IO a                       -- ^ Action to run as a separate process, and to pipe to
-          -> IO (Handle, ProcessID)     -- ^ Returns handle connected to the standard input of the child process, and the child's process ID
+          -> IO (Handle, ProcessID)     -- ^ Returns handle connected to the standard input of the child process,
+                                        --   and the child's process ID
 h_pipe_to io = do
    (Just h, _, _, pid) <- pipe_fork_dup io True False False
    return (h, pid)
@@ -1224,7 +1232,9 @@
 -- >
 -- >   putStrLn res
 --
--- See 'exec', 'pipe_to', 'pipe_from', 'h_pipe_from2', 'lazy_pipe_from2', 'silently'. See "HsShellScript#fdpipes" for more details.
+-- See 'exec', 'pipe_to', 'pipe_from', 'h_pipe_from2', 'lazy_pipe_from2', 'silently'.
+-- See "HsShellScript#fdpipes" for more details.
+
 pipe_from2 :: IO a              -- ^ Action to run as a separate process
            -> IO String         -- ^ The action's standard error output
 pipe_from2 io = do
@@ -1248,7 +1258,7 @@
 -- the returned file handle.
 --
 -- This gives you full control of the pipe, and of the forked process. But you
--- must cope with the child process by yourself.
+-- need to deal with the child process by yourself.
 --
 -- When you call @getProcessStatus@ blockingly, you must first ensure that all
 -- data has been read, or close the handle. Otherwise you'll get a deadlock.
@@ -1281,9 +1291,11 @@
 --
 -- >(h,pid) <- h_pipe_from $ exec "/usr/bin/foo" ["bar"]
 --
--- See 'exec', 'pipe_to', 'h_pipe_from2', 'pipe_from', 'lazy_pipe_from', 'chomp', 'silently'. See "HsShellScript#fdpipes" for more details.
+-- See 'exec', 'pipe_to', 'h_pipe_from2', 'pipe_from', 'lazy_pipe_from', 'chomp', 'silently'.
+-- See "HsShellScript#fdpipes" for more details.
 h_pipe_from :: IO a                             -- ^ Action to run as a separate process, and to pipe from
-            -> IO (Handle, ProcessID)           -- ^ Returns handle connected to the standard output of the child process, and the child's process ID
+            -> IO (Handle, ProcessID)           -- ^ Returns handle connected to the standard output of the child
+                                                -- process, and the child's process ID
 h_pipe_from io = do
    (_, Just h, _, pid) <- pipe_fork_dup io False True False
    return (h, pid)
@@ -1299,7 +1311,7 @@
 -- the returned file handle.
 --
 -- This gives you full control of the pipe, and of the forked process. But you
--- must cope with the child process by yourself.
+-- need to deal with the child process by yourself.
 --
 -- When you call @getProcessStatus@ blockingly, you must first ensure that all
 -- data has been read, or close the handle. Otherwise you'll get a deadlock.
@@ -1335,7 +1347,8 @@
 -- See 'exec', 'pipe_from', 'pipe_from2', 'h_pipe_from', 'pipe_to',
 -- 'lazy_pipe_from', 'chomp', 'silently'.
 h_pipe_from2 :: IO a                             -- ^ Action to run as a separate process, and to pipe from
-             -> IO (Handle, ProcessID)           -- ^ Returns handle connected to the standard output of the child process, and the child's process ID
+             -> IO (Handle, ProcessID)           -- ^ Returns handle connected to the standard output of the child
+                                                 -- process, and the child's process ID
 h_pipe_from2 io = do
    (_, _, Just h, pid) <- pipe_fork_dup io False False True
    return (h, pid)
@@ -1443,7 +1456,8 @@
 --
 -- See 'exec', 'pipe_to', 'pipe_from', 'h_pipe_from', 'lazy_pipe_from2', 'silently'.
 lazy_pipe_from :: IO a                          -- ^ Action to run as a separate process
-               -> IO (String, ProcessID)        -- ^ The action's lazy output and the process ID of the child process
+               -> IO (String, ProcessID)        -- ^ The action's lazy output and the process ID of the child
+                                                -- process
 lazy_pipe_from io = do
    (_, Just h, _, pid) <- pipe_fork_dup io False True False
    txt <- hGetContents h
@@ -1558,7 +1572,8 @@
 --
 -- See 'exec', 'pipe_to', 'pipe_from2', 'h_pipe_from2', 'lazy_pipe_from', 'silently'.
 lazy_pipe_from2 :: IO a                          -- ^ Action to run as a separate process
-                -> IO (String, ProcessID)        -- ^ The action's lazy output and the process ID of the child process
+                -> IO (String, ProcessID)        -- ^ The action's lazy output and the process ID of the child
+                                                 -- process
 lazy_pipe_from2 io = do
    (_, _, Just h, pid) <- pipe_fork_dup io False False True
    txt <- hGetContents h
@@ -1566,6 +1581,61 @@
 
 
 
+-- | Run an IO action as a separate process, and read its @stdout@ strictly. All
+-- the output is read, until the action terminates. Contrary to 'pipe_from',
+-- when the action signals an error (with a non-zero exit code), the error isn't
+-- thrown as an exception, but is returned alongside the output.
+--
+-- The result consists of the output which has been read, alongside with the
+-- process status, with which the action has terminated. For success,
+-- the process status is @Exited ExitSuccess@. See
+-- 'System.Posix.Process.ProcessStatus'.
+--
+-- This is a frontend to the 'h_pipe_from' function. See there for more details.
+--
+-- See 'pipe_from_full2', 'exec', 'pipe_to', 'pipe_from', 'h_pipe_from', 'lazy_pipe_from', 'chomp'.
+
+pipe_from_full
+  :: IO a                       -- ^ Action to run as a separate process. Its return value is ignored.
+  -> IO (String, ProcessStatus) -- ^ The output of the IO action until it terminated and
+                                -- the process status of the terminated action.
+
+pipe_from_full io = do
+   (h, pid) <- h_pipe_from io
+   txt <- hGetContents h
+   seq (length txt) (hClose h)
+   (Just ps) <- System.Posix.getProcessStatus True False pid
+   return (txt, ps)
+
+
+-- | Run an IO action as a separate process, and read its @stderr@ strictly. All
+-- the error output is read, until the action terminates. Contrary to 'pipe_from2',
+-- when the action signals an error (with a non-zero exit code), the error isn't
+-- thrown as an exception, but is returned alongside the output.
+--
+-- The result consists of the error output which has been read, alongside with
+-- the process status, with which the action has terminated. For success, the
+-- process status is @Exited ExitSuccess@. See
+-- 'System.Posix.Process.ProcessStatus'.
+--
+-- This is a frontend to the 'h_pipe_from2' function. See there for more details.
+--
+-- See 'pipe_from_full', 'exec', 'pipe_to', 'pipe_from', 'h_pipe_from', 'lazy_pipe_from', 'chomp'.
+
+pipe_from_full2
+  :: IO a                       -- ^ Action to run as a separate process. Its return value is ignored.
+  -> IO (String, ProcessStatus) -- ^ The error output of the IO action until it terminated and
+                                -- the process status of the terminated action.
+pipe_from_full2 io = do
+   (h, pid) <- h_pipe_from2 io
+   txt <- hGetContents h
+   seq (length txt) (hClose h)
+   (Just ps) <- System.Posix.getProcessStatus True False pid
+   return (txt, ps)
+
+
+
+
 -- | Run an IO action as a separate process, and optionally connect to its
 -- @stdin@, its @stdout@ and its @stderr@ output with pipes.
 --
@@ -1575,7 +1645,7 @@
 -- new child process. Which, this is determined by the first three arguments.
 --   
 -- You get full control of the pipes, and of the forked process. But you
--- must cope with the child process by yourself.
+-- need to deal with the child process by yourself.
 --
 -- Errors in the child process can only be detected by examining its process
 -- status (using 'System.Posix.Process.getProcessStatus'). If the child action
@@ -1608,7 +1678,8 @@
             , Maybe Handle
             , Maybe Handle
             , ProcessID
-            )                   -- ^ Pipes to the new process's @stdin@, @stdout@ and @stderr@, if applicable; and its process id.
+            )                   -- ^ Pipes to the new process's @stdin@, @stdout@ and @stderr@, if applicable;
+                                -- and its process id.
 pipes = pipe_fork_dup
 
 
@@ -1741,8 +1812,8 @@
 
 -- |Convert an @IOError@ to a string.
 --
--- There is an instance declaration of @IOError@ in @Show@ in the @GHC.IO@ library, but @show_ioerror@ produces a more readable, and more
--- complete, message.
+-- There is an instance declaration of @IOError@ in @Show@ in the @GHC.IO@ library, but @show_ioerror@ produces a
+-- more readable, and more complete, message.
 show_ioerror :: IOError -> String
 show_ioerror ioe =
    "IO-Error\n\
@@ -1757,17 +1828,18 @@
          indent txt = concat (intersperse ("\n                 ") (lines txt))
 
 
-{- |
-   Call the shell to execute a command. In case of an error, throw the @ProcessStatus@ (such as @(Exited (ExitFailure ec))@) as an exception.
-   This is like the Haskell standard library function @system@, except that error handling is brought in accordance with HsShellScript\'s scheme.
+{- | Call the shell to execute a command. In case of an error, throw the @ProcessStatus@ (such as @(Exited
+(ExitFailure ec))@) as an exception. This is like the Haskell standard library function @system@, except that error
+handling is brought in accordance with HsShellScript\'s scheme.
 
-   @exitcode . system_throw@ is the same as the @system@ function, except that when the called shell is terminated or stopped by a signal, this still
-   lead to the @ProcessStatus@ being thrown. The Haskell library report says nothing about what happens in this case, when using the
-   @system@ function.
+@exitcode . system_throw@ is the same as the @system@ function, except that when the called shell is terminated or
+stopped by a signal, this still lead to the @ProcessStatus@ being thrown. The Haskell library report says nothing
+about what happens in this case, when using the @system@ function.
 
 >system_throw cmd = run "/bin/sh" ["-c", "--", cmd]
 
-   This function is deprecated. You should rather use 'system_runprog', which provides for much better error reporting.
+This function is deprecated. You should rather use 'system_runprog', which provides for much better error
+reporting.
 -}
 -- This function should go to HsShellScript.Shell, but this would introduce a circular dependency.
 system_throw :: String -> IO ()
@@ -1777,19 +1849,19 @@
 
 
 
-{- |
-   Call the shell to execute a command. In case of an error, a @RunError@ ist thrown.
-   This is like the Haskell standard library function @system@, except that error handling is brought in accordance with HsShellScript's scheme. (It is
-   /not/ a front end to @system@.)
+{- | Call the shell to execute a command. In case of an error, a @RunError@ ist thrown. This is like the Haskell
+standard library function @system@, except that error handling is brought in accordance with HsShellScript's
+scheme. (It is /not/ a front end to @system@.)
 
 >system_runprog cmd = runprog "/bin/sh" ["-c", "--", cmd]
 
-   Example: Call \"foo\" and report Errors as @IOError@s, rather than @RunError@s.
+Example: Call \"foo\" and report Errors as @IOError@s, rather than @RunError@s.
 
 >as_ioe $ system_runprog "foo" ["bar", "baz"]
 
-   See 'RunError', 'as_ioe'
+See 'RunError', 'as_ioe'
 -}
+
 -- This function should go to HsShellScript.Shell, but this would introduce a circular dependency.
 system_runprog :: String -> IO ()
 system_runprog cmd =
@@ -1831,7 +1903,8 @@
 
 See 'lazy_pipe_from', 'subproc', 'runprog', Data.IORef.
 -}
-silently :: IORef.IORef String       -- ^ A mutable variable, which gets the output (stdout and stderr) of the action appended.
+silently :: IORef.IORef String       -- ^ A mutable variable, which gets the output (stdout and stderr) of the
+                                     -- action appended.
          -> IO ()                    -- ^ The IO action to run.
          -> IO ()
 silently ref io = do
@@ -1867,7 +1940,8 @@
                       _exit 1
                   )
       , Handler $ (\processstatus -> do
-                      errm $ "Process error in child process. Process status = " ++ show ( processstatus :: ProcessStatus )
+                      errm $ "Process error in child process. Process status = " ++
+                             show ( processstatus :: ProcessStatus )
                       flush_outerr
                       _exit 1
                   )
@@ -2024,7 +2098,8 @@
          else hPutStr stderr msg
 
 
-{- | In case the specified action throws an IOError, fill in its filename field. This way, more useful error messages can be produced.
+{- | In case the specified action throws an IOError, fill in its filename field. This way, more useful error
+messages can be produced.
 
 Example:
 
@@ -2041,7 +2116,8 @@
    io `catch` (\ioe -> ioError (ioeSetFileName ioe filename))
 
 
-{- | In case the specified action throws an IOError, fill in its location field. This way, more useful error messages can be produced.
+{- | In case the specified action throws an IOError, fill in its location field. This way, more useful error
+messages can be produced.
 
 Example:
 
@@ -2060,9 +2136,10 @@
    io `catch` (\ioe -> ioError (ioeSetLocation ioe location))
 
 
-{- | In case the specified action throws an IOError, add a line to its location field. This way, more useful error messages can be produced. The
-   specified string is prepended to the old location, separating it with a newline from the previous location, if any. When using this thoroughly, you
-   get a reverse call stack in IOErrors.
+{- | In case the specified action throws an IOError, add a line to its location field. This way, more useful
+error messages can be produced. The specified string is prepended to the old location, separating it with a
+newline from the previous location, if any. When using this thoroughly, you get a reverse call stack in
+IOErrors.
 
 Example:
 
@@ -2143,8 +2220,8 @@
              -- Save the flags of all file descriptors
              fdflags <- {# call c_save_fdflags #}
 
-             -- Prepare all fds for subsequent exec. Fds 0-2 are set to blocking (because GHC sets new fds to non-blocking). All
-             -- others are set to close-on-exec.
+             -- Prepare all fds for subsequent exec. Fds 0-2 are set to blocking (because GHC sets new fds to
+             -- non-blocking). All others are set to close-on-exec.
              {# call c_prepare_fd_flags_for_exec #}
 
              return (recover0, recover1, recover2, fdflags)
@@ -2190,7 +2267,8 @@
                          SemiClosedHandle -> True
                          otherwise -> False
 
-         -- If the handle is open, make the fd a copy of the fd which the handle uses. Otherwise, close the fd as well.
+         -- If the handle is open, make the fd a copy of the fd which the handle uses. Otherwise, close the fd
+         -- as well.
          if closed
             then {# call close #} fd >> return ()
             else when (fd /= handle_fd) $
@@ -2206,8 +2284,9 @@
                                                {# call close #} fd_backup
 
                                                return ()
-                                       else do -- Wenn der 0-2-filedescriptor nicht kopiert werden konnte, dann liegt das (?) daran, daß er
-                                               -- geschlossen war. Ihn dann wieder schließen.
+                                       else do -- Wenn der 0-2-filedescriptor nicht kopiert werden konnte,
+                                               -- dann liegt das (?) daran, daß er geschlossen war. Ihn dann
+                                               -- wieder schließen.
                                                {# call close #} fd
                                                return ()
                     -- Unlock the handle
@@ -2270,14 +2349,15 @@
 unsafeWithHandleFd' h m f =
   withHandle' "unsafeWithHandleFd" h m $ \h_@Handle__{haDevice} ->
     case cast haDevice of
-      Nothing -> ioError (System.IO.Error.ioeSetErrorString (System.IO.Error.mkIOError IllegalOperation "unsafeWithHandleFd" (Just h) Nothing)
+      Nothing -> ioError (System.IO.Error.ioeSetErrorString (System.IO.Error.mkIOError IllegalOperation
+                                                             "unsafeWithHandleFd" (Just h) Nothing)
                          "handle is not a file descriptor")
       Just fd -> do
         x <- f (Fd (FD.fdFD fd))
         return (h_, x)
 
 
-------------------------------------------------------------------------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------------------------------------
 
 
 
@@ -2296,7 +2376,8 @@
       return (isterm /= (0::CInt))
 
 
--- Flush stdout and stderr (which should not be necessary). Discard Illegal Operation IOError which arises when they are closed.
+-- Flush stdout and stderr (which should not be necessary). Discard Illegal Operation IOError which arises
+-- when they are closed.
 flush_outerr = do
    flush stdout
    flush stderr
@@ -2334,7 +2415,7 @@
 
 
 
-------------------------------------------------------------------------------------------------------------------------------------------------------
+----------------------------------------------------------------------------------------------------
 -- Transmission of at most one IOError through a pipe (as far as that's possible).
 -- This is used by execute_file to send the IOError of a failed exec...-call to the parent process.
 --
diff --git a/src/HsShellScript/Shell.hs b/src/HsShellScript/Shell.hs
--- a/src/HsShellScript/Shell.hs
+++ b/src/HsShellScript/Shell.hs
@@ -12,8 +12,9 @@
 -- would achieve the same effect. The name and the arguments are properly
 -- quoted, using 'shell_quote'.
 --
--- Note: The quoted strings are correctly recognized in shell scripts. But the shell bash has an annoying history expansion \"feature\", which causes
--- it to choke on exclamation marks, when in interactive mode, even when quoted with double quotes. You can turn it off with @set +o histexpand@.
+-- Note: The quoted strings are correctly recognized in shell scripts. But the shell bash has an annoying history
+-- expansion \"feature\", which causes it to choke on exclamation marks, when in interactive mode, even when quoted
+-- with double quotes. You can turn it off with @set +o histexpand@.
 shell_command :: String         -- ^ name or path of the executable
               -> [String]       -- ^ command line arguments
               -> String         -- ^ shell command
@@ -35,8 +36,9 @@
 -- \"... the rules for evaluation and quoting are taken from the POSIX
 -- 1003.2 specification for the `standard' Unix shell.\"
 --
--- Note: The quoted strings are correctly recognized in shell scripts. But the shell bash has an annoying history expansion \"feature\", which causes
--- it to choke on exclamation marks, when in interactive mode, even when quoted with double quotes. You can turn it off with @set +o histexpand@.
+-- Note: The quoted strings are correctly recognized in shell scripts. But the shell bash has an annoying history
+-- expansion \"feature\", which causes it to choke on exclamation marks, when in interactive mode, even when quoted
+-- with double quotes. You can turn it off with @set +o histexpand@.
 --
 -- See 'quote'.
 shell_quote :: String -> String
@@ -60,8 +62,9 @@
 -- recognized as one string by the shell when enclosed in double quotes.
 -- Doesn't add the double quotes.
 --
--- Note: The quoted strings are correctly recognized in shell scripts. But the shell bash has an annoying history expansion \"feature\", which causes
--- it to choke on exclamation marks, when in interactive mode, even when quoted with double quotes. You can turn it off with @set +o histexpand@.
+-- Note: The quoted strings are correctly recognized in shell scripts. But the shell bash has an annoying history
+-- expansion \"feature\", which causes it to choke on exclamation marks, when in interactive mode, even when quoted
+-- with double quotes. You can turn it off with @set +o histexpand@.
 --
 -- See 'quote', 'shell_quote'.
 quote0 :: String -> String
@@ -78,8 +81,9 @@
 -- shell. The double quotes are added even when they aren't needed for this
 -- purpose.
 --
--- Note: The quoted strings are correctly recognized in shell scripts. But the shell bash has an annoying history expansion \"feature\", which causes
--- it to choke on exclamation marks, when in interactive mode, even when quoted with double quotes. You can turn it off with @set +o histexpand@.
+-- Note: The quoted strings are correctly recognized in shell scripts. But the shell bash has an annoying history
+-- expansion \"feature\", which causes it to choke on exclamation marks, when in interactive mode, even when quoted
+-- with double quotes. You can turn it off with @set +o histexpand@.
 --
 -- See 'quote0', 'shell_quote'.
 quote :: String -> String
diff --git a/test/IOError.hs b/test/IOError.hs
deleted file mode 100644
--- a/test/IOError.hs
+++ /dev/null
@@ -1,36 +0,0 @@
-to_ioe :: RunError -> IOError
-to_ioe re =
-   GHC.IO.Exception.IOError { ioe_handle      = Nothing,
-                              ioe_type        = GHC.IO.Exception.SystemError,
-                              ioe_location    = "runprog",
-                              ioe_description = show_runerror re,
-                              ioe_filename    = Just (shell_command (re_prog re) (re_pars re)),
-                              ioe_errno       = re_errno re
-                            }
-      
-{-
- FilePath -> IOErrorSource
-                                
-   GHC.IO.Exception.IOError { 
-                              
-                              
-                              ioe_description = show_runerror re,
-                              ioe_filename    = 
-                              ioe_errno       = re_errno re
-                            }
--}
-{-
-to_ioe re =
-   System.IO.Error.ioeSetErrorString 
-      ( System.IO.Error.mkIOError GHC.IO.Exception.SystemError       -- Type
-                                  "runprog"                          -- Location
-                                  Nothing                            -- handle 
-                                  (Just (shell_command (re_prog re) (re_pars re)))   -- file name
-      )
-      (show_runerror re)
-      { 
--}
-
-
-
--- In ProcErr.hs:317
diff --git a/test/Makefile b/test/Makefile
deleted file mode 100644
--- a/test/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-CFLAGS=-XDeriveDataTypeable 
-
-PROG_HS  = $(notdir $(basename $(wildcard [_abcdefghijklmnopqrstuvwxyzäöü]*.hs)))
-PROG_CHS = $(notdir $(basename $(wildcard [_abcdefghijklmnopqrstuvwxyzäöü]*.chs)))
-
-# Löscht Doppelgänger
-PROGS    = $(sort $(PROG_HS) $(PROG_CHS))
-
-
-% : %.o cteile.o
-	ghc -dynamic -o $@ $^ -package hsshellscript
-
-# % : %.O cteile.o
-# 	ghc -dynamic -o $@ $^ -package unix -package directory -package random -package parsec -package hsshellscript -XScopedTypeVariables
-
-%.o : %.hs
-	ghc -dynamic -c $(CFLAGS) $^ -XScopedTypeVariables
-
-# %.o : %.hs
-# 	ghc -c $(CFLAGS) $^ -XScopedTypeVariables
-
-# %.o : %.c
-
-cteile.o : cteile.c
-	gcc -fPIC -c -o $@ $<
-
-%.hs : %.chs
-	-chmod u+w $@
-	c2hs -o $@ $<
-	chmod u-w $@
-
-clean :: depend
-	rm -f -- *.hi *.o *~ *.bak $(PROGS) *.chi *.chs.h \
-	      $(foreach m, $(PROG_CHS), "$(m).hs")
-
-depend :: $(foreach m, $(PROGS), $(m).hs)
-	ghc -M $(CFLAGS) -dep-makefile depend -dep-suffix "p_" \
-	       $(foreach m, $(PROGS), "$(m).hs")
-#	make cteile.o
-
-#z : z.c
-#	gcc -o $@ $<
-
--include depend
diff --git a/test/args.chs b/test/args.chs
deleted file mode 100644
--- a/test/args.chs
+++ /dev/null
@@ -1,103 +0,0 @@
-module Main (main) where
-
-import HsShellScript --hiding ({-make_usage_info, print_usage_info, -}argname_short)
-import Data.Maybe
-import Data.List
-import Data.Char
-import Debug.Trace
-import Control.Monad
-import Control.Exception
-import System.IO
-
-
-header                                  = "Testprogramm für Kommandozeilenargumente\n\n"
-descs                                   = [ d_komp, d_trenner, d_pfade, d_uml, d_inhalt, d_bla ]
-args                                    = unsafe_getargs header descs
-trenner_normal                          = " - "
-
-pfade                                   = args_req args d_pfade
-trenner                                 = fromMaybe trenner_normal $ optarg_req args d_trenner
-inhalt                                  = arg_switch args d_inhalt
-komp                                    = optarg_req args d_komp
-
-
-d_weg  =
-   argdesc [ desc_short 'w'
-           , desc_long "weg"
-           , desc_at_most_once
-           , desc_argname "Teiltext"
-           , desc_value_required
-           , desc_description "xxx" --Teiltext aus den Dateinamen entfernen")
-           ]
-
-
-d_komp =
-   argdesc [ desc_short 'k'
-           , desc_short 'l'
-           , desc_short 'm'
-           , desc_long "komp"
-           , desc_long "komp1"
-           , desc_long "komp2"
-           , desc_value_required
-           , desc_argname "<Name>"
-           , desc_description "Das ist eine lange Argumentbeschreibung, die umgebrochen werden muß, weil sie zu lang ist. Wirklich. Undhierkommteinganzlangeswortdasgetrenntwerdenmuß"
-           ]
-
-d_trenner =
-   argdesc [ desc_short 't'
-           , desc_long "langer-param"
-           , desc_at_most_once
-           , desc_value_required
-           , desc_argname "<Txt>"
-           , desc_description "Diese Beschreibung\nhat mehrere\nZeilen."
-           ]
-
-d_uml =
-   argdesc [ desc_long "äöüß"
-           , desc_at_most_once
-           ]
-
-d_pfade =
-   argdesc [ desc_direct
-           , desc_any_times
-           , desc_description ("Pfade, denen vorgesetzt werden soll; bzw, bla bla Verzeichnisse, die ihren Inhalten vorgesetzt werden sollen")
-           ]
-
-d_inhalt =
-   argdesc [ desc_long "inhalt"
-           , desc_description ("Nicht angegebenen Dateien vorsetzen, sondern dem Inhalt der angegebenen Verzeichnisse. Angegebene Nicht-Verzeichnisse \
-                              \beiseitelassen.")
-           ]
-
-d_bla = 
-   argdesc [ desc_long "foo"
-           , desc_short 'h'
-           , desc_value_required
-           , desc_argname "Name"
-           , desc_description "bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla \
-                              \bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla "
-           ]
-
-
-main = mainwrapper $ do
-   seq args (return ())
-
-   --anz d_weg
-   --print (argname_long d_weg)
-
-   --let zll = make_usage_info [d_weg] 0 15 30 80
-   --mapM_ print zll
-
-   print_usage_info stdout "Header\n\n" [d_weg] --descs
-
-
-
-anz :: ArgumentDescription 
-    -> IO ()
-anz desc = do 
-   outm ("argdesc_short_args = " ++ show (argdesc_short_args desc))
-   outm ("argdesc_long_args = " ++ show (argdesc_long_args desc))
-   outm ("argdesc_argarg = " ++ show (argdesc_argarg desc))
-   outm ("argdesc_times = " ++ show (argdesc_times desc))
-   outm ("argdesc_argargname = " ++ show (argdesc_argargname desc))
-   outm ("argdesc_description = " ++ show (argdesc_description desc))
diff --git a/test/args.hs b/test/args.hs
deleted file mode 100644
--- a/test/args.hs
+++ /dev/null
@@ -1,110 +0,0 @@
--- GENERATED by C->Haskell Compiler, version 0.28.6 Switcheroo, 25 November 2017 (Haskell)
--- Edit the ORIGNAL .chs file instead!
-
-
-{-# LINE 1 "args.chs" #-}
-module Main (main) where
-
-
-
-import HsShellScript --hiding ({-make_usage_info, print_usage_info, -}argname_short)
-import Data.Maybe
-import Data.List
-import Data.Char
-import Debug.Trace
-import Control.Monad
-import Control.Exception
-import System.IO
-
-
-header                                  = "Testprogramm für Kommandozeilenargumente\n\n"
-descs                                   = [ d_komp, d_trenner, d_pfade, d_uml, d_inhalt, d_bla ]
-args                                    = unsafe_getargs header descs
-trenner_normal                          = " - "
-
-pfade                                   = args_req args d_pfade
-trenner                                 = fromMaybe trenner_normal $ optarg_req args d_trenner
-inhalt                                  = arg_switch args d_inhalt
-komp                                    = optarg_req args d_komp
-
-
-d_weg  =
-   argdesc [ desc_short 'w'
-           , desc_long "weg"
-           , desc_at_most_once
-           , desc_argname "Teiltext"
-           , desc_value_required
-           , desc_description "xxx" --Teiltext aus den Dateinamen entfernen")
-           ]
-
-
-d_komp =
-   argdesc [ desc_short 'k'
-           , desc_short 'l'
-           , desc_short 'm'
-           , desc_long "komp"
-           , desc_long "komp1"
-           , desc_long "komp2"
-           , desc_value_required
-           , desc_argname "<Name>"
-           , desc_description "Das ist eine lange Argumentbeschreibung, die umgebrochen werden muß, weil sie zu lang ist. Wirklich. Undhierkommteinganzlangeswortdasgetrenntwerdenmuß"
-           ]
-
-d_trenner =
-   argdesc [ desc_short 't'
-           , desc_long "langer-param"
-           , desc_at_most_once
-           , desc_value_required
-           , desc_argname "<Txt>"
-           , desc_description "Diese Beschreibung\nhat mehrere\nZeilen."
-           ]
-
-d_uml =
-   argdesc [ desc_long "äöüß"
-           , desc_at_most_once
-           ]
-
-d_pfade =
-   argdesc [ desc_direct
-           , desc_any_times
-           , desc_description ("Pfade, denen vorgesetzt werden soll; bzw, bla bla Verzeichnisse, die ihren Inhalten vorgesetzt werden sollen")
-           ]
-
-d_inhalt =
-   argdesc [ desc_long "inhalt"
-           , desc_description ("Nicht angegebenen Dateien vorsetzen, sondern dem Inhalt der angegebenen Verzeichnisse. Angegebene Nicht-Verzeichnisse \
-                              \beiseitelassen.")
-           ]
-
-d_bla = 
-   argdesc [ desc_long "foo"
-           , desc_short 'h'
-           , desc_value_required
-           , desc_argname "Name"
-           , desc_description "bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla \
-                              \bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla "
-           ]
-
-
-main = mainwrapper $ do
-   seq args (return ())
-
-   --anz d_weg
-   --print (argname_long d_weg)
-
-   --let zll = make_usage_info [d_weg] 0 15 30 80
-   --mapM_ print zll
-
-   print_usage_info stdout "Header\n\n" [d_weg] --descs
-
-
-
-anz :: ArgumentDescription 
-    -> IO ()
-anz desc = do 
-   outm ("argdesc_short_args = " ++ show (argdesc_short_args desc))
-   outm ("argdesc_long_args = " ++ show (argdesc_long_args desc))
-   outm ("argdesc_argarg = " ++ show (argdesc_argarg desc))
-   outm ("argdesc_times = " ++ show (argdesc_times desc))
-   outm ("argdesc_argargname = " ++ show (argdesc_argargname desc))
-   outm ("argdesc_description = " ++ show (argdesc_description desc))
diff --git a/test/as_ioe.hs b/test/as_ioe.hs
deleted file mode 100644
--- a/test/as_ioe.hs
+++ /dev/null
@@ -1,20 +0,0 @@
-import Control.Exception
-import Prelude hiding (catch)
-import HsShellScript
-
-main = mainwrapper $ do
-   outm "RunError:"
-   runprog "/bin/false" []
-     `catch` (\(re::RunError) -> do
-                outm "\nshow re:"
-                outm (show re)
-                outm "\nshow_runerror:"
-                outm (show_runerror re)
-             )
-   
-   outm "\n\nIOError:" 
-   (as_ioe $ runprog "/bin/false" [])
-     `catch` (\(ioe::IOError) -> 
-                 outm (show ioe))
-
-   outm "\n\nEnd."
diff --git a/test/bug.hs b/test/bug.hs
deleted file mode 100644
--- a/test/bug.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-import Foreign.C
-import Foreign.Ptr
-
-
-main = 
-  aufruf "äöü"
-
-
-aufruf :: String -> IO ()
-aufruf str =
-  withCString str $ \ptr -> c_aufruf ptr
-
-
-foreign import ccall safe "test/glob.chs.h c_aufruf"
-  c_aufruf :: ((Ptr CChar) -> (IO ()))
-
diff --git a/test/child.hs b/test/child.hs
deleted file mode 100644
--- a/test/child.hs
+++ /dev/null
@@ -1,5 +0,0 @@
-import HsShellScript
-
-
-main = mainwrapper $ do
-   pipe_to "bla" (exec "/bin/false" [])
diff --git a/test/cteile.c b/test/cteile.c
deleted file mode 100644
--- a/test/cteile.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-
-
-void c_aufruf(const char* ptr)
-{
-  printf("ptr = >%s<\nlength = %d\n", ptr, (int) strlen(ptr));
-}
-
-
-//--------------------------------------------------------------------------------
-// #include <stdio.h>
-int puts(const char *txt);
-
-
-// Debug
-void print_utf8_c(char* puf)
-{
-  int idx = 0;
-  int len = strlen(puf);
-
-  do {
-    if (puf[idx] & 0x80) 
-      printf("!");
-    printf("%02x ", puf[idx] & 0xFF);
-    idx++;
-  } while (idx < len);
-
-  printf("\nC-Seite ausgegeben; \"");
-  for (idx = 0; idx < len; idx++)
-    printf("%c", puf[idx]);
-  printf("\", Länge = %d\n",len);
-}
-
diff --git a/test/fdupes.hs b/test/fdupes.hs
deleted file mode 100644
--- a/test/fdupes.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-import HsShellScript
-
-main = do
-   erg <- fdupes ["-r", "-s", "-H"] ["."]
-   print erg
-
diff --git a/test/glob.hs b/test/glob.hs
deleted file mode 100644
--- a/test/glob.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-import HsShellScript
-
-main = do
-   l <- glob "*"
-   mapM_ outm l
-   
diff --git a/test/glob_quote.hs b/test/glob_quote.hs
deleted file mode 100644
--- a/test/glob_quote.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-import HsShellScript
-
-silly = "[[silly \\ filename]]"
-
-main = do
-   runprog "touch" ["/tmp/"++silly]
-   
-   q <- glob ("/tmp/"++glob_quote silly)
-   outm ("Quoted: " ++ show q)
-
-   nq <- glob ("/tmp/"++ silly)
-   outm ("Non-quoted: " ++ show nq)
diff --git a/test/h_pipe_to.hs b/test/h_pipe_to.hs
deleted file mode 100644
--- a/test/h_pipe_to.hs
+++ /dev/null
@@ -1,14 +0,0 @@
-import System.Posix
-import HsShellScript
-
-
-main = mainwrapper $ do
-  (h,pid) <- h_pipe_to (exec "/fooble" [])
-  (Just ps) <- getProcessStatus True False pid
-  print (ps::ProcessStatus)
-  
-  
-{- 
-     getProcessStatus block stopped pid
-                      - Ob getProcessStatus blockieren soll
--}
diff --git a/test/path_exists_.hs b/test/path_exists_.hs
deleted file mode 100644
--- a/test/path_exists_.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-import HsShellScript
-import System.Posix.Files
-
-main = do 
-  createSymbolicLink "/frooble" "symlink"
-  
-  outm_ "Symlink exists: "
-  ex <- path_exists' "symlink"
-  outm (show ex)
-  
-  outm_ "Path exists: "
-  ex <- path_exists "symlink"
-  outm (show ex)
-
-  removeLink "symlink"
-  
diff --git a/test/pipe.hs b/test/pipe.hs
deleted file mode 100644
--- a/test/pipe.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-import HsShellScript
-import System.IO
-
-main = mainwrapper $ do
-
-   hSetBuffering stdout (BlockBuffering (Just 10000))
-   hSetBuffering stderr (BlockBuffering (Just 10000))
-
-   erg <- pipe_from $
-         exec "/schwurbel" []
-
-   putStrLn erg
diff --git a/test/pipe_to_proc.hs b/test/pipe_to_proc.hs
deleted file mode 100644
--- a/test/pipe_to_proc.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-import HsShellScript
-
-main = do
-  outm "-1-"
-  subproc ( exec "/bin/echo" ["bla"]
-           -|= ( -- Do something with foo's output
-                 do cnt <- lazy_contents "-"
-                    outm ("in subprocess: read \"" ++ cnt ++ "\"")
-               )
-          )
-  outm "-2-"
diff --git a/test/redirect.hs b/test/redirect.hs
deleted file mode 100644
--- a/test/redirect.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-import HsShellScript
-
-main = do 
-  putStrLn "-1-"
-  runprog "/bin/echo" ["äöü"] ->- "/tmp/redirect"
-  putStrLn "-2-"
diff --git a/test/run.hs b/test/run.hs
deleted file mode 100644
--- a/test/run.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-import HsShellScript
-import Control.Exception
-import Prelude hiding (catch)
-
-main = do
-   outm "run:"
-   (mainwrapper $ run "/frooble" [])
-      `catch` (\(e::SomeException) -> print e)
-
-   outm "\n\nrunprog:"
-   (mainwrapper $ runprog "/frooble" [])
-      `catch` (\(e::SomeException) -> print e)
diff --git a/test/subproc.hs b/test/subproc.hs
deleted file mode 100644
--- a/test/subproc.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-import HsShellScript
-import Control.Exception
-import Data.Typeable
-
-data Ausnahme = Ausnahme
-   deriving (Show, Typeable)
-
-instance Exception Ausnahme
-
-
-main = mainwrapper $ do
-   subproc (throw Ausnahme)
diff --git a/test/tee.hs b/test/tee.hs
deleted file mode 100644
--- a/test/tee.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-import HsShellScript
-
-main = do
-   outm "Davor."
-   subproc
-     ( (err_to_out main')
-       -|- exec "/usr/bin/tee" ["/tmp/tee.log"] )
-   outm "Danach."
-
-main' =
-     outm "In main'"
diff --git a/test/test.hs b/test/test.hs
deleted file mode 100644
--- a/test/test.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-
-import HsShellScript
-
-main = do
-  outm "-1-"
-  subproc (outm "Durch die Röhre" -|- exec "/bin/cat" [])
-  outm "-2-"
-
-  mount <- pipe_from (exec "/bin/mount" [])
-  outm "Mount:"
-  outm mount
diff --git a/test/tieflegen.hs b/test/tieflegen.hs
deleted file mode 100644
--- a/test/tieflegen.hs
+++ /dev/null
@@ -1,417 +0,0 @@
--- tieflegen: Dateinamenteile zu Oberverzeichnissen machen
-
-import System.Directory
-import Control.Monad
-import Data.Maybe
-import System.IO
-import System.IO.Error hiding (catch)
-import System.Posix
-import Data.List
-import Text.Regex
-import Debug.Trace
-import Prelude hiding (catch)
-
---import Text hiding (zerlegen)
---import Kommandos
---import Arg hiding (d_probe)
---import Hsskripte
---import Datenbank
-import HsShellScript hiding (echo)
-
-
-
-header           = "tieflegen [Optionen] [Verzeichnisse]"
-args             = unsafe_getargs header descs
-descs            = [ d_trenner, d_verzl, d_ausrollen, d_verschieben, d_tiefe, d_gk_beachten, d_probe, d_umbenennen, d_ebenen,
-                     d_spalten, d_album
-                   ] ++ map za_arg zerlegungsarten
-
-trenner_normal   = " - "
-trennzeichen     = "-_ ~()"
-
-trenner          = fromMaybe trenner_normal $ optarg_req args d_trenner
-tiefe            = if arg_switch args d_album then 2 else read (fromMaybe "1" $ optarg_req args d_tiefe)
-pfade            = args_req args d_verzl
-probe            = arg_switch args d_probe
-beachten         = arg_switch args d_gk_beachten
-umbenennen       = arg_switch args d_umbenennen
-ebenen           = if arg_switch args d_album then 1 else read (fromMaybe "0" (optarg_req args d_ebenen))
-spalten          = arg_switch args d_spalten || arg_switch args d_album
-
-
-------------------------------------------------------------------------------------------------------------------------------------------------------
--- Möglichkeiten zu zerlegen. Hieraus Kommandozeilenparameter u.a.
-
--- Wenn nichts anderes gewählt
-normalzerleger    = trenner_zerleger trenner
-normalverschieben = False
-
-
-zerlegungsarten :: [ ( ArgumentDescription                                                      -- Kommandozeilenparameter
-                     , ArgumentDescription -> Arguments -> (Bool -> String -> [String])         -- daraus Zerleger
-                     , Bool                                                                     -- ob normal verschieben
-                     )
-                   ]
-zerlegungsarten =
-   [
-   -- Nach regulärem Ausdruck
-     ( argdesc [ desc_short 'r'
-               , desc_long "regex"
-               , desc_argname "Regex"
-               , desc_value_required
-               , desc_description $ "Teile durch reg. Ausdr. auszeichnen. Abgeglichen wird ein passender TEIL des Namens, nicht der ganze Namen.\n\
-                                    \      Bei " ++ argname d_verschieben ++ " sind nur die beabsichtigten Verzeichnisteile auszuzeichnen, sonst \n\
-                                    \      Verzeichnisteile und Dateinameteil. Außer bei " ++ argname d_ausrollen ++ " wird VERSCHOBEN."
-               ]
-     , \arg args -> regex_zerleger_t (fromJust (optarg_req args arg)) beachten
-     , True
-     )
-
-   -- An letztem Vorkommen des Trenners oder eines Spalters
-   , ( argdesc [ desc_short 's'
-               , desc_long "spalten-an"
-               , desc_argname "Spalter"
-               , desc_value_required
-               , desc_description $ "Am letzten Vorkommen des Spalters (normal der Trenner) spalten. Trennzeichen "
-                                    ++ quote trennzeichen ++ " fallenlassen. Außer\n      bei " ++ argname d_ausrollen ++ " wird VERSCHOBEN."
-               ]
-     , \arg args -> let tt = fromJust (optarg_req args arg)
-                    in  if null tt then throw (Meldung "Fehler: leerer Spalter")
-                                   else regex_zerleger_t ("^(.*)[" ++ trennzeichen ++ "]*" ++ intersperse '\\' tt) beachten
-     , True
-     )
-
-   -- Vor der ersten Zahl spalten
-   , ( argdesc [ desc_short 'z'
-               , desc_long "vor-zahl"
-               , desc_description $ "Den Teil vor der ersten Zahl zum Verzeichnisnamen machen. Außer bei\n      " ++ argname d_ausrollen ++
-                                         " wird VERSCHOBEN."
-               ]
-     , \arg args -> \versch txt -> case regex_zerleger_t "^([^0-9]+)[0-9]" beachten versch txt of
-                                      []     -> []
-                                      [teil] -> [reverse (dropWhile (`elem` trennzeichen) (reverse teil))]
-     , True
-     )
-
-   -- Bis zur ersten Zahl zum Verzeichnisnamen machen
-   , ( argdesc [ desc_long "bis-zahl"
-               , desc_description $ "Den Teil bis zur ersten Zahl zum Verzeichnisnamen machen. Außer bei\n      " ++ argname d_ausrollen ++
-                                         " wird VERSCHOBEN."
-               ]
-     , \arg args -> \versch txt -> case regex_zerleger_t "^([^0-9]+[0-9]*)" beachten versch txt of
-                                      []     -> []
-                                      [teil] -> [reverse (dropWhile (`elem` trennzeichen) (reverse teil))]
-     , True
-     )
-
-   -- Vor der letzten Zahl spalten
-   , ( argdesc [ desc_short 'l'
-               , desc_long "vor-letzter-zahl"
-               , desc_description $ "Den Teil vor der letzten Zahl zum Verzeichnisnamen machen. Außer bei\n      " ++ argname d_ausrollen ++
-                                         " wird VERSCHOBEN."
-               ]
-     , \arg args -> \versch txt -> case regex_zerleger_t "^(.*[^0-9])[0-9]" beachten versch txt of
-                                      []     -> []
-                                      [teil] -> [reverse (dropWhile (`elem` trennzeichen) (reverse teil))]
-     , True
-     )
-
-   -- Die erste Zahl als Verzeichnisname
-   , ( argdesc [ desc_short 'e'
-               , desc_long "erste-zahl"
-               , desc_description $ "Die erste Zahl zum Verzeichnisnamen machen. Außer bei\n      " ++ argname d_ausrollen ++
-                                         "wird VERSCHOBEN."
-               ]
-     , \arg args -> regex_zerleger_t "([0-9]+)" beachten
-     , True
-     )
-   ]
-
-
-za_arg         (arg, zerlegerf, verschieben) = arg
-za_zerlegerf   (arg, zerlegerf, verschieben) = zerlegerf
-za_verschieben (arg, zerlegerf, verschieben) = verschieben
-
-
-
-------------------------------------------------------------------------------------------------------------------------------------------------------
--- Kommandozeilenparameter
-
-d_trenner =
-   d_trenner_f trenner_normal
-
-d_verzl =
-   argdesc [ desc_direct
-           , desc_at_least 1
-           , desc_description ("Pfade, die getieft werden sollen")
-           ]
-
-d_tiefe =
-   argdesc [ desc_at_most_once
-           , desc_long "tiefe"
-           , desc_value_required
-           , desc_integer
-           , desc_argname "Ebenen"
-           , desc_description ("Bis zu so vielen Ebenen tief in Verzeichnisse verwandeln (normal eine)")
-           ]
-
-d_verschieben =
-   argdesc [ desc_short 'v'
-           , desc_long "verschieben"
-           , desc_description ("Nur verschieben, nicht umbenennen")
-           ]
-
-d_ausrollen =
-   argdesc [ desc_short 'a'
-           , desc_long "ausrollen"
-           , desc_description ("Namensteile zu Verzeichnissen machen und entfernen (normal nur verschieben).")
-           ]
-
-d_gk_beachten =
-   argdesc [ desc_short 'b'
-           , desc_long "beachten"
-           , desc_description ("Groß/Kleinschreibung beachten (normal nicht beachten)")
-           ]
-
-d_probe =
-   argdesc [ desc_short 'p'
-           , desc_long "probe"
-           , desc_description ("Probelauf - ausgeben wie umbenannt würde")
-           ]
-
-d_umbenennen =
-   argdesc [ desc_at_most_once
-           , desc_short 'U'
-           , desc_long "umbenennen"
-           , desc_description ("Im Falle einer Kollision umbenennen")
-           ]
-
-d_ebenen =
-   argdesc [ desc_at_most_once
-           , desc_short 'V'
-           , desc_long "verschmelzen"
-           , desc_argname "Ebenen"
-           , desc_description ("Höchstens so viele Ebenen tief verschmelzen, danach stattdessen umbenennen.")
-           , desc_nonneg_integer
-           , desc_value_required
-           ]
-
-d_spalten = 
-   argdesc [ desc_at_most_once
-           , desc_long "spalten"
-           , desc_description ("Ein zwei Teile spalten, d.h. alle abgetrennten Teile vereinen")
-           ]
-
-d_album = 
-   argdesc [ desc_at_most_once
-           , desc_long "album"
-           , desc_description ("Kurz für \"--spalten --tiefe=2 --verschmelzen=1\"")
-           ]
-
-
-------------------------------------------------------------------------------------------------------------------------------------------------------
--- Hauptteil
-
-main = mainwrapper $ do
-   seq args (return ())
-   args_at_most_one (map za_arg zerlegungsarten) args
-   args_at_most_one [d_verschieben, d_ausrollen] args
-   -- ? args_at_most_one [d_tiefe, d_album, d_ebenen, d_verschieben] args
-   hSetBuffering stdout (BlockBuffering (Just 10000))
-
-   outm "-01-"  --XX
-   let -- Zerleger aus den Kommandozeilenparametern bestimmen
-       (zerleger, zerl_verschieben) =
-          case filter (\za -> arg_occurs args (za_arg za)) zerlegungsarten of
-             [za] -> ( za_zerlegerf za (za_arg za) args, za_verschieben za )
-             []   -> ( normalzerleger, normalverschieben )
-
-       -- Ob verschoben wird aus den Kommandozeilenparametern bestimmen
-       verschieben = arg_occurs args d_album ||
-                     case (arg_switch args d_ausrollen, arg_switch args d_verschieben) of
-                        (True, False)  -> False
-                        (False, True)  -> True
-                        (False, False) -> zerl_verschieben
-
-   outm "-02-"  --XX
-   if probe
-      then do umbl <- Main.ausfuehren zerleger
-                                      verschieben
-                                      (\pfad verzteile neudn -> return (pfad, verzteile ++ [neudn]))
-                                      pfade
-              let tab = tabelle (repeat (\st feld -> gelb (linksbuendig st feld)))
-                                [gelb "alt", gelb "Neu"]
-                                (repeat linksbuendig)
-                                (map (\(pfad, teile) -> [pfad, concat (intersperse (hell "/") teile)]) umbl)
-              putStr (unlines tab)
-
-      else do zs <- zeitstempel
-              outm "-03-"  --XX
-              let log = unsplit_parts ["/home/v/log", zs ++ " tieflegen"]
-              h <- openFile log AppendMode
-              cwd <- getCurrentDirectory
-              hPutStrLn h ("Arbeitsverzeichnis: " ++ quote cwd ++ "\n")
-
-              outm "-04-"  --XX
-              Main.ausfuehren 
-                 zerleger
-                 verschieben
-                 (\pfad verzteile neudn -> do
-                      -- die neuen Verzeichnisse anlegen
-                      mapM_ (\verz -> (mkdir (unslice_path verz))
-                                         `catch` (\ioe -> if isAlreadyExistsError ioe then return () else ioError ioe)
-                            )
-                            (tail (inits verzteile))
-
-                      -- die Datei verschieben
-                      let zieldn = if verschieben then unslice_path (verzteile ++ [filename_part pfad])
-                                                  else unslice_path (verzteile ++ [neudn])
-                      ex <- do ex <- path_exists zieldn
-                               if ex then do rp_zieldn <- realpath zieldn
-                                             rp_pfad   <- realpath pfad
-                                             return (rp_zieldn /= rp_pfad)
-                                     else return False
-                      if ex && (not umbenennen)
-                         then errm (quote zieldn ++ " gibt es schon.")
-                         else do pfad_echt   <- realpath' pfad
-                                 zieldn_echt <- realpath' zieldn
-                                 when (pfad_echt /= zieldn_echt) $ do
-                                    zieldn' <- verschmelzen_n Nothing ebenen umbenennen pfad zieldn
-                                    when (pfad /= zieldn') $ do
-                                       hPutStrLn h ("   " ++ quote pfad ++ "\n-> " ++ quote zieldn' ++ "\n")
-                                       hFlush h
-
-                 )
-                 pfade
-                 
-              outm "-05-"  --XX
-              hClose h
-              return ()
-
-
--- Pfad zerlegen und die Bestandteile des neuen Pfades bestimmen. 
-
--- Dateinameanteil eines Pfades in Scheiben schneiden. Der ganze Verzeichnisteil kommt zusätzlich zur ersten Scheibe. Wenn flach, dann
--- kommt der erste Dateinamensteil zum Verzeichnisteil. Der Rest wird mit Trennern zusammengeklebt. Wenn nach Trenner getrennt wurde, kommt wieder das
--- gleiche dabei heraus. Wenn nicht (sondern mit reg. Ausdr.), dann etwas anderes. I.d.R. wird bei flach ein reg. Ausdr. aber auch nur zwei Teile
--- auszeichnen, dann spielt das keine Rolle.
-
-pfad_zerlegen :: Zerleger
-              -> String                         -- Trenner
-              -> Int                            -- So viele Ebenen tief ausrollen
-              -> Bool                           -- Ob Dateien verschieben, d.h. Dateiname nicht antasten
-              -> String                         -- Pfad
-              -> ( String                       -- Verzeichnis
-                 , [String]                     -- neue Verzeichnisse
-                 , String                       -- neuer Dateiname (das ist wieder der alte bei --verschieben)
-                 )
-pfad_zerlegen zerleger trenner tiefe verschieben pfad =
-   let (verz, dn) = 
-          split_path pfad
-
-       (verzteile, dnteil) =
-          if verschieben
-             then (zerleger verschieben dn, dn)
-             else case zerleger verschieben dn of
-                     []    -> ([], dn)
-                     teile -> letzten_ab teile
-
-       verzteile_ausrollen = take tiefe verzteile
-       verzteile_behalten  = drop tiefe verzteile
-
-   in  ( verz
-       , if spalten && not (null verzteile_ausrollen) 
-            then [concat (intersperse trenner verzteile_ausrollen)]
-            else verzteile_ausrollen
-       , concat (intersperse trenner (verzteile_behalten ++ [dnteil]))
-       ) 
-
-
--- Pfade zerlegen, d.h. Bestandteile der Dateinamen erkennen, und etwas damit machen.
-ausfuehren :: Zerleger
-           -> Bool                              -- ob Dateien nur verschieben (und nicht umbenennen)
-           -> (   String                        -- Pfad
-               -> [String]                      -- erkannte Verzeichnisteile
-               -> String                        -- erkannter Dateinameteil
-               -> IO a                          -- Ergebnis wird durchgereicht an Aufrufer. Kann Weiter werfen, um nichts zurückzugeben.
-              )
-           -> [String]                          -- Pfade
-           -> IO [a]
-ausfuehren zerleger verschieben aktion pfade = do
-   erg <-
-      foldM (\erg pfad ->
-                do let (verz, verzteile, dnteil) = pfad_zerlegen zerleger trenner tiefe verschieben pfad
-                   when (any null (dnteil : verzteile)) $ do
-                      errm $ "Zerlegung liefert leeren Teil. Übersprungen.\n\
-                             \   Dateiname: " ++ quote (filename_part pfad) ++ "\n\
-                             \   Zerlegung: " ++ show verzteile ++ " - " ++ show dnteil
-                      throw Weiter
-                   e_logm ("Zerlegung von " ++ quote pfad ++ " :  " ++ show verzteile ++ ",  " ++ quote dnteil)
-                   erg1 <- aktion pfad verzteile dnteil
-                   return (erg1 : erg)
-
-                `catch` (\Weiter -> return erg)
-            )
-            []
-            pfade
-   return (reverse erg)
-
-
-
-
-------------------------------------------------------------------------------------------------------------------------------------------------------
--- Die Zerleger
---
--- Werden auf den Dateiname, ohne Verzeichnisteil, mit Erweiterung, angewendet. Liefern alle vom Benutzer gemeinten Teile. Das sind die direkt
--- angegebenen, bzw. je nachdem ob --verschieben gewählt ist. Sie werden von pfad_zerlegen angewendet.
---
--- Die gemeinten Teile sind bei Verschieben die neuen Oberverzeichnisse, ohne Verschieben die neuen Verzeichnisse und der neue Dateiname.
-
-
-type Zerleger =    Bool         -- ob die Datei nur verschoben werden soll
-                -> String       -- Dateiname (ohne Pfad)
-                -> [String]     -- gefundene Teile
-
-
--- Text anhand Trenner in Scheiben schneiden.
--- Liefert bei --verschieben alle Teile außer dem letzten, sonst alle.
-trenner_zerleger :: String -> Zerleger
-trenner_zerleger trenner verschieben txt =
-   if verschieben then fst (letzten_ab zerlegung)
-                  else zerlegung
-   where
-      trenner_zerleger' trenner txt =
-         case teiltext trenner txt of
-            Just (davor, danach) -> davor : trenner_zerleger' trenner danach
-            Nothing              -> [txt]
-
-      zerlegung = trenner_zerleger' trenner txt
-
-
--- Zerleger aus fertig übersetztem regulärem Ausdruck.
-regex_zerleger :: Regex -> Zerleger
-regex_zerleger re verschieben txt =
-   case matchRegex re txt of
-      Just teile -> case teile of
-                       [] -> [txt]
-                       t  -> t
-      Nothing    -> []
-
-
--- Zerleger aus regulärem Ausdruck, der als String gegeben ist.
-regex_zerleger_t :: String              -- Reg. Ausdr.
-                 -> Bool                -- ob Großkleinschreibung beachten
-                 -> Zerleger
-regex_zerleger_t regex beachten =
-   regex_zerleger (mkRegexWithOpts regex False beachten)
-
-
-
-------------------------------------------------------------------------------------------------------------------------------------------------------
--- Allgemeines
-
--- Letztes Element abtrennen
-letzten_ab :: [a] -> ([a], a)
-letzten_ab l =
-   let (z:ys) = reverse l
-   in  (reverse ys, z)
diff --git a/test/z.c b/test/z.c
deleted file mode 100644
--- a/test/z.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <unistd.h>
-#include <stdio.h>
-
-void print_utf8(char puf[], int len);
-
-
-main()
-{
-  char puf[1024];
-  int  len;
-
-  len = read(0, puf, 1024);
-  print_utf8(puf, len);
-}
-
-
-
-void print_utf8(char puf[], int len) 
-{
-  int idx = 0;
-
-  do {
-    if (puf[idx] & 0x80) 
-      printf("!");
-    printf("%02x ", puf[idx] & 0xFF);
-    idx++;
-  } while (idx < len);
-
-  printf("\n\"");
-  for (idx = 0; idx < len; idx++)
-    printf("%c", puf[idx]);
-  printf("\"\nLänge = %d\n",len);
-}
