Commit f8d1d20e authored by sof's avatar sof

[project @ 1997-05-19 06:25:00 by sof]

ghc-2-03-p1 merged onto main trunk
parent 3ea96a14
......@@ -10,7 +10,7 @@ Haskell is "the" standard lazy functional programming language; the
current language version is 1.4, agreed in March, 1997. The Haskell
Report is online at
http://haskell.cs.yale.edu/1.4/
http://haskell.org/report/
GHC 2.02 is a beta-quality release:
......@@ -20,14 +20,17 @@ GHC 2.02 is a beta-quality release:
because we don't have a comprehensive set (Donations of Haskell 1.4
programs to our test suite are most welcome).
* It should generate good code.
* It should generate reasonably good code.
All the optimisations that GHC 0.29 used to do are back in, with
the exception of specialisation. It ought to be the case that
GHC 2.02 outperforms GHC 0.29, because it has a much better
handle on cross-module inlining, but there's a good chance that
there are performance "holes" lurking. We have yet to make
a systematic comparison. (Please send us programs where 2.02
does noticeably worse than 0.29.)
handle on cross-module inlining, but we know for certain that
this isn't always the case. We have yet to make a systematic
comparison. In short, this is not the moment to switch from 0.29
if you Really Care about performance. 2.02 does, however,
generate much better code than 2.01.
(Please send us programs where 2.02 does noticeably worse than 0.29.)
* It is more expensive than it should be.
GHC 2.02 has received even less attention to its own performance.
......@@ -112,13 +115,21 @@ comp.lang.functional FAQ http://www.cs.nott.ac.uk/Department/Staff/mpj/faq.html
======================================================================
How to get GHC 2.02:
This release is available by anonymous FTP from the main Haskell
The easy way is to go to the WWW GHC distribution page, which is
self-explanatory:
ftp://ftp.dcs.gla.ac.uk/pub/haskell/glasgow/README.html
----------------------------------------------------------------------
Otherwise you can use the old anonymous FTP method from the main Haskell
archive sites, in the directory pub/haskell/glasgow:
ftp.dcs.gla.ac.uk (130.209.240.50)
ftp.cs.chalmers.se (129.16.227.140)
haskell.cs.yale.edu (128.36.11.43)
[BUT: the latter two sites may take a while to get up to date.]
The Glasgow site is mirrored by src.doc.ic.ac.uk (146.169.43.1), in
computing/programming/languages/haskell/glasgow.
......
The Glasgow Haskell Compiler -- version 2.03
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We are pleased to announce the Glasgow Haskell Compiler version 2.03.
GHC 2.03 is a minor upgrade of GHC 2.02. It differs in the following
ways:
* A slew of small bugs are fixed. You can find the complete list
at http://www.cse.ogi.edu/~simonpj/ghc-bugs.html
* Last-minute language changes have been implemented (minor changes
to the libraries, and to module export/hiding scope rules)
* It is only available as a source distribution. If you want to
use it you'll have to build it from source. Nowadays this is
a well-documented process (see the build & installation guide).
None of the bugs in GHC 2.02 are show-stoppers, so you'll only want
to upgrade if you are a build-from-source junkie and the bugs are
irritating you.
Simon Peyton Jones
Sigbjorn Finne
======================================================================
How to get GHC 2.03:
The easy way is to go to the WWW GHC distribution page, which is
self-explanatory:
ftp://ftp.dcs.gla.ac.uk/pub/haskell/glasgow/README.html
......@@ -10,13 +10,18 @@ TOP=.
include $(TOP)/mk/boilerplate.mk
SRC_DIST_DIR=$(shell pwd)/$(SRC_DIST_NAME)
SUBDIRS = $(ProjectsToBuild)
#
# Totally evil hack to make the setting of SUBDIRS be dependent
# on whether we do `make install' or not. Having a $(ifeq ... ) would
# be preferable..
CURRENT_TARGET = $@
SUBDIRS = $(shell if (test x$(CURRENT_TARGET) = xinstall) ; then echo $(ProjectsToInstall); else echo $(ProjectsToBuild); fi)
#
# Files to include in fptools source distribution
#
SRC_DIST_DIRS += mk $(ProjectsToBuild)
SRC_DIST_FILES += configure.in config.guess config.sub configure README ANNOUNCE NEWS INSTALL Makefile
SRC_DIST_DIRS += mk docs CONTRIB $(ProjectsToBuild)
SRC_DIST_FILES += configure.in config.guess config.sub configure README ANNOUNCE ANNOUNCE-2.02 NEWS INSTALL Makefile install-sh
#
......@@ -63,46 +68,46 @@ binary-dist::
# Needless to say, the rule below could be cleaned up somewhat.
#
binary-dist::
@$(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/ghc-2.02
@$(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/ghc-2.02
@$(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/ghc-2.02
@$(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/$(GhcProjectNameShort)-$(GhcProjectVersion)
@$(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/$(GhcProjectNameShort)-$(GhcProjectVersion)
@$(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/$(GhcProjectNameShort)-$(GhcProjectVersion)
@echo "Making html documentation.."
@echo "For fptools.."
#$(MAKE) -C docs --no-print-directory $(MFLAGS) html
#cp -f docs/html/* docs/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/ghc-2.02
#cp -f docs/html/* docs/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/$(GhcProjectNameShort)-$(GhcProjectVersion)
#@echo "Done."
#@for i in $(BIN_DIST_DIRS); do \
# echo "For $$i.."; \
# echo cp -f $$i/docs/users_guide/html/* $$i/docs/users_guide/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/ghc-2.02; \
# cp -f $$i/docs/users_guide/html/* $$i/docs/users_guide/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/ghc-2.02; \
# echo cp -f $$i/docs/html/* $$i/docs/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/ghc-2.02; \
# cp -f $$i/docs/html/* $$i/docs/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/ghc-2.02; \
# echo cp -f $$i/docs/users_guide/html/* $$i/docs/users_guide/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# cp -f $$i/docs/users_guide/html/* $$i/docs/users_guide/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# echo cp -f $$i/docs/html/* $$i/docs/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# cp -f $$i/docs/html/* $$i/docs/*.html $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/html/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# echo "Done."; \
#done
##@echo "Making dvi files.."
#@echo "For fptools.."
#-$(MAKE) -C docs --no-print-directory $(MFLAGS) dvi
#-cp -f docs/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/ghc-2.02
#-cp -f docs/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/$(GhcProjectNameShort)-$(GhcProjectVersion)
#@echo "Done."
#@for i in $(BIN_DIST_DIRS); do \
# echo "For $$i.."; \
# echo cp -f $$i/docs/users_guide/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/ghc-2.02; \
# cp -f $$i/docs/users_guide/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/ghc-2.02; \
# echo cp -f $$i/docs/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/ghc-2.02; \
# cp -f $$i/docs/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/ghc-2.02; \
# echo cp -f $$i/docs/users_guide/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# cp -f $$i/docs/users_guide/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# echo cp -f $$i/docs/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# cp -f $$i/docs/*.dvi $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/dvi/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# echo "Done."; \
#done
#@echo "Making info files.."
#@echo "For fptools.."
#-$(MAKE) -C docs --no-print-directory $(MFLAGS) info
#-cp -f docs/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/ghc-2.02/
#-cp -f docs/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/$(GhcProjectNameShort)-$(GhcProjectVersion)/
#@echo "Done."
#@for i in $(BIN_DIST_DIRS); do \
# echo "For $$i docs.."; \
# echo cp -f $$i/docs/users_guide/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/ghc-2.02; \
# cp -f $$i/docs/users_guide/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/ghc-2.02; \
# echo cp -f $$i/docs/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/ghc-2.02; \
# cp -f $$i/docs/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/ghc-2.02; \
# echo cp -f $$i/docs/users_guide/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# cp -f $$i/docs/users_guide/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# echo cp -f $$i/docs/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# cp -f $$i/docs/*.info $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/info/$(GhcProjectNameShort)-$(GhcProjectVersion); \
# echo "Done."; \
#done
......@@ -119,7 +124,7 @@ binary-dist ::
bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/ghc-$(ProjectVersion) \
libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/ghc-$(ProjectVersion)/hslibs \
libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/ghc-$(ProjectVersion)/hslibs \
datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share/$$i-$(ProjectVersion) ;
datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share/ghc-$(ProjectVersion) ;
# Even more of a hack, but I'm too tired to fix this up right now..
BIN_DIST_SCRIPTS_NEEDING_RENAMING=ghc stat2resid hstags mkdependHS
......
......@@ -22,7 +22,7 @@
# Note, if you specify /usr/foo/lib for libdir,
# the library files for your fptools package will be
# installed in /usr/foo/lib/<package>-<version>, e.g.,
# /usr/foo/lib/ghc-2.02. If you don't want the package/version
# /usr/foo/lib/ghc-2.03. If you don't want the package/version
# directory appended, you'll have to modify $(real_libdir)
# below.
#
......@@ -78,7 +78,7 @@ real_libdir = $(libdir)/$(package)-$(version)
real_datadir = $(datadir)/$(package)-$(version)
package = ghc
version = 2.02
version = 2.03
PERL = @PerlCmd@
RM = rm -f
MV = mv
......@@ -91,7 +91,7 @@ INSTALL_DIR = ./mkdirhier
#
# Set of package scripts for which you'd like a name-<version> symlink
# to be created, i.e., create a symlink, ghc-2.02, pointing to ghc to
# to be created, i.e., create a symlink, ghc-$(version), pointing to ghc to
# avoid version vertigo.
#
VERSION_SYMLINKS_FOR=ghc
......@@ -184,7 +184,7 @@ in-place ::
install-dirs ::
$(INSTALL_DIR) $(bindir)
(cd lib/$(platform)/$(package)-$(version); find . -type d -exec sh -c '../../../$(INSTALL_DIR) $$0 $(real_libdir)/$$0' {} \; )
(cd share/$(package)-$(version); find . -type d -exec sh -c '../../$(INSTALL_DIR) $$0 $(real_datadir)/$$0' {} \; )
(cd share/$(package)-$(version); find . -type d -exec sh -c '../../$(INSTALL_DIR) $(real_datadir)/$$0' {} \; )
install :: config-pkgs mk-version-symlinks install-dirs install-bin install-libs install-datas
......
......@@ -97,7 +97,7 @@ doesn't work any more.
\item[The CVS repository.]
We make source distributions at the same time as binary distributions;
i.e. infrequently. They should, however, be pretty throughly tested.
i.e. infrequently. They should, however, be pretty thoroughly tested.
If you want more up-to-the minute (but less tested) source code then you
need to get access to our CVS repository.
......@@ -184,9 +184,8 @@ A ``platform'' is a
architecture/manufacturer/operating-system combination,
such as @sparc-sun-solaris2.5.1@. Other common ones are
@alpha-dec-osf2@, @hppa1.1-hp-hpux9@, @i386-unknown-linux@,
@i386-unknown-solaris2@, @i386-unknown-freebsd@,
@m68k-sun-sunos4@, @mips-sgi-irix5@,
@sparc-sun-sunos4@, @sparc-sun-solaris2@.
@i386-unknown-solaris2@, @i386-unknown-freebsd@, @i386-unknown-cygwin32@,
@m68k-sun-sunos4@, @mips-sgi-irix5@, @sparc-sun-sunos4@, @sparc-sun-solaris2@.
Bear in mind that certain ``bundles'', e.g. parallel Haskell, may not
work on all machines for which basic Haskell compiling is supported.
......@@ -216,7 +215,7 @@ unsurprisingly. Both have native-code generators, for quicker
compilations. The native-code generator for iX86 platforms (e.g.,
Linux ELF) is {\em nearly} working; but is not turned on by default.
Here's everything that's known about GHC ports, as of 2.01. We
Here's everything that's known about GHC ports, as of 2.02. We
identify platforms by their ``canonical GNU-style'' names.
Note that some ports are fussy about which GCC version you use; or
......@@ -432,15 +431,14 @@ to run the @configure@ script by changing your directory to @fptools@.
That should convert @Makefile.in@ to @Makefile@.
You can now either start using the tools {\em in-situ} without going
through any installation process, just type @make config@ to set the
tools up for this (you have to be in the @fptools@ directory). You'll
also want to add the path which @make@ echoes to your @PATH@
environment variable. This option is useful if you simply want to try
out the package or you don't have the necessary priviledges (or
through any installation process, just type @make in-place@ to set the
tools up for this (you have to be in the @fptools@ directory for
this). You'll also want to add the path which @make@ will now echo to
your @PATH@ environment variable. This option is useful if you simply want
to try out the package and/or you don't have the necessary priviledges (or
inclination) to properly install the tools locally. Note that if you
do decide to install the package `properly' at a later date, you have
to go through the installation steps that
follows.
to go through the installation steps that follows.
To install an @fptools@ package, you'll have to do the following:
......@@ -1003,11 +1001,15 @@ In any directory you should be able to make the following:
for the real work. Notably, it does @gmake depend@ in all directories
that contain programs. But @boot@ does more. For example, you can't
do @gmake depend@ in a directory of C program until you have converted
the literate @.lh@ header files into standard @.h@ header files. Similarly, you convert a literate file to illiterate
form until you have built the @literate@ tools. @boot@ takes care of these
the literate @.lh@ header files into standard @.h@ header files.
Similarly, you convert a literate file to illiterate form until you
have built the @literate@ tools. @boot@ takes care of these
inter-directory dependencies.
You should say @gmake boot@ right after configuring your build tree.
You should say @gmake boot@ right after configuring your build tree,
but note that this is a one-off, i.e., there's no need to re-do
@gmake boot@ if you should re-configure your build tree at a later
stage (no harm caused if you do though).
\item[@all@:] makes all the final target(s) for this Makefile.
Depending on which directory you are in a ``final target''
......
This is the pre-mangled text of the 2.02-specific part of the
GHC release notes.
This is the release notes for GHC-2.03, describing what's new since the
previous release:
======================================================================
Release~2.02 is the first release of Glasgow Haskell for Haskell~1.4.
GHC 2.03 is a minor upgrade of GHC 2.02. It differs in the following
ways:
The announcement for this release is distributed as \tr{ANNOUNCE-2.02}
in the top-level directory. It contains very important caveats about
2.02, which we do not repeat here!
* A slew of small bugs are fixed. You can find the complete list at
Information about ``what's ported to which machine'' is in the
Installation Guide. Since 2.01, we've added support for Win32
(Windows NT and Windows 95).
http://www.cse.ogi.edu/~simonpj/ghc-bugs.html
%************************************************************************
%* *
\subsection[2-02-config]{New configuration things in 2.02}
%* *
%************************************************************************
%************************************************************************
%* *
\subsection[2-02-user-visible]{User-visible changes in 2.02, including incompatibilities}
%* *
%************************************************************************
GHC~2.02 is a compiler for Haskell~1.4 and, as such, introduces a
bunch of user-visible changes. The GHC user's guide has a section to
help you upgrade your programs to Haskell~1.4 from 1.2; all
user-visible changes are described there (and not repeated here).
One bug remains un-fixed, namely the crash when there's an empty
comment at the end of file.It's wierd!
%************************************************************************
%* *
\subsection[2-02-options]{New or changed GHC command-line options}
%* *
%************************************************************************
\begin{itemize}
\item GHC now warns of possibly-incomplete patterns in case expressions
and function bindings. You can suppress these warnings with @-fno-warn-incomplete-patterns@.
* Last-minute language changes have been implemented (minor changes
to the libraries, and to module export/hiding scope rules)
GHC also warns of completely overlapped patterns. You can't switch this off.
* It is only available as a source distribution. If you want to
use it you'll have to build it from source. Nowadays this is
a well-documented process (see the build and installation guide, but
note that this release is still not self-booting, you still need
to have The Good Old Compiler (0.29) at your disposal).
\item GHC can warn of shadowed names, though it does not do so by default.
Just occasionally this shows up
an otherwise hard-to-find bug. To warn of shadowed names use @-fwarn-name-shadowing@
None of the bugs in GHC 2.02 are show-stoppers, so you'll only want
to upgrade if you are a build-from-source junkie and the bugs are
irritating you.
\item You can now generate `make' dependencies via the compiler
driver, use the option @-M@ together with the list source files to compute
the dependencies for. By default, the dependencies will be appended to
the file \tr{Makefile} in the current directory.
\item For hackers, the flag @-dshow-rn-trace@ shows what the renamer is up to.
Sit back and marvel.
Apart from bug-fixes, which are itemized elsewhere,
the exact language and standard-library changes are as follows:
\end{itemize}
* A hiding clause hides the unqualified name, but not the qualified name.
* There's a new @Numeric@ library, containing mostly mildly marginal
code for showing and reading numbers. Parts of its exports used to be
exported by @Prelude@, but now you'll have to import them explicitly.
It also defines some functions that weren't provided before; have a
look in the Haskell library report for details of complete interface.
%************************************************************************
%* *
\subsection[2-02-new-in-compiler]{New in the compiler proper}
%* *
%************************************************************************
* The following extra functions are exported from IO:
\begin{itemize}
\item
Completely new ``make-world'' system, properly documented (at last) in the
installation guide. No Jmakefiles; but you *need* Gnu make
(gmake). The more recent the better (v 3.70+).
try, bracket, bracket_, hGetLine, hWaitForInput
\item
The ``renamer''---the part of the compiler that implements
the Haskell module system---has been completely rewritten, again.
In addition, we've made following changes to GHC libraries/GHC's
implementation of the Haskell standard prelude:
The format of interface files has changed significantly. Interface files
generated by 2.01 will not work with 2.02.
\item
Even less special pleading for the Prelude than in 2.01. If you wanted
to write your own Prelude and drop it in, you would have
a really good chance now.
\end{itemize}
* The function fromRational__, exported from PrelNum, is now called fromRat
(And it's exported by @Numeric@).
* Documentation for the Glasgow specific interfaces plus the system
libraries have been re-instated. Posix library documentation
included also.
%************************************************************************
%* *
\subsection[2-02-new-in-libraries]{In the libraries}
%* *
%************************************************************************
* `maybe' is now exported from Prelude, as it should have been in 2.02.
The libraries have been completely reorganised. There's a description in
\sectionref{syslibs}.
* Equality on IO.Handle is now defined as specified by the library report.
* Ix.rangeSize returns `0' on an empty range;previously it failed.
%************************************************************************
%* *
\subsection[2-02-new-in-syslibs]{In ``hslibs'' libraries}
%* *
%************************************************************************
* The new interface GlaExts which is meant to be the gateway to the
various Glasgow extensions has now been documented.
* GlaExts now exports the representation of Char
%************************************************************************
%* *
\subsection[2-02-new-in-rts]{In the runtime system}
%* *
%************************************************************************
* The mutable variable interface, MutVar, has also been documented,
together with ByteArray, MutableArray and Foreign.
\begin{itemize}
\item @ForeignObjs@ are properly deallocated when execution halts, as well
as when the garbage collector spots the @ForeignObj@ as being unreferenced.
This is important if you are using a @ForeignObj@ to refer to
a @COM@ object or other remote resource. You want that resource to be relased
when the program terminates.
\item Files handles in the IO prelude are implemented using
@ForeignObjs@, and closed when the file handle is unreferenced. This
means that if you open zillions of files then just letting go of the
file handle is enough to close it.
\end{itemize}
%************************************************************************
%* *
\subsection[2-02-new-elsewhere]{Other new stuff}
%* *
%************************************************************************
2.02 is released together with Green Card, a foreign-language
interface generator for Haskell. More details elsewhere...
%************************************************************************
%* *
\subsection[2-02-troublespots]{Known troublespots}
%* *
%************************************************************************
The 2.02 compiler has the following known deficiencies:
\begin{description}
\item[native code generator, x86:]
The native code generator for x86 platforms is by default switched
off, as the code the compiler produces with it enabled was discovered
just before releaseing to be wonky. Rather than delay the release
further, GHC on x86 platforms rely on \tr{GCC} as their
backend for now. Hopefully fixed soon.
\item[Simplifier looping:]
The simplifier(Glasgow-speak for optimiser) has been observed to get
into a loop in one or two cases. If you should observe this, please
report it as a bug - the work around is to turn off optimisation.
\item[Undefined @*_vap_info@ symbols:]
If the linker complains about some undefined @*_vap_info@ symbols when
linking 2.02 compiled programs (very unlikely) - fix this by compiling
the module where the references are coming from with
@-fno-lambda-lifting@.
\end{description}
* Added documentation on how to compile mutually recursive modules with
2.03.
# -----------------------------------------------------------------------------
# $Id: Makefile,v 1.13 1997/05/19 00:22:33 sof Exp $
TOP = ..
include $(TOP)/mk/boilerplate.mk
......@@ -365,6 +364,7 @@ SRC_HSTAGS_OPTS += -fglasgow-exts -cpp
include $(TOP)/mk/target.mk
#
# Special extra dependencies for yukky ugen stuff
#
......
......@@ -20,8 +20,15 @@ import UniqFM ( SYN_IE(Uniquable) )
\begin{code}
data FieldLabel
= FieldLabel Name -- Also used as the Name of the field selector Id
Type
FieldLabelTag
Type -- Type of the field; may have free type variables that
-- are the tyvar of the constructor
-- e.g. data T a = MkT { op1 :: a -> a, op2 :: a -> Int }
-- The type in the FieldLabel for op1 will be simply (a->a).
FieldLabelTag -- Indicates position within constructor
-- If the same field occurs in more than one constructor
-- then it'll have a separate FieldLabel on each occasion,
-- but with a single name (and presumably the same type!)
type FieldLabelTag = Int
......
......@@ -388,10 +388,13 @@ uppCostCentre sty print_as_string cc
do_cc (NormalCC kind mod_name grp_name is_dupd is_caf)
= let
basic_kind = do_caf is_caf ++ do_kind kind
basic_kind = do_caf is_caf ++
moduleString mod_name ++
('/' : _UNPK_ grp_name) ++
('/' : do_kind kind)
in
if friendly_sty then
do_dupd is_dupd (basic_kind ++ ('/': moduleString mod_name) ++ ('/': _UNPK_ grp_name))
do_dupd is_dupd basic_kind
else
basic_kind
where
......@@ -402,11 +405,12 @@ uppCostCentre sty print_as_string cc
do_kind (AutoCC id) = do_id id ++ (if friendly_sty then "/AUTO" else "")
do_kind (DictCC id) = do_id id ++ (if friendly_sty then "/DICT" else "")
{-
do_id is only applied in a (not print_as_string) context for local ids,
hence using the occurrence name is enough.
-}
do_id :: Id -> String
do_id id
= if print_as_string
then getOccString id -- use occ name
else showId sty id -- we really do
do_id id = getOccString id
---------------
do_dupd ADupdCC str = if friendly_sty then str ++ "/DUPD" else str
......
......@@ -390,15 +390,27 @@ lex_scc buf =
buf'' -> ITscc (mkAllDictsCC (lexemeToFastString buf'') _NIL_ True):
lexIface (stepOn (stepOverLexeme buf''))
Nothing ->
let
match_user_cc buf =
case untilChar# buf '/'# of
buf' ->
let mod_name = lexemeToFastString buf' in
case untilChar# (stepOn (stepOverLexeme buf')) '/'# of
buf'' ->
let grp_name = lexemeToFastString buf'' in
case untilChar# (stepOn (stepOverLexeme buf'')) '\"'# of
buf''' ->
let cc_name = lexemeToFastString buf''' in
(mkUserCC cc_name mod_name grp_name,
stepOn (stepOverLexeme buf'''))
in
case prefixMatch (stepOn buf) "CAF:" of
Just buf' ->
case untilChar# (stepOverLexeme buf') '\"'# of
buf'' -> ITscc (cafifyCC (mkUserCC (lexemeToFastString buf'') _NIL_ _NIL_)):
lexIface (stepOn (stepOverLexeme buf''))
case match_user_cc (stepOverLexeme buf') of
(cc, buf'') -> ITscc (cafifyCC cc) : lexIface buf''
Nothing ->
case untilChar# (stepOn buf) '\"'# of
buf' -> ITscc (mkUserCC (lexemeToFastString buf') _NIL_ _NIL_):
lexIface (stepOn (stepOverLexeme buf'))
case match_user_cc (stepOn buf) of
(cc, buf'') -> ITscc cc : lexIface buf''
c -> ITunknown [C# c] : lexIface (stepOn buf)
......
......@@ -21,9 +21,8 @@ import Name ( Name, OccName(..), Provenance(..), DefnInfo(..), ExportFlag(..),
occNameString, occNameFlavour,
SYN_IE(NameSet), emptyNameSet, addListToNameSet,
mkLocalName, mkGlobalName, modAndOcc, isLocallyDefinedName,
nameOccName, setNameProvenance, isVarOcc, getNameProvenance,
pprProvenance, pprOccName, pprModule, pprNameProvenance,
NamedThing(..)
isWiredInName, nameOccName, setNameProvenance, isVarOcc, getNameProvenance,
pprProvenance, pprOccName, pprModule, pprNonSymOcc, pprNameProvenance
)
import TyCon ( TyCon )
import TysWiredIn ( tupleTyCon, listTyCon, charTyCon, intTyCon )
......
......@@ -923,13 +923,13 @@ mkSearchPath Nothing = [(".",".hi")]
mkSearchPath (Just s)
= go s
where
go "" = []
go s =
case span (/= '%') s of
(dir,'%':rs) ->
case span (/= ':') rs of
(hisuf,_:rest) -> (dir,hisuf):go rest
(hisuf,[]) -> [(dir,hisuf)]
\end{code}
%*********************************************************
......
......@@ -150,6 +150,7 @@ tcBindsAndThen combiner (MonoBind bind sigs is_rec) do_next
where
binder_names = map fst (bagToList (collectMonoBinders bind))
ty_sigs = [sig | sig@(Sig name _ _) <- sigs]
\end{code}
An aside. The original version of @tcBindsAndThen@ which lacks a
......
......@@ -45,12 +45,11 @@ import TcType ( SYN_IE(TcType), TcMaybe(..),
import TcKind ( TcKind )
import Class ( SYN_IE(Class), classSig )
import FieldLabel ( fieldLabelName, fieldLabelType )
import FieldLabel ( FieldLabel, fieldLabelName, fieldLabelType )
import Id ( idType, dataConFieldLabels, dataConSig, recordSelectorFieldLabel,
isRecordSelector,
SYN_IE(Id), GenId
)
import FieldLabel ( FieldLabel )