ghc-hetmet.git
22 years ago[project @ 2001-09-04 18:29:20 by ken]
ken [Tue, 4 Sep 2001 18:29:22 +0000 (18:29 +0000)]
[project @ 2001-09-04 18:29:20 by ken]
THIS CHANGE AFFECTS ALL OBJECT FILES COMPILED FROM HASKELL.
Please say "make -C ghc/lib/std clean; make -C hslibs clean".

This commit eliminates spurious warning messages when compiling on
the Alpha.  There are two kinds of spurious warning messages:

(1) gcc: -noprefix_recognition: linker input file unused since linking not done

    This warning is because we pass the flag "-Xlinker -noprefix_recognition"
    to gcc.  We remove this warning by no longer passing the flag to gcc,
    and by removing the reason we were passing the flag in the first place:
    __init_* is now renamed to __stginit_*.

(2) .../includes/Regs.h: warning: call-clobbered register used for global
    register variable

    This warning and all other warnings except (1), we eliminate by
    passing the -w flag to gcc.

MERGE TO STABLE BRANCH

22 years ago[project @ 2001-09-04 18:22:34 by ken]
ken [Tue, 4 Sep 2001 18:22:34 +0000 (18:22 +0000)]
[project @ 2001-09-04 18:22:34 by ken]
On the Alpha we can only handle <= 4 integer arguments with foreign export
dynamic.  Following the example of the corresponding Sparc hack, we detect
when we're being asked to do something we can't and refuse.

MERGE TO STABLE BRANCH

22 years ago[project @ 2001-09-04 16:49:12 by sewardj]
sewardj [Tue, 4 Sep 2001 16:49:12 +0000 (16:49 +0000)]
[project @ 2001-09-04 16:49:12 by sewardj]
Fix ELF compilation for new section table scheme.

22 years ago[project @ 2001-09-04 16:35:02 by sewardj]
sewardj [Tue, 4 Sep 2001 16:35:02 +0000 (16:35 +0000)]
[project @ 2001-09-04 16:35:02 by sewardj]
Build system hacks to split HSwin32.o into two parts, so that it
can be loaded into GHCi.  Uses the same gruesome hacks as HSstd.o.

22 years ago[project @ 2001-09-04 16:33:04 by sewardj]
sewardj [Tue, 4 Sep 2001 16:33:04 +0000 (16:33 +0000)]
[project @ 2001-09-04 16:33:04 by sewardj]
Further linker fixes.  Record .bss space allocated, for the benefit of
LOOKS_LIKE_GHC_INFO etc tests done by the GC.  In this commit, for
Win32 only.

Also some minor tweaks so that -package win32 can be loaded into GHCi.

22 years ago[project @ 2001-09-04 14:11:58 by ken]
ken [Tue, 4 Sep 2001 14:11:58 +0000 (14:11 +0000)]
[project @ 2001-09-04 14:11:58 by ken]
Just as we do on sparc:
On alpha, create code to shuffle a0 .. a3 into a2 .. a5 before the
old code.  This is a GHASTLY HACK which at least makes f-x-dynamic on
alpha work for callees with up to 32 bytes (4 words) of args.

22 years ago[project @ 2001-09-02 10:40:34 by qrczak]
qrczak [Sun, 2 Sep 2001 10:40:34 +0000 (10:40 +0000)]
[project @ 2001-09-02 10:40:34 by qrczak]
Clean core, not *core (because of ext-core dirs).

22 years ago[project @ 2001-08-31 15:58:30 by apt]
apt [Fri, 31 Aug 2001 15:58:30 +0000 (15:58 +0000)]
[project @ 2001-08-31 15:58:30 by apt]
add ext-core example programs -- MERGE TO STABLE (surely harmless?)

22 years ago[project @ 2001-08-31 15:48:55 by apt]
apt [Fri, 31 Aug 2001 15:48:55 +0000 (15:48 +0000)]
[project @ 2001-08-31 15:48:55 by apt]
add documentation for ext-core -- MERGE TO STABLE (surely harmless?)

22 years ago[project @ 2001-08-31 15:28:49 by apt]
apt [Fri, 31 Aug 2001 15:28:49 +0000 (15:28 +0000)]
[project @ 2001-08-31 15:28:49 by apt]
fix documentation typos

22 years ago[project @ 2001-08-31 14:40:31 by simonmar]
simonmar [Fri, 31 Aug 2001 14:40:31 +0000 (14:40 +0000)]
[project @ 2001-08-31 14:40:31 by simonmar]
Fix worker-wrapper generation.  See commments in WwLib.mk_ww_str

22 years ago[project @ 2001-08-31 14:32:03 by sewardj]
sewardj [Fri, 31 Aug 2001 14:32:03 +0000 (14:32 +0000)]
[project @ 2001-08-31 14:32:03 by sewardj]
Fix Linux compile b0rkage.  Darn.

MERGE TO STABLE BRANCH

22 years ago[project @ 2001-08-31 13:51:45 by sewardj]
sewardj [Fri, 31 Aug 2001 13:51:45 +0000 (13:51 +0000)]
[project @ 2001-08-31 13:51:45 by sewardj]
Pass -w to gcc for .hc compilation on sparc-solaris so as to suppress
warnings about call-clobbered regs being used for global vars.

22 years ago[project @ 2001-08-31 12:39:06 by rje]
rje [Fri, 31 Aug 2001 12:39:06 +0000 (12:39 +0000)]
[project @ 2001-08-31 12:39:06 by rje]
Reapplied my "FCode as a monad" patch, now that 5.02 has forked into
a separate branch.

I'm fairly sure that this doesn't change the behaviour of anything.

22 years ago[project @ 2001-08-31 11:44:12 by sewardj]
sewardj [Fri, 31 Aug 2001 11:44:12 +0000 (11:44 +0000)]
[project @ 2001-08-31 11:44:12 by sewardj]
.bss section fixes for ELF.

MERGE TO STABLE BRANCH (and test better!)

22 years ago[project @ 2001-08-31 11:42:44 by sewardj]
sewardj [Fri, 31 Aug 2001 11:42:44 +0000 (11:42 +0000)]
[project @ 2001-08-31 11:42:44 by sewardj]
Properly handle the linker debugging (-D4096) before.

MERGE TO STABLE BRANCH

22 years ago[project @ 2001-08-30 16:21:45 by rrt]
rrt [Thu, 30 Aug 2001 16:21:45 +0000 (16:21 +0000)]
[project @ 2001-08-30 16:21:45 by rrt]
Remove a spurious space. Oh, yes.

22 years ago[project @ 2001-08-30 10:35:10 by sewardj]
sewardj [Thu, 30 Aug 2001 10:35:11 +0000 (10:35 +0000)]
[project @ 2001-08-30 10:35:10 by sewardj]
Advance HEAD version to 5.03.

22 years ago[project @ 2001-08-30 10:22:52 by simonmar]
simonmar [Thu, 30 Aug 2001 10:22:52 +0000 (10:22 +0000)]
[project @ 2001-08-30 10:22:52 by simonmar]
Don't automatically enable compaction when generations == 1.

22 years ago[project @ 2001-08-30 10:21:40 by simonmar]
simonmar [Thu, 30 Aug 2001 10:21:40 +0000 (10:21 +0000)]
[project @ 2001-08-30 10:21:40 by simonmar]
Automatically disable compaction when there's only one generation
(-G1) and print a warning to that effect.

22 years ago[project @ 2001-08-30 09:51:15 by sewardj]
sewardj [Thu, 30 Aug 2001 09:51:16 +0000 (09:51 +0000)]
[project @ 2001-08-30 09:51:15 by sewardj]
Back out recent changes to the code generator as too destabilising.
Revert files as follows:

revert to 1.35   CgBindery.lhs
revert to 1.26   CgMonad.lhs
revert to 1.15   CgStackery.lhs
revert to 1.10   CgUsages.lhs

22 years ago[project @ 2001-08-29 19:29:04 by sof]
sof [Wed, 29 Aug 2001 19:29:04 +0000 (19:29 +0000)]
[project @ 2001-08-29 19:29:04 by sof]
make it compile.

22 years ago[project @ 2001-08-29 18:12:19 by sof]
sof [Wed, 29 Aug 2001 18:12:19 +0000 (18:12 +0000)]
[project @ 2001-08-29 18:12:19 by sof]
emptyPLS: warning removal

22 years ago[project @ 2001-08-29 17:24:25 by qrczak]
qrczak [Wed, 29 Aug 2001 17:24:25 +0000 (17:24 +0000)]
[project @ 2001-08-29 17:24:25 by qrczak]
Remove annoying warnings about using a deprecated extension
when compiling via gcc-3.0.

#if __GNUC__ >= 3
/* Assume that a flexible array member at the end of a struct
 * can be defined thus: T arr[]; */
#define FLEXIBLE_ARRAY
#else
/* Assume that it must be defined thus: T arr[0]; */
#define FLEXIBLE_ARRAY 0
#endif

A test program (hsking) compiled fine with gcc-3.0!

22 years ago[project @ 2001-08-29 16:02:30 by rje]
rje [Wed, 29 Aug 2001 16:02:30 +0000 (16:02 +0000)]
[project @ 2001-08-29 16:02:30 by rje]
Another Haskell equivalent of CTags.

Written because fptags and hstags don't seem to be maintained any more and
its seemed to be less effort to write a new version, than to figure out
how those one's worked.

22 years ago[project @ 2001-08-29 15:12:21 by sewardj]
sewardj [Wed, 29 Aug 2001 15:12:21 +0000 (15:12 +0000)]
[project @ 2001-08-29 15:12:21 by sewardj]
Make the PEi386 linker able to handle symbols in .bss sections
(almost) correctly:

* "Anonymous" bss sections (where something like
     static int a[10]
  lives) are given a calloc'd block of memory to live in.

* Publically visible bss-resident symbols, such as
    int a[10]
  are each given their own calloc'd block.  The normal
  way of things is for identically-named symbols in different
  modules to be commoned up and allocated the largest stated
  size of any of the symbols.  We don't do that -- if two different
  .o files each declared  int a[10],  you'll get two independent
  lumps of memory.  Hence "almost" above.

These calloc'd lumps (pseudo-bss spaces) are not added to the list
of sections extracted for the benefit of the closure-vs-itbl pointer
checks done by the garbage collector.  I don't think that matters.

These fixes need to be propagated to other formats too (viz, ELF).

This fixes the problem reported by ??? in which, on Windows,
   writeFile "foo" "bar" in GHCi gives a segfault.

This bug was so horrible to track down and fix that I have instituted
range checking in the relocation processing machinery.  The runtime
linker checks all locations it is patching to ensure they are within
a known segment before writing to them.  Hopefully this will pick up
any future problems.  The performance impact of this, assessed by
the time to start up GHCi, is unmeasureably small.

22 years ago[project @ 2001-08-29 15:02:02 by sewardj]
sewardj [Wed, 29 Aug 2001 15:02:02 +0000 (15:02 +0000)]
[project @ 2001-08-29 15:02:02 by sewardj]
Duh.  Remember to actually zero out the space in stgCallocBytes.  Duh.

22 years ago[project @ 2001-08-29 14:55:58 by sewardj]
sewardj [Wed, 29 Aug 2001 14:55:58 +0000 (14:55 +0000)]
[project @ 2001-08-29 14:55:58 by sewardj]
Add stgCallocBytes().

22 years ago[project @ 2001-08-29 14:32:49 by simonmar]
simonmar [Wed, 29 Aug 2001 14:32:49 +0000 (14:32 +0000)]
[project @ 2001-08-29 14:32:49 by simonmar]
Fix *two* bugs in formatRealFloat:

The first one is in the Haskell 98 errata, namely that negative
exponents cause an infinite loop in the FFFixed case when no precision
is specified.  eg. `Numeric.showFFloat Nothing 0.02 ""'  I've modified
the code in the errata to properly handle the e == 0 case and to be
slightly more efficient when e > 0.

The second bug is this:

   Prelude> Numeric.showFFloat (Just 0) 0.02 ""
   "0."

22 years ago[project @ 2001-08-29 14:20:14 by rje]
rje [Wed, 29 Aug 2001 14:20:14 +0000 (14:20 +0000)]
[project @ 2001-08-29 14:20:14 by rje]
FCode/Code is now a monad, and thus now also a constructed type, rather than a
type synonym.

This requires quite a lot of changes in quite a lot of files, but none of these changes should have changed the behaviour of anything.

Being a Monad allows code that used FCode to be IMHO rather more readable
as it can use do notation, and other common Monad idioms.

In addition, state has been abstracted away with getter and setter
functions, so that functions mess with the innards of FCode as little as
possible - making it easier to change FCode in future.

22 years ago[project @ 2001-08-29 11:20:40 by simonmar]
simonmar [Wed, 29 Aug 2001 11:20:40 +0000 (11:20 +0000)]
[project @ 2001-08-29 11:20:40 by simonmar]
- use SET_HDR rather than initialising header.info directly (fixes
  potential bugs with profiling).

- add some masking to the Int32/Word32 cases to match the Int8-16 and
  Word8-16 cases (potential 64-bit bugs).

22 years ago[project @ 2001-08-29 10:49:28 by simonmar]
simonmar [Wed, 29 Aug 2001 10:49:28 +0000 (10:49 +0000)]
[project @ 2001-08-29 10:49:28 by simonmar]
Add genRange method to class RandomGen, as per the revised Haskell 98
library report.

22 years ago[project @ 2001-08-29 10:19:31 by simonmar]
simonmar [Wed, 29 Aug 2001 10:19:31 +0000 (10:19 +0000)]
[project @ 2001-08-29 10:19:31 by simonmar]
Make the Permissions type non-abstract as per the revised Haskell 98 report.

22 years ago[project @ 2001-08-29 10:12:34 by simonmar]
simonmar [Wed, 29 Aug 2001 10:12:34 +0000 (10:12 +0000)]
[project @ 2001-08-29 10:12:34 by simonmar]
update maximumBy and minimumBy in line with the revised Haskell 98 report

22 years ago[project @ 2001-08-29 09:34:05 by simonmar]
simonmar [Wed, 29 Aug 2001 09:34:05 +0000 (09:34 +0000)]
[project @ 2001-08-29 09:34:05 by simonmar]
Changes to the Ix class from the revised Haskell 98 report:

  - Ord is no longer a superclass of Ix.

  - rangeSize is now a class member, as there are cases when
    it is useful to be able to override it.  As a result, GHC's
    performance-improving "unsafeRangeSize" function also has to be
    a class method just in case the programmer has overriden
    rangeSize.  Of course, unsafeRangeSize isn't visible when just
    importing Ix.

  - Added unsafeRangeSize bindings to all our standard Ix instances.

  - Improved the Ix instances for Int{8,16,32,64} and
    Word{8,16,32,64} by defining unsafeIndex instead of index, and
    providing a definition of unsafeRangeSize.

I hope I haven't mucked anything up :) The array tests all pass
successfully, except for arr016 which depended on Ord being a
superclass of Ix.  I'll commit changes to this test shortly.

22 years ago[project @ 2001-08-28 19:32:54 by sof]
sof [Tue, 28 Aug 2001 19:32:54 +0000 (19:32 +0000)]
[project @ 2001-08-28 19:32:54 by sof]
bring PprType (and its Outputable Type instance) into scope

22 years ago[project @ 2001-08-28 15:36:52 by simonmar]
simonmar [Tue, 28 Aug 2001 15:36:52 +0000 (15:36 +0000)]
[project @ 2001-08-28 15:36:52 by simonmar]
Change the definition of recip in the instance of Fractional for
Ratio, to:

recip (x:%y) =  y % x

as per the revised Haskell 98 report.

22 years ago[project @ 2001-08-28 15:12:37 by simonmar]
simonmar [Tue, 28 Aug 2001 15:12:37 +0000 (15:12 +0000)]
[project @ 2001-08-28 15:12:37 by simonmar]
Bring scanr1, scanl, and scanl1 into line with the revised H98 report.

22 years ago[project @ 2001-08-28 15:11:41 by simonmar]
simonmar [Tue, 28 Aug 2001 15:11:41 +0000 (15:11 +0000)]
[project @ 2001-08-28 15:11:41 by simonmar]
Add instances of Eq & Ord up to size 15 (Bounded, Read & Show will
have to wait)

22 years ago[project @ 2001-08-28 15:07:58 by simonmar]
simonmar [Tue, 28 Aug 2001 15:07:58 +0000 (15:07 +0000)]
[project @ 2001-08-28 15:07:58 by simonmar]
Correct the USE_REPORT_PRELUDE definition of (!!).

22 years ago[project @ 2001-08-28 10:06:29 by simonpj]
simonpj [Tue, 28 Aug 2001 10:06:30 +0000 (10:06 +0000)]
[project @ 2001-08-28 10:06:29 by simonpj]
----------------------------------------
Make isFFIArgumentTy understand newtypes
----------------------------------------

This fixes the bug Manuel reported:

newtype T = T (Ptr T)
foreign import ccall foo :: T -> IO (Ptr T)

  test.hs:6:
      Unacceptable argument type in foreign declaration: T

On the way, I moved isFFIArgumentTy and friends out of TysWiredIn,
where they didn't really belong, into TcType.  That in turn force
me to move isStrictType, and isPrimitiveType.

22 years ago[project @ 2001-08-28 10:03:23 by simonpj]
simonpj [Tue, 28 Aug 2001 10:03:24 +0000 (10:03 +0000)]
[project @ 2001-08-28 10:03:23 by simonpj]
Add pprEquation

22 years ago[project @ 2001-08-28 09:55:35 by simonmar]
simonmar [Tue, 28 Aug 2001 09:55:35 +0000 (09:55 +0000)]
[project @ 2001-08-28 09:55:35 by simonmar]
Fix (read "Infinity") and (read "NaN") for RealFloat types.

22 years ago[project @ 2001-08-28 08:34:29 by apt]
apt [Tue, 28 Aug 2001 08:34:29 +0000 (08:34 +0000)]
[project @ 2001-08-28 08:34:29 by apt]
fix problem with -fno-code

22 years ago[project @ 2001-08-27 15:16:30 by apt]
apt [Mon, 27 Aug 2001 15:16:30 +0000 (15:16 +0000)]
[project @ 2001-08-27 15:16:30 by apt]
shut up shortMeOut traces

22 years ago[project @ 2001-08-27 14:29:16 by apt]
apt [Mon, 27 Aug 2001 14:29:16 +0000 (14:29 +0000)]
[project @ 2001-08-27 14:29:16 by apt]
use qualified names to indicate external status of values

22 years ago[project @ 2001-08-27 14:27:23 by apt]
apt [Mon, 27 Aug 2001 14:27:23 +0000 (14:27 +0000)]
[project @ 2001-08-27 14:27:23 by apt]
document 31-bit core output option settings

22 years ago[project @ 2001-08-27 13:11:44 by simonmar]
simonmar [Mon, 27 Aug 2001 13:11:44 +0000 (13:11 +0000)]
[project @ 2001-08-27 13:11:44 by simonmar]
a couple of tweaks to the hc-file-bundle target:
  - Add -r option to ${RM} to blow away an existing binary-dist
    temporary directory if present.
  - Fix bogons in the bundle building code.

22 years ago[project @ 2001-08-27 11:45:23 by simonmar]
simonmar [Mon, 27 Aug 2001 11:45:23 +0000 (11:45 +0000)]
[project @ 2001-08-27 11:45:23 by simonmar]
foldr is a good consumer (but not necessarily a good producer)

22 years ago[project @ 2001-08-24 14:41:09 by simonmar]
simonmar [Fri, 24 Aug 2001 14:41:09 +0000 (14:41 +0000)]
[project @ 2001-08-24 14:41:09 by simonmar]
correct off-by-one error in hGetStringBuffer

22 years ago[project @ 2001-08-24 13:50:03 by sewardj]
sewardj [Fri, 24 Aug 2001 13:50:03 +0000 (13:50 +0000)]
[project @ 2001-08-24 13:50:03 by sewardj]
Fill in details for 5.02.

22 years ago[project @ 2001-08-24 13:22:25 by simonpj]
simonpj [Fri, 24 Aug 2001 13:22:25 +0000 (13:22 +0000)]
[project @ 2001-08-24 13:22:25 by simonpj]
Make when comparing old and new strictness information,
we were being a bit too generous with the old case.
When a function has (say) arity 2, we can't use strictness
info like SSS, because that only applies if the fn is
applied to 3 args.  So it's an unfair comparison.

This commit makes the old->new conversion function more
truthful in this regard, which should eliminate the
erroneously-claimed "worse" strictness results.

22 years ago[project @ 2001-08-24 13:13:59 by chak]
chak [Fri, 24 Aug 2001 13:13:59 +0000 (13:13 +0000)]
[project @ 2001-08-24 13:13:59 by chak]
wibble

22 years ago[project @ 2001-08-24 13:06:36 by simonpj]
simonpj [Fri, 24 Aug 2001 13:06:36 +0000 (13:06 +0000)]
[project @ 2001-08-24 13:06:36 by simonpj]
------------------------------
Another demand analyser glitch
------------------------------

This fixes, I hope, (in an unsatisfactory way) another demand-analyser
glitch, that resulted in a runtime "entered absent arg" error.

In DmdAnal.annotateLamIdBndr, we now have:

-- This gross hack is needed because otherwise we label
-- a lambda binder with demand 'B'.  But in terms of calling
-- conventions that's Abs, because we don't pass it.  But
-- when we do a w/w split we get
-- fw x = (\x y:B -> ...) x (error "oops")
-- And then the simplifier things the 'B' is a strict demand
-- and evaluates the (error "oops").  Sigh

The hack zaps 'B' to 'Abs', just like 'lazify' does.

Need to talk to John about what the principled reasons are.

22 years ago[project @ 2001-08-24 12:47:04 by simonpj]
simonpj [Fri, 24 Aug 2001 12:47:04 +0000 (12:47 +0000)]
[project @ 2001-08-24 12:47:04 by simonpj]
Improve error message for mis-matched contexts

22 years ago[project @ 2001-08-24 12:45:28 by simonpj]
simonpj [Fri, 24 Aug 2001 12:45:28 +0000 (12:45 +0000)]
[project @ 2001-08-24 12:45:28 by simonpj]
Fix an obscure but easy bug in SpecConstr

22 years ago[project @ 2001-08-24 11:39:49 by simonmar]
simonmar [Fri, 24 Aug 2001 11:39:49 +0000 (11:39 +0000)]
[project @ 2001-08-24 11:39:49 by simonmar]
- document :info
- bring up to date info about FFI support

22 years ago[project @ 2001-08-24 09:41:27 by rrt]
rrt [Fri, 24 Aug 2001 09:41:27 +0000 (09:41 +0000)]
[project @ 2001-08-24 09:41:27 by rrt]
Remove unused import of DmdType

22 years ago[project @ 2001-08-24 09:33:14 by sewardj]
sewardj [Fri, 24 Aug 2001 09:33:14 +0000 (09:33 +0000)]
[project @ 2001-08-24 09:33:14 by sewardj]
First cut at new compiler + interpreter changes for 5.02.  Also rearranged
the order of sections.

22 years ago[project @ 2001-08-24 09:02:39 by simonpj]
simonpj [Fri, 24 Aug 2001 09:02:39 +0000 (09:02 +0000)]
[project @ 2001-08-24 09:02:39 by simonpj]
Comment only

22 years ago[project @ 2001-08-24 07:58:29 by simonpj]
simonpj [Fri, 24 Aug 2001 07:58:29 +0000 (07:58 +0000)]
[project @ 2001-08-24 07:58:29 by simonpj]
Improve error message for nullary class

22 years ago[project @ 2001-08-24 06:17:56 by chak]
chak [Fri, 24 Aug 2001 06:17:56 +0000 (06:17 +0000)]
[project @ 2001-08-24 06:17:56 by chak]
* Added a brief outline of the handling of command line options
* Revised Reuben's explanation re -no-hs-main according to our email exchange

22 years ago[project @ 2001-08-24 04:00:33 by chak]
chak [Fri, 24 Aug 2001 04:00:33 +0000 (04:00 +0000)]
[project @ 2001-08-24 04:00:33 by chak]
Added SPJ's new -fmax-worker-args to the flag reference

22 years ago[project @ 2001-08-23 22:53:08 by gla]
gla [Thu, 23 Aug 2001 22:53:08 +0000 (22:53 +0000)]
[project @ 2001-08-23 22:53:08 by gla]
Correct typos and minor errors.
Reorganized most of the sections, and the interface subsection appears first in each section.
Made a small change to Figure 1, the overall architecture of the storage manager.
The description on the configuration of the nursery is now correct.
Added a short section on the state of the heap allocator.

22 years ago[project @ 2001-08-23 20:19:16 by qrczak]
qrczak [Thu, 23 Aug 2001 20:19:16 +0000 (20:19 +0000)]
[project @ 2001-08-23 20:19:16 by qrczak]
Don't say that GHC doesn't do fixity resolution on the left hand side
of a binding before deciding which symbol is the function symbol.
This has been fixed.

22 years ago[project @ 2001-08-23 18:23:46 by gla]
gla [Thu, 23 Aug 2001 18:23:46 +0000 (18:23 +0000)]
[project @ 2001-08-23 18:23:46 by gla]
Rephrased a few paragraphs.
Added a paragraph on the interface to retainerSet.
Added 'To do' paragraphs, which may be useful for maintenance.

22 years ago[project @ 2001-08-23 16:27:11 by simonpj]
simonpj [Thu, 23 Aug 2001 16:27:11 +0000 (16:27 +0000)]
[project @ 2001-08-23 16:27:11 by simonpj]
Fix representation finding for recursive newtypes

22 years ago[project @ 2001-08-23 15:34:49 by simonmar]
simonmar [Thu, 23 Aug 2001 15:34:49 +0000 (15:34 +0000)]
[project @ 2001-08-23 15:34:49 by simonmar]
Note that support for generics is currently broken.

22 years ago[project @ 2001-08-23 15:06:59 by simonpj]
simonpj [Thu, 23 Aug 2001 15:06:59 +0000 (15:06 +0000)]
[project @ 2001-08-23 15:06:59 by simonpj]
remove rnsource.hi-boot-5 (part of prev commit)

22 years ago[project @ 2001-08-23 15:05:52 by simonpj]
simonpj [Thu, 23 Aug 2001 15:05:53 +0000 (15:05 +0000)]
[project @ 2001-08-23 15:05:52 by simonpj]
More instance-gate fiddling.  This must be one of the most
tiremsome bits of the entire compiler, and I appear to be
incapable of modifying it without getting it wrong at least
once.

Still, this commit does tidy things up a bit.

* The type renamers (rnHsType, etc) have moved from RnSource
  into a new module RnTypes.

* This breaks a couple of loops, and lets us nuke RnSource.hi-boot.
  Hurrah!

Simon

22 years ago[project @ 2001-08-23 14:44:43 by simonmar]
simonmar [Thu, 23 Aug 2001 14:44:43 +0000 (14:44 +0000)]
[project @ 2001-08-23 14:44:43 by simonmar]
Release notes updated with library changes since 5.00.2.

22 years ago[project @ 2001-08-23 14:41:36 by simonmar]
simonmar [Thu, 23 Aug 2001 14:41:36 +0000 (14:41 +0000)]
[project @ 2001-08-23 14:41:36 by simonmar]
include the 5.02 release notes

22 years ago[project @ 2001-08-23 14:39:02 by simonmar]
simonmar [Thu, 23 Aug 2001 14:39:02 +0000 (14:39 +0000)]
[project @ 2001-08-23 14:39:02 by simonmar]
document -fno-code.

22 years ago[project @ 2001-08-23 14:38:31 by rrt]
rrt [Thu, 23 Aug 2001 14:38:31 +0000 (14:38 +0000)]
[project @ 2001-08-23 14:38:31 by rrt]
The new InstallShield for Windows Installer installer. I won't nuke the old
IS6 one for now, but expect it to go after the GHC 5.02 release.

The new installer uses the standard Windows Installer system, so should be
easier to migrate away from InstallShield to a more automated system in
future, though that will require the setup to be exported (the .ism format
is proprietary to InstallShield).

Also, the entire setup lives in one file rather than a zillion scattered
over a hierarchy with lots of empty directories and space-including
directory names, so it's rather easier to check out!

22 years ago[project @ 2001-08-23 14:38:23 by simonmar]
simonmar [Thu, 23 Aug 2001 14:38:23 +0000 (14:38 +0000)]
[project @ 2001-08-23 14:38:23 by simonmar]
Document -fno-code.

22 years ago[project @ 2001-08-23 12:50:13 by rrt]
rrt [Thu, 23 Aug 2001 12:50:13 +0000 (12:50 +0000)]
[project @ 2001-08-23 12:50:13 by rrt]
On second thoughts, strip either a backslash or a slash, as if we read
an environment variable, we may well get a slash in the path; if we
get a result from GetTempPath, it'll probably have a backslash.

22 years ago[project @ 2001-08-23 12:48:54 by rrt]
rrt [Thu, 23 Aug 2001 12:48:54 +0000 (12:48 +0000)]
[project @ 2001-08-23 12:48:54 by rrt]
Strip a backslash, not a slash.

22 years ago[project @ 2001-08-23 10:55:37 by simonmar]
simonmar [Thu, 23 Aug 2001 10:55:37 +0000 (10:55 +0000)]
[project @ 2001-08-23 10:55:37 by simonmar]
Remove no-longer-useful README.  All that's left here now is the GHCi
tests, which aren't ready to be moved over to the new testsuite yet.

22 years ago[project @ 2001-08-23 10:53:46 by simonmar]
simonmar [Thu, 23 Aug 2001 10:53:48 +0000 (10:53 +0000)]
[project @ 2001-08-23 10:53:46 by simonmar]
remove unused tests.

22 years ago[project @ 2001-08-23 10:51:19 by simonmar]
simonmar [Thu, 23 Aug 2001 10:51:20 +0000 (10:51 +0000)]
[project @ 2001-08-23 10:51:19 by simonmar]
old tests, most of which seem to have been used during development
rather than as regression tests.

22 years ago[project @ 2001-08-23 10:36:50 by sewardj]
sewardj [Thu, 23 Aug 2001 10:36:50 +0000 (10:36 +0000)]
[project @ 2001-08-23 10:36:50 by sewardj]
Globally-uniquify the names of some _wrap functions so that the
previously-undetected global namespace clashes don't cause an
assertion failure in Hash.c when compiled -DDEBUG when starting GHCi
with various hslibs packages.

22 years ago[project @ 2001-08-23 10:33:36 by simonmar]
simonmar [Thu, 23 Aug 2001 10:33:36 +0000 (10:33 +0000)]
[project @ 2001-08-23 10:33:36 by simonmar]
Add a new section, documenting "GHC's take on behaviour that is left
undefined or implementation specific in Haskell 98", and in it
document the size of Int, the behaviour of fromIntegral, and the
behaviour of floating-point exceptions.

22 years ago[project @ 2001-08-23 10:29:53 by rrt]
rrt [Thu, 23 Aug 2001 10:29:53 +0000 (10:29 +0000)]
[project @ 2001-08-23 10:29:53 by rrt]
reinstate some Windows-specific code I deleted by mistake.

22 years ago[project @ 2001-08-23 10:06:04 by rrt]
rrt [Thu, 23 Aug 2001 10:06:04 +0000 (10:06 +0000)]
[project @ 2001-08-23 10:06:04 by rrt]
Remove spurious ;; from when the changed line was in a case.

22 years ago[project @ 2001-08-23 10:02:46 by simonmar]
simonmar [Thu, 23 Aug 2001 10:02:46 +0000 (10:02 +0000)]
[project @ 2001-08-23 10:02:46 by simonmar]
markup fixes

22 years ago[project @ 2001-08-23 09:54:45 by simonpj]
simonpj [Thu, 23 Aug 2001 09:54:46 +0000 (09:54 +0000)]
[project @ 2001-08-23 09:54:45 by simonpj]
--------------------------------------------------
Be a bit more liberal when slurping instance decls
--------------------------------------------------

Functional dependencies have (as usual) made things more complicated

Suppose an interface file contains
interface A where
  class C a b | a->b where op :: a->b
  instance C Foo Baz where ...

Now we are compiling
module B where
  import A
  t = op (v::Foo)

Should we slurp the instance decl, even though Baz is nowhere mentioned
in module B?  YES!  Because of the fundep, the (C Foo ?) part is enough to
select this instance decl, and the Baz part follows.

Rather than take fundeps into account "properly", we just slurp
if C is visible and *any one* of the Names in the types
This is a slightly brutal approximation, but most instance decls
are regular H98 ones and it's perfect for them.

Changes:

  HscTypes:
generalise the types of GatedDecl a bit

  RnHiFiles.loadInstDecl, RnHiFiles.loadRule, RnIfaces.selectGated:
the meat of the solution

  RdrName, OccName etc:
some consequential wibbles

22 years ago[project @ 2001-08-23 08:54:45 by simonmar]
simonmar [Thu, 23 Aug 2001 08:54:45 +0000 (08:54 +0000)]
[project @ 2001-08-23 08:54:45 by simonmar]
Put a big flashing warning sign next to the description of -O2-for-C,
and don't endorse it by claiming that we actually use it (we don't).

22 years ago[project @ 2001-08-23 08:45:50 by rrt]
rrt [Thu, 23 Aug 2001 08:45:50 +0000 (08:45 +0000)]
[project @ 2001-08-23 08:45:50 by rrt]
Remove dependency of win32 on greencard (because the latter is merged
into the former). This is a temporary hack until the greencard library
is added to the new libraries.

22 years ago[project @ 2001-08-23 08:43:30 by simonpj]
simonpj [Thu, 23 Aug 2001 08:43:30 +0000 (08:43 +0000)]
[project @ 2001-08-23 08:43:30 by simonpj]
-----------------------------------
Correct a horrible error in repType
-----------------------------------

repType is meant to give the underlying representation of a type.
But it wasn't taking account of the fact that *recursive* newtypes are
still represented by a TyConApp.  (Non-recursive ones behave much more
like type synonyms now.)

As a result, if we have

newtype F = F (F->F)

then Bad Things happen if we try to seq x::F.  We decide whether to
push an ordinary return address or a SEQ frame based on the type,
and repType didn't expose the fact that F is represented by a function type.

Aargh. codeGen/should_run/cg050 now tests for this.

22 years ago[project @ 2001-08-23 08:43:13 by simonpj]
simonpj [Thu, 23 Aug 2001 08:43:13 +0000 (08:43 +0000)]
[project @ 2001-08-23 08:43:13 by simonpj]
Add coment

22 years ago[project @ 2001-08-23 08:36:11 by rrt]
rrt [Thu, 23 Aug 2001 08:36:11 +0000 (08:36 +0000)]
[project @ 2001-08-23 08:36:11 by rrt]
Remove kludgy hack that on mingwin appends C: to the result of gcc
-print-prog-name=ld, which doesn't work with the newest mingwin gcc
(which kindly adds C: for us).

22 years ago[project @ 2001-08-23 07:52:32 by simonpj]
simonpj [Thu, 23 Aug 2001 07:52:32 +0000 (07:52 +0000)]
[project @ 2001-08-23 07:52:32 by simonpj]
Use the unpack strategy!

22 years ago[project @ 2001-08-23 07:13:16 by simonpj]
simonpj [Thu, 23 Aug 2001 07:13:16 +0000 (07:13 +0000)]
[project @ 2001-08-23 07:13:16 by simonpj]
------------------------------
Improve the demand analyser [case]
------------------------------

1. In the Case case of dmdAnal, I dealt with the case binder in a way that
was both clumsy and pessimistic.  This commit fixes that:

-- Figure out whether the demand on the case binder is used, and use
-- that to set the scrut_dmd.  This is utterly essential.
-- Consider f x = case x of y { (a,b) -> k y a }
-- If we just take scrut_demand = U(L,A), then we won't pass x to the
-- worker, so the worker will rebuild
-- x = (a, absent-error)
-- and that'll crash.
-- So at one stage I had:
-- dead_case_bndr  = isAbsentDmd (idNewDemandInfo case_bndr')
-- keepity | dead_case_bndr = Drop
-- | otherwise  = Keep
--
-- But then consider
-- case x of y { (a,b) -> h y + a }
-- where h : U(LL) -> T
-- The above code would compute a Keep for x, since y is not Abs, which is silly
-- The insight is, of course, that a demand on y is a demand on the
-- scrutinee, so we need to `both` it with the scrut demand

        scrut_dmd   = Seq Drop Now [idNewDemandInfo b | b <- bndrs', isId b]
   `both`
   idNewDemandInfo case_bndr'

-- There used to be a special case for when
-- ty == TyVarTy tv
-- (a not-uncommon case) in which case the substitution was dropped.
-- But the type-tidier changes the print-name of a type variable without
-- changing the unique, and that led to a bug.   Why?  Pre-tidying, we had
-- a type {Foo t}, where Foo is a one-method class.  So Foo is really a newtype.
-- And it happened that t was the type variable of the class.  Post-tiding,

2. 'defer' can be simplified to 'lub Abs', reducing the number of places
where things can go wrong.

3. Add comments

22 years ago[project @ 2001-08-22 15:59:35 by rrt]
rrt [Wed, 22 Aug 2001 15:59:35 +0000 (15:59 +0000)]
[project @ 2001-08-22 15:59:35 by rrt]
Say a bit about the horrors of linking.

22 years ago[project @ 2001-08-22 15:54:02 by simonpj]
simonpj [Wed, 22 Aug 2001 15:54:02 +0000 (15:54 +0000)]
[project @ 2001-08-22 15:54:02 by simonpj]
Test for only 4 words of args on SPARC foreign export dynamic

22 years ago[project @ 2001-08-22 15:45:21 by rrt]
rrt [Wed, 22 Aug 2001 15:45:21 +0000 (15:45 +0000)]
[project @ 2001-08-22 15:45:21 by rrt]
Remove spurions masquerading as <p> tags.

22 years ago[project @ 2001-08-22 15:44:15 by rrt]
rrt [Wed, 22 Aug 2001 15:44:15 +0000 (15:44 +0000)]
[project @ 2001-08-22 15:44:15 by rrt]
There's no such thing as a makesfile or a makfile.

22 years ago[project @ 2001-08-22 15:39:30 by rrt]
rrt [Wed, 22 Aug 2001 15:39:30 +0000 (15:39 +0000)]
[project @ 2001-08-22 15:39:30 by rrt]
Remove spurious clarification. As far as the user is concerned, this
lot is right. However, I'll add a bit to the commentary about this
sorry mess.

22 years ago[project @ 2001-08-22 15:35:06 by simonpj]
simonpj [Wed, 22 Aug 2001 15:35:06 +0000 (15:35 +0000)]
[project @ 2001-08-22 15:35:06 by simonpj]
Fix bug in result type sigs, carelessly introduced by a recent change on my part

22 years ago[project @ 2001-08-22 15:27:08 by simonpj]
simonpj [Wed, 22 Aug 2001 15:27:08 +0000 (15:27 +0000)]
[project @ 2001-08-22 15:27:08 by simonpj]
Formatting only