The Haskell Ports Library http://www.cse.unsw.edu.au/~chak/haskell/ports/

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

LGPL licensed by Manuel M T Chakravarty
Maintained by dons@cse.unsw.edu.au
Haskell Ports Library -*-text-*-

The Haskell Ports Library (HPL) supports concurrent and distributed computing
in the IO monad _without_ relying on mutable variables. Instead, it supplies
monotone single-assignment variables and ports abstractions. More details at


Haskell is a state-of-the-art general purpose, purely functional programming
language. It combines modern language design and a solid formal foundation
with the features required for real-world programming - details are available



AUTHORS -- Author information
COPYING.LIB -- GNU Library General Public License (LGPL)
ChangeLog -- Change history
INSTALL -- Help on installing this package
Makefile -- Root makefile
NEWS -- Information on the latest development
README -- This file
TODO -- Roadmap and known bugs
configure.in -- GNU autoconf input
configure -- Automatic configuration file created by GNU autoconf
lib -- The library proper
mk -- Global makefile definitions
tests -- Test modules & examples

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= INSTALLING =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

See the file `INSTALL'.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- COPYLEFT -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Library General Public License as published by the Free
Software Foundation; either version 2 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 Library General Public License for more

You should have received a copy of the GNU Library 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.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- CREDITS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Manuel M T Chakravarty <chak@cse.unsw.edu.au>
Duncan Coutts <duncan@coutts.uklinux.net>
Donald Stewart <dons@cse.unsw.edu.au>

Thanks to Marcin Kowalczyk <qrczak@knm.org.pl> and Michael Weber
<michael.weber@post.rwth-aachen.de> for useful suggestions and to Gabriele
Keller <keller@it.uts.edu.au> for debugging help. Thanks also to David Sankel
for his `shell-haskell' library where I got some inspiration for the revised
fork/exec handling in `Processes.proc'.


Maintained by Manuel M. T. Chakravarty <chak@cse.unsw.edu.au> who
gratefully accepts any bug reports, suggestions, and code contributions.
The latter are implied to be made under the terms of the LGPL.


2004-05-14 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* Previous four improvements are courtesy Donald Stewart

* tests/test.sh: Regress script

* package.conf.in: Added package spec

* lib/Makefile: Needs a name in the ghc package system

* lib/Processes.hs (forkExec): fix code to follow semantics of
post 6.2 forkProcess

* lib/PortsVersion.hs (versnum): 0.4.3

2003-07-07 Manuel M T Chakravarty <chak@cse.unsw.edu.au>

* lib/Processes.hs (procGrpKill): added
(procGrp): added

2003-06-23 Manuel M T Chakravarty <chak@cse.unsw.edu.au>

* lib/Ports.hs (waitForThread): added
(waitForPort): added
(waitForPortThread): added
(closeAndWaitForPort): added
(openPort): added
(closePort): repeated closing is offset by opening of ports

* lib/PortsVersion.hs (versnum): 0.4.2

* tests/ProcPipe.hs: using `PortThreads'

* tests/TestProcesses.hs: using `PortThreads'

* lib/Processes.hs (procKill): Added the signal type as an argument

2003-06-22 Manuel M T Chakravarty <chak@cse.unsw.edu.au>

* lib/Ports.hs (closePort): Explicitly allow repeated calls to
this routine.

* lib/Processes.hs (proc): redid the process fork()ing and
exec()ing (using a scheme gleaned from David Sankel's
`shell-haskell') plus assorted other cleanup

2003-06-18 Manuel M T Chakravarty <chak@cse.unsw.edu.au>

* lib/PortThreads.hs: new experimental API that couples port
creation with spawning a listener thread

* lib/SVars.hs (valV): Needs a NOINLINE

2003-06-17 Manuel M T Chakravarty <chak@cse.unsw.edu.au>

* lib/Processes.hs: Two fixes due to changes in GHC 6.0's libraries

* lib/PortsVersion.hs (versnum): 0.4.1

2003-02-28 Manuel M T Chakravarty <chak@cse.unsw.edu.au>

* lib/ThreadUtils.hs: (<&>), (&>) courtesy of Duncan Coutts

* lib/PortsVersion.hs (versnum): 0.4.0 "A Cold Southerly"

2002-09-15 Manuel M T Chakravarty <chak@AttitudeAdjuster>

* aclocal.m4 (PORTS_GHC_VERSION): made Solaris and FreeBSD friendly

* lib/PortsVersion.hs (versnum): 0.3.4

2001-07-04 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Processes.hs (procKill): added

2001-07-03 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Processes.hs (proc): gracefully handle the case where child
processes vanish; eg, because SIGCHLD is set to SIG_IGN
(runProcess): make this more save re execve() failing

2001-06-30 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Ports.hs (withPorts): added
(keepAlivePort): added
(keepAliveForkIO): added

* lib/SVars.hs (&): made exception safe

2001-06-29 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Processes.hs (toProc): adapt to change in (<==)

* lib/Ports.hs (<==): doesn't use a fork anymore; it's too unintuitive

* configure.in (GHC): debugged

* Makefile (TARFILES): debugged

* lib/PortsVersion.hs (versnum): 0.3.3

2001-06-24 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* ports-config.in (syslibs): updated

* lib/Ports.hs (waitUntilClosedPort): added
(setupPort): revised port creation code and thereby removed a bug in

* lib/PortsVersion.hs (versnum): 0.3.2

2001-06-19 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* ports-config.in: corrected

2001-06-04 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/PortsConfig.hs.in: added

* lib/Ports.hs (newFilteringPort): worked around the problem with
finalisers not counting as threads when the GC determines
indefinitely blocked threads and whether the program is deadlocked

2001-06-03 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* configure.in: added --enable-debug

2001-06-02 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Ports.hs (newFilteringPort): ports are automagically closed
when garbage collected
(ensureRegularGC): kludge to avoid deadlocks due to delay in
running finalisers

* lib/Processes.hs (Proc): changed type to use explicit ports for

* lib/Ports.hs (chainPorts): added
(<==): clarified semantics and reduced deadlock potential

* lib/PortsVersion.hs (versnum): 0.3.1

2001-05-25 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Processes.hs (proc): added
(toProc): added

2001-05-14 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* mk/common.mk: generic link rules

* Makefile (ghci): added ghci target

* lib/Processes.hs: started child process management

* lib/PortsVersion.hs (versnum): 0.3.0 "Autumn Sun"

2001-02-22 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Ports.hs: the `yield' bug magically disappeared with GHC 4.08

* lib/PortsVersion.hs (versnum): 0.2.2

2000-10-05 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* Added space characters after backslashes used for multiline
strings; otherwise, the sources can't be run through cpp - as
pointed out by Michael Weber <michael.weber@post.rwth-aachen.de>

* aclocal.m4: stole PORTS_GHC_VERSION from fptools

* lib/PortsVersion.hs (versnum): 0.2.1

2000-07-05 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Ports.hs (PortNotifier): added
(newProxyPort): added
(listenToPort): added
(linkPorts): added

* lib/PortsVersion.hs (versnum): 0.2.0 "Pacific Air"

2000-06-14 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Ports.hs: debugged

* lib/PortsVersion.hs (versnum): 0.1.2

2000-06-08 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/Ports.hs: Changed the representation of empty closed ports
to avoid races

2000-06-07 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* lib/PortsVersion.hs (versnum): 0.1.1

2000-06-04 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* Makefile: installation

* toplevel: filled in missing pieces

2000-05-21 Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

* (setup): reorganistion of alpha code as standalone library
Depends on 3 packages:
Used by 1 package:
comments powered byDisqus