ghc-hetmet.git
23 years ago[project @ 2000-09-26 01:54:56 by chak]
chak [Tue, 26 Sep 2000 01:54:56 +0000 (01:54 +0000)]
[project @ 2000-09-26 01:54:56 by chak]
Added missing !

23 years ago[project @ 2000-09-25 13:09:31 by simonpj]
simonpj [Mon, 25 Sep 2000 13:09:31 +0000 (13:09 +0000)]
[project @ 2000-09-25 13:09:31 by simonpj]
Suck in plus/timesInteger for integer literals

23 years ago[project @ 2000-09-25 13:09:02 by simonpj]
simonpj [Mon, 25 Sep 2000 13:09:02 +0000 (13:09 +0000)]
[project @ 2000-09-25 13:09:02 by simonpj]
Fix slightly bogus error message

23 years ago[project @ 2000-09-25 12:58:39 by simonpj]
simonpj [Mon, 25 Sep 2000 12:58:39 +0000 (12:58 +0000)]
[project @ 2000-09-25 12:58:39 by simonpj]
--------------------------------------------------
Tidying up HsLit, and making it possible to define
your own numeric library

Simon PJ 22 Sept 00
--------------------------------------------------

I forgot to commit changes to the libraries!  The main thing
is to define monomorphic plusInteger, timesInteger etc, in PrelNum.

23 years ago[project @ 2000-09-25 12:30:44 by simonmar]
simonmar [Mon, 25 Sep 2000 12:30:44 +0000 (12:30 +0000)]
[project @ 2000-09-25 12:30:44 by simonmar]
Fix a couple of problems with the recompilation avoidance stuff.

23 years ago[project @ 2000-09-25 11:34:27 by simonmar]
simonmar [Mon, 25 Sep 2000 11:34:27 +0000 (11:34 +0000)]
[project @ 2000-09-25 11:34:27 by simonmar]
arguments of StgLam should be bndrs, not Id.

23 years ago[project @ 2000-09-25 11:32:55 by simonmar]
simonmar [Mon, 25 Sep 2000 11:32:55 +0000 (11:32 +0000)]
[project @ 2000-09-25 11:32:55 by simonmar]
INLINE is_ctype, otherwise charType gets inlined in the RHS by virtue
of only being used once, and we lose the opportunity to inline is_ctype.

23 years ago[project @ 2000-09-25 11:31:22 by simonmar]
simonmar [Mon, 25 Sep 2000 11:31:22 +0000 (11:31 +0000)]
[project @ 2000-09-25 11:31:22 by simonmar]
remove unused imports

23 years ago[project @ 2000-09-25 10:51:04 by simonmar]
simonmar [Mon, 25 Sep 2000 10:51:04 +0000 (10:51 +0000)]
[project @ 2000-09-25 10:51:04 by simonmar]
Make flushFile and flushBuffer consistent.  This code looked wrong
before, and it looks more correct now.

I can't see any need for flushFile at all.

flushBuffer still doesn't do the lseek thing that flushReadBuffer
does.

23 years ago[project @ 2000-09-25 10:48:50 by simonmar]
simonmar [Mon, 25 Sep 2000 10:48:50 +0000 (10:48 +0000)]
[project @ 2000-09-25 10:48:50 by simonmar]
Don't blindly flush the buffer just because it is writeable.  It might
be a RW handle with a read buffer.

23 years ago[project @ 2000-09-22 16:00:08 by simonpj]
simonpj [Fri, 22 Sep 2000 16:00:08 +0000 (16:00 +0000)]
[project @ 2000-09-22 16:00:08 by simonpj]
Forgot to remove HsBasic and add HsLit

23 years ago[project @ 2000-09-22 15:56:12 by simonpj]
simonpj [Fri, 22 Sep 2000 15:56:16 +0000 (15:56 +0000)]
[project @ 2000-09-22 15:56:12 by simonpj]
--------------------------------------------------
Tidying up HsLit, and making it possible to define
your own numeric library

Simon PJ 22 Sept 00
--------------------------------------------------

** NOTE: I did these changes on the aeroplane.  They should compile,
 and the Prelude still compiles OK, but it's entirely
 possible that I've broken something

The original reason for this many-file but rather shallow
commit is that it's impossible in Haskell to write your own
numeric library.  Why?  Because when you say '1' you get
(Prelude.fromInteger 1), regardless of what you hide from the
Prelude, or import from other libraries you have written.  So the
idea is to extend the -fno-implicit-prelude flag so that
in addition to no importing the Prelude, you can rebind
fromInteger -- Applied to literal constants
fromRational -- Ditto
negate -- Invoked by the syntax (-x)
the (-) used when desugaring n+k patterns

After toying with other designs, I eventually settled on a simple,
crude one: rather than adding a new flag, I just extended the
semantics of -fno-implicit-prelude so that uses of fromInteger,
fromRational and negate are all bound to "whatever is in scope"
rather than "the fixed Prelude functions".  So if you say

{-# OPTIONS -fno-implicit-prelude #-}
module M where
  import MyPrelude( fromInteger )

x = 3

the literal 3 will use whatever (unqualified) "fromInteger" is in scope,
in this case the one gotten from MyPrelude.

On the way, though, I studied how HsLit worked, and did a substantial tidy
up, deleting quite a lot of code along the way.  In particular.

* HsBasic.lhs is renamed HsLit.lhs.  It defines the HsLit type.

* There are now two HsLit types, both defined in HsLit.
HsLit for non-overloaded literals (like 'x')
HsOverLit for overloaded literals (like 1 and 2.3)

* HsOverLit completely replaces Inst.OverloadedLit, which disappears.
  An HsExpr can now be an HsOverLit as well as an HsLit.

* HsOverLit carries the Name of the fromInteger/fromRational operation,
  so that the renamer can help with looking up the unqualified name
  when -fno-implicit-prelude is on.  Ditto the HsExpr for negation.
  It's all very tidy now.

* RdrHsSyn contains the stuff that handles -fno-implicit-prelude
  (see esp RdrHsSyn.prelQual).  RdrHsSyn also contains all the "smart constructors"
  used by the parser when building HsSyn.  See for example RdrHsSyn.mkNegApp
  (previously the renamer (!) did the business of turning (- 3#) into -3#).

* I tidied up the handling of "special ids" in the parser.  There's much
  less duplication now.

* Move Sven's Horner stuff to the desugarer, where it belongs.
  There's now a nice function DsUtils.mkIntegerLit which brings together
  related code from no fewer than three separate places into one single
  place.  Nice!

* A nice tidy-up in MatchLit.partitionEqnsByLit became possible.

* Desugaring of HsLits is now much tidier (DsExpr.dsLit)

* Some stuff to do with RdrNames is moved from ParseUtil.lhs to RdrHsSyn.lhs,
  which is where it really belongs.

* I also removed
many unnecessary imports from modules
quite a bit of dead code
  in divers places

23 years ago[project @ 2000-09-22 15:47:14 by simonpj]
simonpj [Fri, 22 Sep 2000 15:47:14 +0000 (15:47 +0000)]
[project @ 2000-09-22 15:47:14 by simonpj]
msg1

23 years ago[project @ 2000-09-14 14:24:02 by simonmar]
simonmar [Thu, 14 Sep 2000 14:24:03 +0000 (14:24 +0000)]
[project @ 2000-09-14 14:24:02 by simonmar]
rename blockAsyncExceptions and unblockAsyncExceptions to block and
unblock repectively, to match all the literature.  DEPRECATE the old
names.

23 years ago[project @ 2000-09-14 13:46:39 by simonpj]
simonpj [Thu, 14 Sep 2000 13:46:42 +0000 (13:46 +0000)]
[project @ 2000-09-14 13:46:39 by simonpj]
---------------------------------------
Simon's tuning changes: early Sept 2000
---------------------------------------

Library changes
~~~~~~~~~~~~~~~
* Eta expand PrelShow.showLitChar.  It's impossible to compile this well,
  and it makes a big difference to some programs (e.g. gen_regexps)

* Make PrelList.concat into a good producer (in the foldr/build sense)

Flag changes
~~~~~~~~~~~~
* Add -ddump-hi-diffs to print out changes in interface files.  Useful
  when watching what the compiler is doing

* Add -funfolding-update-in-place to enable the experimental optimisation
  that makes the inliner a bit keener to inline if it's in the RHS of
  a thunk that might be updated in place.  Sometimes this is a bad idea
  (one example is in spectral/sphere; see notes in nofib/Simon-nofib-notes)

Tuning things
~~~~~~~~~~~~~
* Fix a bug in SetLevels.lvlMFE.  (change ctxt_lvl to dest_level)
  I don't think this has any performance effect, but it saves making
  a redundant let-binding that is later eliminated.

* Desugar.dsProgram and DsForeign
  Glom together all the bindings into a single Rec.  Previously the
  bindings generated by 'foreign' declarations were not glommed together, but
  this led to an infelicity (i.e. poorer code than necessary) in the modules
  that actually declare Float and Double (explained a bit more in Desugar.dsProgram)

* OccurAnal.shortMeOut and IdInfo.shortableIdInfo
  Don't do the occurrence analyser's shorting out stuff for things which
  have rules.  Comments near IdInfo.shortableIdInfo.
  This is deeply boring, and mainly to do with making rules work well.
  Maybe rules should have phases attached too....

* CprAnalyse.addIdCprInfo
  Be a bit more willing to add CPR information to thunks;
  in particular, if the strictness analyser has just discovered that this
  is a strict let, then the let-to-case transform will happen, and CPR is fine.
  This made a big difference to PrelBase.modInt, which had something like
modInt = \ x -> let r = ... -> I# v in
...body strict in r...
  r's RHS isn't a value yet; but modInt returns r in various branches, so
  if r doesn't have the CPR property then neither does modInt

* MkId.mkDataConWrapId
  Arrange that vanilla constructors, like (:) and I#, get unfoldings that are
  just a simple variable $w:, $wI#.  This ensures they'll be inlined even into
  rules etc, which makes matching a bit more reliable.  The downside is that in
  situations like (map (:) xs), we'll end up with (map (\y ys. $w: y ys) xs.
  Which is tiresome but it doesn't happen much.

* SaAbsInt.findStrictness
  Deal with the case where a thing with no arguments is bottom.  This is Good.
  E.g.   module M where { foo = error "help" }
  Suppose we have in another module
case M.foo of ...
  Then we'd like to do the case-of-error transform, without inlining foo.

Tidying up things
~~~~~~~~~~~~~~~~~
* Reorganised Simplify.completeBinding (again).

* Removed the is_bot field in CoreUnfolding (is_cheap is true if is_bot is!)
  This is just a tidy up

* HsDecls and others
  Remove the NewCon constructor from ConDecl.  It just added code, and nothing else.
  And it led to a bug in MkIface, which though that a newtype decl was always changing!

* IdInfo and many others
  Remove all vestiges of UpdateInfo (hasn't been used for years)

23 years ago[project @ 2000-09-14 12:12:23 by simonpj]
simonpj [Thu, 14 Sep 2000 12:12:23 +0000 (12:12 +0000)]
[project @ 2000-09-14 12:12:23 by simonpj]
Improve the kind-inference test

23 years ago[project @ 2000-09-14 09:58:00 by simonmar]
simonmar [Thu, 14 Sep 2000 09:58:00 +0000 (09:58 +0000)]
[project @ 2000-09-14 09:58:00 by simonmar]
don't forget to bail out when "compilation IS NOT required"

23 years ago[project @ 2000-09-14 09:10:35 by simonmar]
simonmar [Thu, 14 Sep 2000 09:10:35 +0000 (09:10 +0000)]
[project @ 2000-09-14 09:10:35 by simonmar]
extend the scope of #ifdef GHCI so we can compile this with pre-4.08 compilers.

23 years ago[project @ 2000-09-14 08:17:54 by simonpj]
simonpj [Thu, 14 Sep 2000 08:17:54 +0000 (08:17 +0000)]
[project @ 2000-09-14 08:17:54 by simonpj]
Fix bug in the driver that led to

Fail: system error
Action: getFileStatus

It was due to Simon M's recent addition of modification-time
checking.  You forgot to check whether the file M.o existed!

23 years ago[project @ 2000-09-13 09:54:27 by sewardj]
sewardj [Wed, 13 Sep 2000 09:54:27 +0000 (09:54 +0000)]
[project @ 2000-09-13 09:54:27 by sewardj]
Only import MCI_make_constr if building GHCI.

23 years ago[project @ 2000-09-12 13:19:20 by simonmar]
simonmar [Tue, 12 Sep 2000 13:19:20 +0000 (13:19 +0000)]
[project @ 2000-09-12 13:19:20 by simonmar]
- Add in support for -recomp, which I forgot.
- force -fvia-C if the -C flag is specified on the cmd line

23 years ago[project @ 2000-09-12 13:13:55 by rrt]
rrt [Tue, 12 Sep 2000 13:13:55 +0000 (13:13 +0000)]
[project @ 2000-09-12 13:13:55 by rrt]
Numerous fixes (thanks to Peter Achten for most of them) to the Windows
instructions to make them more accurate and clearer.

23 years ago[project @ 2000-09-12 10:15:09 by sewardj]
sewardj [Tue, 12 Sep 2000 10:15:09 +0000 (10:15 +0000)]
[project @ 2000-09-12 10:15:09 by sewardj]
Get rid of version number in the .hi-boot file, and wrap the entire
contents of StgInterp with #ifdef GHCI, so it isn't built unless you
want it to be.

23 years ago[project @ 2000-09-11 15:04:08 by rrt]
rrt [Mon, 11 Sep 2000 15:04:08 +0000 (15:04 +0000)]
[project @ 2000-09-11 15:04:08 by rrt]
Implemented gettimeofday on Windows by calling GetTickCount(). This
only seems to have a resolution of 1/100s, but that's just about OK
for threadDelay, which only needs 50 ticks per second.

23 years ago[project @ 2000-09-11 15:02:51 by rrt]
rrt [Mon, 11 Sep 2000 15:02:51 +0000 (15:02 +0000)]
[project @ 2000-09-11 15:02:51 by rrt]
Pass --target to configure of GMP, so that building for mingwin under
cygwin works properly.

23 years ago[project @ 2000-09-11 14:56:17 by rrt]
rrt [Mon, 11 Sep 2000 14:56:17 +0000 (14:56 +0000)]
[project @ 2000-09-11 14:56:17 by rrt]
Make sure windows.h is always checked for, not just when HOpenGL is present.

23 years ago[project @ 2000-09-11 14:11:25 by rrt]
rrt [Mon, 11 Sep 2000 14:11:25 +0000 (14:11 +0000)]
[project @ 2000-09-11 14:11:25 by rrt]
Revised GHC installer size downwards.

23 years ago[project @ 2000-09-11 13:56:22 by rrt]
rrt [Mon, 11 Sep 2000 13:56:22 +0000 (13:56 +0000)]
[project @ 2000-09-11 13:56:22 by rrt]
Removed Windows FAQ about -static no longer being supported (it is).

23 years ago[project @ 2000-09-11 12:20:56 by sewardj]
sewardj [Mon, 11 Sep 2000 12:20:57 +0000 (12:20 +0000)]
[project @ 2000-09-11 12:20:56 by sewardj]
First shot at a STG interpreter for GHCI.  Translates Stg syntax into a
form convenient for interpretation, and can then run that.  Most of the
translation stuff is there and works.  The interpreter framework is there
and partly filled in, and seems to work.  There are still quite a lot of
cases, etc, to fill in, but this should be straightforward given that
the framework exists.  This interpreter cannot handle (yet?) unboxed
tuples, but can deal with more or less everything else, including standard
unboxed Int, Double, etc, code.

23 years ago[project @ 2000-09-11 11:17:09 by sewardj]
sewardj [Mon, 11 Sep 2000 11:17:09 +0000 (11:17 +0000)]
[project @ 2000-09-11 11:17:09 by sewardj]
Initial primop support for the metacircular interpreter (GHCI).
Only appears if you compile with -DGHCI; if not, the world is
unchanged.

new primops:
   indexPtrOffClosure#
   indexWordOffClosure#

modified:
   dataToTag#   -- now dereferences indirections before extracting tag

new entry code
   mci_constr_entry          and
   mci_constr[1..8]entry
being the direct and vectored return code fragments for interpreter
created constructors.  Support for static constructors is not yet
done.

New handwritten .hc functions:
   mci_make_constr*
being code to create various flavours of constructors from args
on the stack.  An interface file to describe these will follow in
a later commit.

23 years ago[project @ 2000-09-11 09:27:14 by simonmar]
simonmar [Mon, 11 Sep 2000 09:27:14 +0000 (09:27 +0000)]
[project @ 2000-09-11 09:27:14 by simonmar]
HP-PA fixes from Eric Schweitz <schweitz@nortelnetworks.com>

23 years ago[project @ 2000-09-11 08:13:37 by simonpj]
simonpj [Mon, 11 Sep 2000 08:13:37 +0000 (08:13 +0000)]
[project @ 2000-09-11 08:13:37 by simonpj]
Remove redundant setNoDiscardId call from Specialise.newIdSM

23 years ago[project @ 2000-09-10 17:39:26 by panne]
panne [Sun, 10 Sep 2000 17:39:27 +0000 (17:39 +0000)]
[project @ 2000-09-10 17:39:26 by panne]
First (awkward) steps towards an HOpenGL integration

23 years ago[project @ 2000-09-08 12:33:22 by simonmar]
simonmar [Fri, 8 Sep 2000 12:33:22 +0000 (12:33 +0000)]
[project @ 2000-09-08 12:33:22 by simonmar]
<program> should be <command>

23 years ago[project @ 2000-09-08 11:09:38 by simonpj]
simonpj [Fri, 8 Sep 2000 11:09:38 +0000 (11:09 +0000)]
[project @ 2000-09-08 11:09:38 by simonpj]
Fix the loop in SimplUtils.interestingArg

23 years ago[project @ 2000-09-08 09:26:05 by simonmar]
simonmar [Fri, 8 Sep 2000 09:26:05 +0000 (09:26 +0000)]
[project @ 2000-09-08 09:26:05 by simonmar]
oops, forgot to remove an instance of REALLY_HASKELL_1_3

23 years ago[project @ 2000-09-07 16:32:23 by simonpj]
simonpj [Thu, 7 Sep 2000 16:32:24 +0000 (16:32 +0000)]
[project @ 2000-09-07 16:32:23 by simonpj]
A list of simplifier-related stuff, triggered
by looking at GHC's performance.

I don't guarantee that this lot will lead to
a uniform improvement over 4.08, but it it should
be a bit better.  More work probably required.

* Make the simplifier's Stop continuation record whether the expression being
  simplified is the RHS of a thunk, or (say) the body of a lambda or case RHS.
  In the thunk case we want to be a bit keener about inlining if the type of
  the thunk is amenable to update in place.

* Fix interestingArg, which was being too liberal, and hence doing
  too much inlining.

* Extended CoreUtils.exprIsCheap to make two more things cheap:
    -  case (coerce x) of ...
    -   let x = y +# z
  This makes a bit more eta expansion happen.  It was provoked by
  a program of Marcin's.

* MkIface.ifaceBinds.   Make sure that we emit rules for things
  (like class operations) that don't get a top-level binding in the
  interface file.  Previously such rules were silently forgotten.

* Move transformRhs to *after* simplification, which makes it a
  little easier to do, and means that the arity it computes is
  readily available to completeBinding.  This gets much better
  arities.

* Do coerce splitting in completeBinding. This gets good code for
newtype CInt = CInt Int

test:: CInt -> Int
test x = case x of
          1 -> 2
          2 -> 4
          3 -> 8
          4 -> 16
          _ -> 0

* Modify the meaning of "arity" so that during compilation it means
  "if you apply this function to fewer args, it will do virtually
  no work".   So, for example
f = coerce t (\x -> e)
  has arity at least 1.  When a function is exported, it's arity becomes
  the number of exposed, top-level lambdas, which is subtly different.
  But that's ok.

  I removed CoreUtils.exprArity altogether: it looked only at the exposed
  lambdas.  Instead, we use exprEtaExpandArity exclusively.

  All of this makes I/O programs work much better.

23 years ago[project @ 2000-09-07 16:31:45 by simonpj]
simonpj [Thu, 7 Sep 2000 16:31:46 +0000 (16:31 +0000)]
[project @ 2000-09-07 16:31:45 by simonpj]
* The simplifier used to glom together all the top-level bindings into
  a single Rec every time it was invoked.  The reason for this is explained
  in SimplCore.lhs, but for at least one simple program it meant that the
  simplifier never got around to unravelling the recursive group into
  non-recursive pieces.  So I've put the glomming under explicit flag
  control with a -fglom-binds simplifier pass.   A side benefit is
  that because it happens less often, the (expensive) SCC algorithm
  runs less often.

23 years ago[project @ 2000-09-07 16:29:36 by simonpj]
simonpj [Thu, 7 Sep 2000 16:29:36 +0000 (16:29 +0000)]
[project @ 2000-09-07 16:29:36 by simonpj]
Omit unnecessary import

23 years ago[project @ 2000-09-07 16:28:44 by simonpj]
simonpj [Thu, 7 Sep 2000 16:28:44 +0000 (16:28 +0000)]
[project @ 2000-09-07 16:28:44 by simonpj]
Do the begin-pass/end-pass stuff like the other core passes

23 years ago[project @ 2000-09-07 16:27:55 by simonpj]
simonpj [Thu, 7 Sep 2000 16:27:55 +0000 (16:27 +0000)]
[project @ 2000-09-07 16:27:55 by simonpj]
Add comment

23 years ago[project @ 2000-09-07 16:25:32 by simonpj]
simonpj [Thu, 7 Sep 2000 16:25:32 +0000 (16:25 +0000)]
[project @ 2000-09-07 16:25:32 by simonpj]
Add an access function substEnvEnv

23 years ago[project @ 2000-09-07 16:24:14 by simonpj]
simonpj [Thu, 7 Sep 2000 16:24:14 +0000 (16:24 +0000)]
[project @ 2000-09-07 16:24:14 by simonpj]
Get the worker and wrapper in the right order

23 years ago[project @ 2000-09-07 13:25:28 by simonpj]
simonpj [Thu, 7 Sep 2000 13:25:28 +0000 (13:25 +0000)]
[project @ 2000-09-07 13:25:28 by simonpj]
Primitives can return ThreadId# values

23 years ago[project @ 2000-09-07 11:42:49 by simonpj]
simonpj [Thu, 7 Sep 2000 11:42:50 +0000 (11:42 +0000)]
[project @ 2000-09-07 11:42:49 by simonpj]
1) Fix a bad bug in Subst.lhs that made uniqAway go into an
   infinite loop when the 'hash code' in the in-scope set was
   zero.

2) Rename BasicTypes.isFragileOccInfo to isFragileOcc
   Add isDeadOcc to BasisTypes

(2) is just a tidy-up.  I have to commit it now because of (1), which
is a bad bug.  I hope that I've committed all the files involved in (2).

23 years ago[project @ 2000-09-07 11:23:59 by rrt]
rrt [Thu, 7 Sep 2000 11:23:59 +0000 (11:23 +0000)]
[project @ 2000-09-07 11:23:59 by rrt]
Added support for building gmp.dll again.

23 years ago[project @ 2000-09-07 11:23:22 by rrt]
rrt [Thu, 7 Sep 2000 11:23:22 +0000 (11:23 +0000)]
[project @ 2000-09-07 11:23:22 by rrt]
Gave version of RedHat in DocBook note.

23 years ago[project @ 2000-09-07 11:22:28 by rrt]
rrt [Thu, 7 Sep 2000 11:22:28 +0000 (11:22 +0000)]
[project @ 2000-09-07 11:22:28 by rrt]
Added note on how to fix RedHat 6.2 DocBook installation.

23 years ago[project @ 2000-09-07 10:14:52 by simonpj]
simonpj [Thu, 7 Sep 2000 10:14:52 +0000 (10:14 +0000)]
[project @ 2000-09-07 10:14:52 by simonpj]
Improve -ddump-types

23 years ago[project @ 2000-09-07 09:10:07 by simonpj]
simonpj [Thu, 7 Sep 2000 09:10:07 +0000 (09:10 +0000)]
[project @ 2000-09-07 09:10:07 by simonpj]
* Make the desugarer use string equality for string literal
  patterns longer than 1 character.  And put a specialised
  eqString into PrelBase, with a suitable specialisation rule.
  This makes a huge difference to the size of the code generated
  by deriving(Read) notably in Time.lhs

23 years ago[project @ 2000-09-06 13:49:26 by simonmar]
simonmar [Wed, 6 Sep 2000 13:49:26 +0000 (13:49 +0000)]
[project @ 2000-09-06 13:49:26 by simonmar]
revert accidental parts of previous commit

23 years ago[project @ 2000-09-06 13:30:48 by simonmar]
simonmar [Wed, 6 Sep 2000 13:30:48 +0000 (13:30 +0000)]
[project @ 2000-09-06 13:30:48 by simonmar]
add test for typedef-conflict with f.i.d.

23 years ago[project @ 2000-09-06 13:29:10 by simonmar]
simonmar [Wed, 6 Sep 2000 13:29:10 +0000 (13:29 +0000)]
[project @ 2000-09-06 13:29:10 by simonmar]
Generate a new unique to be used in the typedef for a f.i.d., rather
than re-using the one from the function call, which might conflict if
there are two similar calls in the same module.

23 years ago[project @ 2000-09-06 13:11:59 by simonmar]
simonmar [Wed, 6 Sep 2000 13:11:59 +0000 (13:11 +0000)]
[project @ 2000-09-06 13:11:59 by simonmar]
Document -unreg and unregisterised compilation.  Untested since
our DocBook installation is currently broken.

23 years ago[project @ 2000-09-06 12:21:15 by simonmar]
simonmar [Wed, 6 Sep 2000 12:21:15 +0000 (12:21 +0000)]
[project @ 2000-09-06 12:21:15 by simonmar]
When compiling code for a case where the scrutinee is a primitve
comparison operator, we used to place the tag in a variable whose
unique was always the same: `mkPseudoUnique1 1'.  This was mostly
harmless but confused the Stix inliner in the NCG into generating
slightly less efficient code when the variable was used twice in a
basic block.

This patch fixes the problem by generating a new unique by just
changing the "tag" of an existing unique, namely the case binder.

23 years ago[project @ 2000-09-06 11:27:07 by rrt]
rrt [Wed, 6 Sep 2000 11:27:07 +0000 (11:27 +0000)]
[project @ 2000-09-06 11:27:07 by rrt]
Corrected URL for release notes.

23 years ago[project @ 2000-09-06 11:12:07 by rrt]
rrt [Wed, 6 Sep 2000 11:12:07 +0000 (11:12 +0000)]
[project @ 2000-09-06 11:12:07 by rrt]
Made message for exceeding 128Mb of heap on Windows more helpful, and
only abort when this limit is exceeded, not on first memory allocation!

23 years ago[project @ 2000-09-06 10:28:48 by simonmar]
simonmar [Wed, 6 Sep 2000 10:28:48 +0000 (10:28 +0000)]
[project @ 2000-09-06 10:28:48 by simonmar]
Add codegen test for returning MutVar#.

23 years ago[project @ 2000-09-06 10:23:52 by simonmar]
simonmar [Wed, 6 Sep 2000 10:23:52 +0000 (10:23 +0000)]
[project @ 2000-09-06 10:23:52 by simonmar]
Add new PrimRep, namely PrimPtrRep, as a catch-all for the various
boxed primitive types that currently don't have their own PrimReps.
Use this for MVar# and MutVar#.  This fixes a crash in the code
generator when a function returns one of these types.

23 years ago[project @ 2000-09-06 10:21:17 by simonmar]
simonmar [Wed, 6 Sep 2000 10:21:17 +0000 (10:21 +0000)]
[project @ 2000-09-06 10:21:17 by simonmar]
recode primOpOkForSpeculation in terms of primOpIsCheap and primOpCanFail.

23 years ago[project @ 2000-09-05 12:38:26 by simonmar]
simonmar [Tue, 5 Sep 2000 12:38:27 +0000 (12:38 +0000)]
[project @ 2000-09-05 12:38:26 by simonmar]
Add tests for newtypes in foreign declarations.

23 years ago[project @ 2000-09-05 12:36:45 by simonmar]
simonmar [Tue, 5 Sep 2000 12:36:45 +0000 (12:36 +0000)]
[project @ 2000-09-05 12:36:45 by simonmar]
update output

23 years ago[project @ 2000-09-05 12:35:09 by simonmar]
simonmar [Tue, 5 Sep 2000 12:35:09 +0000 (12:35 +0000)]
[project @ 2000-09-05 12:35:09 by simonmar]
Use newtype Ptr instead of just Addr, test newtypes in foreign decls.

23 years ago[project @ 2000-09-05 12:31:04 by simonmar]
simonmar [Tue, 5 Sep 2000 12:31:04 +0000 (12:31 +0000)]
[project @ 2000-09-05 12:31:04 by simonmar]
No need to set TMPDIR in BUILD_LIB now.  Perhaps this was a workaround
for the previous bug.

23 years ago[project @ 2000-09-05 10:18:28 by simonmar]
simonmar [Tue, 5 Sep 2000 10:18:28 +0000 (10:18 +0000)]
[project @ 2000-09-05 10:18:28 by simonmar]
- add -fno-warn-incomplete-patterns
- rename TMPDIR to DEFAULT_TMPDIR
- check TMPDIR environment variable (apprently missing before)
- add a bunch of anti-flags for profiling: -no-auto-all and friends.

23 years ago[project @ 2000-09-05 10:16:40 by simonmar]
simonmar [Tue, 5 Sep 2000 10:16:41 +0000 (10:16 +0000)]
[project @ 2000-09-05 10:16:40 by simonmar]
Rename the make variable TMPDIR to DEFAULT_TMPDIR.  This fixes the
problem that saying 'TMPDIR=/foo make' in an fptools tree didn't work,
because GNU make is in the habit of overriding an environment variable
with the value of the corresponding make variable in a sub-process.

23 years ago[project @ 2000-09-05 09:40:08 by simonmar]
simonmar [Tue, 5 Sep 2000 09:40:08 +0000 (09:40 +0000)]
[project @ 2000-09-05 09:40:08 by simonmar]
Just include ghc/docs/set in a binary distribution, not the build
system docs or the FFI spec.

23 years ago[project @ 2000-09-05 09:14:15 by simonmar]
simonmar [Tue, 5 Sep 2000 09:14:15 +0000 (09:14 +0000)]
[project @ 2000-09-05 09:14:15 by simonmar]
remove a lot of unused gumph from this file

23 years ago[project @ 2000-09-05 09:13:38 by simonmar]
simonmar [Tue, 5 Sep 2000 09:13:38 +0000 (09:13 +0000)]
[project @ 2000-09-05 09:13:38 by simonmar]
remove last use of REALLY_HASKELL_1_3

23 years ago[project @ 2000-09-05 09:10:22 by simonmar]
simonmar [Tue, 5 Sep 2000 09:10:22 +0000 (09:10 +0000)]
[project @ 2000-09-05 09:10:22 by simonmar]
Use std monadic operators instead of `thenStrictlyST` and friends.

23 years ago[project @ 2000-09-05 09:04:59 by simonmar]
simonmar [Tue, 5 Sep 2000 09:04:59 +0000 (09:04 +0000)]
[project @ 2000-09-05 09:04:59 by simonmar]
comment update

23 years ago[project @ 2000-09-04 16:33:12 by rrt]
rrt [Mon, 4 Sep 2000 16:33:12 +0000 (16:33 +0000)]
[project @ 2000-09-04 16:33:12 by rrt]
Removed spurious definition of GHC_INPLACE

23 years ago[project @ 2000-09-04 15:23:55 by simonmar]
simonmar [Mon, 4 Sep 2000 15:23:55 +0000 (15:23 +0000)]
[project @ 2000-09-04 15:23:55 by simonmar]
Test for freeing StablePtrs.

23 years ago[project @ 2000-09-04 15:17:03 by simonmar]
simonmar [Mon, 4 Sep 2000 15:17:03 +0000 (15:17 +0000)]
[project @ 2000-09-04 15:17:03 by simonmar]
- debugging: print weights as unsigned
- clean up getStablePtr a bit
- correct a comment

23 years ago[project @ 2000-09-04 15:09:49 by simonmar]
simonmar [Mon, 4 Sep 2000 15:09:49 +0000 (15:09 +0000)]
[project @ 2000-09-04 15:09:49 by simonmar]
Fix a bug in freeStablePtr, the weight being subtracted from the entry
in the stable pointer table was wrong.

23 years ago[project @ 2000-09-04 15:08:42 by simonmar]
simonmar [Mon, 4 Sep 2000 15:08:42 +0000 (15:08 +0000)]
[project @ 2000-09-04 15:08:42 by simonmar]
Fix a couple of bugs in the StablePtr weigthed reference counting.

23 years ago[project @ 2000-09-04 14:39:10 by simonmar]
simonmar [Mon, 4 Sep 2000 14:39:10 +0000 (14:39 +0000)]
[project @ 2000-09-04 14:39:10 by simonmar]
turn off -Wpointer-arith, it generates some warnings in the headers on RH6.2

23 years ago[project @ 2000-09-04 14:10:38 by simonmar]
simonmar [Mon, 4 Sep 2000 14:10:38 +0000 (14:10 +0000)]
[project @ 2000-09-04 14:10:38 by simonmar]
Convert one of the alternatives in an algebraic switch into the
default, if we don't already have a default.  This generates better
code in particular for inline comparison primops.

Noticed by: Qrczak

23 years ago[project @ 2000-09-04 14:07:29 by simonmar]
simonmar [Mon, 4 Sep 2000 14:07:29 +0000 (14:07 +0000)]
[project @ 2000-09-04 14:07:29 by simonmar]
Use mkAbsCStmts rather than AbsCStmts directly.

23 years ago[project @ 2000-09-04 13:59:55 by simonmar]
simonmar [Mon, 4 Sep 2000 13:59:55 +0000 (13:59 +0000)]
[project @ 2000-09-04 13:59:55 by simonmar]
test for bogus parse caused by Happy bug

23 years ago[project @ 2000-09-01 18:28:41 by qrczak]
qrczak [Fri, 1 Sep 2000 18:28:41 +0000 (18:28 +0000)]
[project @ 2000-09-01 18:28:41 by qrczak]
ForeignObjs were incorrectly passed to foreign functions by the NCG.
Fixed.

23 years ago[project @ 2000-08-31 19:57:42 by simonpj]
simonpj [Thu, 31 Aug 2000 19:57:42 +0000 (19:57 +0000)]
[project @ 2000-08-31 19:57:42 by simonpj]
Make freeze and thaw top-level

23 years ago[project @ 2000-08-31 19:55:46 by simonpj]
simonpj [Thu, 31 Aug 2000 19:55:46 +0000 (19:55 +0000)]
[project @ 2000-08-31 19:55:46 by simonpj]
Put the max in a better place

23 years ago[project @ 2000-08-31 19:55:20 by simonpj]
simonpj [Thu, 31 Aug 2000 19:55:20 +0000 (19:55 +0000)]
[project @ 2000-08-31 19:55:20 by simonpj]
Add comment

23 years ago[project @ 2000-08-31 09:53:08 by simonpj]
simonpj [Thu, 31 Aug 2000 09:53:08 +0000 (09:53 +0000)]
[project @ 2000-08-31 09:53:08 by simonpj]
Document -ddump-minimal-imports

23 years ago[project @ 2000-08-30 07:36:47 by simonpj]
simonpj [Wed, 30 Aug 2000 07:36:47 +0000 (07:36 +0000)]
[project @ 2000-08-30 07:36:47 by simonpj]
Add test for selectors in data/newtype with contexts

23 years ago[project @ 2000-08-30 03:01:48 by kglynn]
kglynn [Wed, 30 Aug 2000 03:01:48 +0000 (03:01 +0000)]
[project @ 2000-08-30 03:01:48 by kglynn]
wrong2 wrongly referred to as wrong1 - righted

23 years ago[project @ 2000-08-29 17:42:17 by qrczak]
qrczak [Tue, 29 Aug 2000 17:42:17 +0000 (17:42 +0000)]
[project @ 2000-08-29 17:42:17 by qrczak]
Don't use Int# values larger than 2^31.

23 years ago[project @ 2000-08-29 16:56:26 by simonpj]
simonpj [Tue, 29 Aug 2000 16:56:26 +0000 (16:56 +0000)]
[project @ 2000-08-29 16:56:26 by simonpj]
Fix a bug reported by Jose Emilio Labra Gayo

newtype Foo a => T = MkT (out :: a)

The selector 'out' was being given an incorrect RHS.
(Core Lint spotted it.)

23 years ago[project @ 2000-08-29 16:38:04 by simonpj]
simonpj [Tue, 29 Aug 2000 16:38:04 +0000 (16:38 +0000)]
[project @ 2000-08-29 16:38:04 by simonpj]
Move prim_ZONE and prim_GMTOFF into Hugs-only code

23 years ago[project @ 2000-08-29 16:37:35 by simonpj]
simonpj [Tue, 29 Aug 2000 16:37:35 +0000 (16:37 +0000)]
[project @ 2000-08-29 16:37:35 by simonpj]
Remove redundant imports and dead code

23 years ago[project @ 2000-08-29 16:36:23 by simonpj]
simonpj [Tue, 29 Aug 2000 16:36:23 +0000 (16:36 +0000)]
[project @ 2000-08-29 16:36:23 by simonpj]
Remove redundant imports

23 years ago[project @ 2000-08-29 16:35:56 by simonpj]
simonpj [Tue, 29 Aug 2000 16:35:56 +0000 (16:35 +0000)]
[project @ 2000-08-29 16:35:56 by simonpj]
Add filterFB comment

23 years ago[project @ 2000-08-29 13:34:21 by qrczak]
qrczak [Tue, 29 Aug 2000 13:34:21 +0000 (13:34 +0000)]
[project @ 2000-08-29 13:34:21 by qrczak]
Don't use a typedef called int64 in RtsAPI.
It conflicts with e.g. OCaml's headers.
It should be cleaned better...

23 years ago[project @ 2000-08-25 15:21:57 by simonmar]
simonmar [Fri, 25 Aug 2000 15:21:57 +0000 (15:21 +0000)]
[project @ 2000-08-25 15:21:57 by simonmar]
Fix for copying html documentation into a binary dist.

23 years ago[project @ 2000-08-25 13:26:57 by simonmar]
simonmar [Fri, 25 Aug 2000 13:26:57 +0000 (13:26 +0000)]
[project @ 2000-08-25 13:26:57 by simonmar]
Add a test (also benchmark) for threadDelay, Random, and QSemN.  This
test starts a large number of threads which all wait for a random
delay.  The semaphore is used to wait for them all to finish before exiting.

23 years ago[project @ 2000-08-25 13:12:07 by simonmar]
simonmar [Fri, 25 Aug 2000 13:12:07 +0000 (13:12 +0000)]
[project @ 2000-08-25 13:12:07 by simonmar]
Change the way threadDelay# is implemented.

We now use a list of sleeping threads sorted in increasing order by
the time at which they will wake up.  This avoids us having to
traverse the entire queue on each context switch.

23 years ago[project @ 2000-08-25 12:49:54 by rrt]
rrt [Fri, 25 Aug 2000 12:49:54 +0000 (12:49 +0000)]
[project @ 2000-08-25 12:49:54 by rrt]
Sorry Sigbj&oslash;rn, but DocBook won't accept &oslash; in <Author>
elements. Seems to work everywhere else...

23 years ago[project @ 2000-08-25 10:06:37 by qrczak]
qrczak [Fri, 25 Aug 2000 10:06:37 +0000 (10:06 +0000)]
[project @ 2000-08-25 10:06:37 by qrczak]
Don't strip libgmp.a. (But perhaps --strip-unneeded or something
would be harmless.)

PS. The configure script looks for __gmpz_fdiv_qr, but gmp that I have
installed uses the name mpz_fdiv_qr and is thus not being found. (Also
it is dynamically linked, where ghc's gmp is only statically linked.)
I guess that configure should check for either name.

23 years ago[project @ 2000-08-24 15:17:54 by rrt]
rrt [Thu, 24 Aug 2000 15:17:54 +0000 (15:17 +0000)]
[project @ 2000-08-24 15:17:54 by rrt]
Added more authors.