ghc-hetmet.git
21 years ago[project @ 2003-03-20 12:32:22 by simonmar]
simonmar [Thu, 20 Mar 2003 12:32:22 +0000 (12:32 +0000)]
[project @ 2003-03-20 12:32:22 by simonmar]
Compile libraries with -O

21 years ago[project @ 2003-03-20 12:20:06 by simonpj]
simonpj [Thu, 20 Mar 2003 12:20:06 +0000 (12:20 +0000)]
[project @ 2003-03-20 12:20:06 by simonpj]
----------------------------------
      Fix a long-standing egregious CorePrep bug
----------------------------------

**** Merge to Stable branch ****

CorePrep was eta-reducing

\x -> (# a,x #)
to
(#,#) a

which is utterly wrong.  Easily fixed though.

21 years ago[project @ 2003-03-20 11:53:57 by simonmar]
simonmar [Thu, 20 Mar 2003 11:53:57 +0000 (11:53 +0000)]
[project @ 2003-03-20 11:53:57 by simonmar]
Reformat this section a bit, and add a note about the poor performance
of mutable arrays in the garbage collector.

21 years ago[project @ 2003-03-20 08:52:55 by simonpj]
simonpj [Thu, 20 Mar 2003 08:52:55 +0000 (08:52 +0000)]
[project @ 2003-03-20 08:52:55 by simonpj]
Correct file names in RULES documentation

21 years ago[project @ 2003-03-19 19:07:31 by sof]
sof [Wed, 19 Mar 2003 19:07:31 +0000 (19:07 +0000)]
[project @ 2003-03-19 19:07:31 by sof]
threadLabels: not public

21 years ago[project @ 2003-03-19 18:56:14 by sof]
sof [Wed, 19 Mar 2003 18:56:14 +0000 (18:56 +0000)]
[project @ 2003-03-19 18:56:14 by sof]
protoize heapCheckFail()

21 years ago[project @ 2003-03-19 18:41:18 by sof]
sof [Wed, 19 Mar 2003 18:41:20 +0000 (18:41 +0000)]
[project @ 2003-03-19 18:41:18 by sof]
drop Main.h

21 years ago[project @ 2003-03-19 18:33:31 by sof]
sof [Wed, 19 Mar 2003 18:33:31 +0000 (18:33 +0000)]
[project @ 2003-03-19 18:33:31 by sof]
no longer used

21 years ago[project @ 2003-03-19 17:33:29 by wolfgang]
wolfgang [Wed, 19 Mar 2003 17:33:29 +0000 (17:33 +0000)]
[project @ 2003-03-19 17:33:29 by wolfgang]
Correct error in MacOS-specific configure code.

21 years ago[project @ 2003-03-18 14:36:56 by simonmar]
simonmar [Tue, 18 Mar 2003 14:36:56 +0000 (14:36 +0000)]
[project @ 2003-03-18 14:36:56 by simonmar]
Fix a profiling crash on Windows.

fprint_ccs used snprintf() to avoid overflowing a buffer; on mingw32
where snprintf() doesn't exist we were just using the straight
sprintf(), which inevitably lead to a crash.  Rewritten to use a
homegrown non-overflowing string copying function - it actually looks
nicer now, anwyay.

21 years ago[project @ 2003-03-18 10:28:15 by simonmar]
simonmar [Tue, 18 Mar 2003 10:28:15 +0000 (10:28 +0000)]
[project @ 2003-03-18 10:28:15 by simonmar]
This should have been committed along with rev. 1.36 of Main.c (and
others) yesterday, but for some reason it got left out.

Change the way Main.main is run, so it now doesn't force the return
value.  Now 'main = return undefined' will run and exit successfully.

The change affects finalizers too - but since they have type IO (), it
won't do any harm not to evaluate the ().

21 years ago[project @ 2003-03-18 10:12:37 by simonmar]
simonmar [Tue, 18 Mar 2003 10:12:37 +0000 (10:12 +0000)]
[project @ 2003-03-18 10:12:37 by simonmar]
Fix wibble in previous commit (fixes broken bootstrap)

21 years ago[project @ 2003-03-17 14:51:00 by simonmar]
simonmar [Mon, 17 Mar 2003 14:51:00 +0000 (14:51 +0000)]
[project @ 2003-03-17 14:51:00 by simonmar]
Fix for lexing of floating point numbers.  '9e2' should be a float.

Noticed-by: Ross Paterson.

21 years ago[project @ 2003-03-17 14:47:47 by simonmar]
simonmar [Mon, 17 Mar 2003 14:47:48 +0000 (14:47 +0000)]
[project @ 2003-03-17 14:47:47 by simonmar]
Haskell quiz:  what should this program do?

  main = return undefined

answer: run to completion and exit successfully.  GHC erroneously
evaluates the returned value from main, which causes this example to
fail with an uncaught exception (the evaluation is even done outside
of the main exception handler!).

21 years ago[project @ 2003-03-16 14:15:21 by igloo]
igloo [Sun, 16 Mar 2003 14:15:22 +0000 (14:15 +0000)]
[project @ 2003-03-16 14:15:21 by igloo]
Support for contexts on data types and records from Derek Elkins.

21 years ago[project @ 2003-03-14 16:51:59 by simonmar]
simonmar [Fri, 14 Mar 2003 16:51:59 +0000 (16:51 +0000)]
[project @ 2003-03-14 16:51:59 by simonmar]
Fix tryM for GHC 5.00.x and 5.02.x.

21 years ago[project @ 2003-03-11 12:26:14 by stolz]
stolz [Tue, 11 Mar 2003 12:26:14 +0000 (12:26 +0000)]
[project @ 2003-03-11 12:26:14 by stolz]
Add comment about lack of instance-support in .hi-boot

21 years ago[project @ 2003-03-11 10:34:58 by simonmar]
simonmar [Tue, 11 Mar 2003 10:34:58 +0000 (10:34 +0000)]
[project @ 2003-03-11 10:34:58 by simonmar]
- Remove mention of MutableByteArray and ByteArray

- Add section on memory allocation in the FFI, with emphasis on how
  GHC's implementations of the various kinds of allocation perform.

21 years ago[project @ 2003-03-11 09:16:02 by simonpj]
simonpj [Tue, 11 Mar 2003 09:16:02 +0000 (09:16 +0000)]
[project @ 2003-03-11 09:16:02 by simonpj]
----------------------------------
      Fix a long-standing egregious parser bug
----------------------------------

*** MERGE TO STABLE ***

*** NB: the important part of this commit
*** got committed by accident with an
*** unrelated message.  This commit
*** should be from rev 1.50 to 1.52 of RdrHsSyn

GHC has parsed

data T String = T String

without complaint, ever since day 1!  This led to consequential
incomprehensible messages.  The fix is easy.

21 years ago[project @ 2003-03-11 09:08:38 by simonpj]
simonpj [Tue, 11 Mar 2003 09:08:38 +0000 (09:08 +0000)]
[project @ 2003-03-11 09:08:38 by simonpj]
Document external core a bit more

21 years ago[project @ 2003-03-11 09:07:15 by simonpj]
simonpj [Tue, 11 Mar 2003 09:07:15 +0000 (09:07 +0000)]
[project @ 2003-03-11 09:07:15 by simonpj]
Restructure documentation about undecidable instances

21 years ago[project @ 2003-03-11 09:04:59 by simonpj]
simonpj [Tue, 11 Mar 2003 09:05:00 +0000 (09:05 +0000)]
[project @ 2003-03-11 09:04:59 by simonpj]
Buglet in external-core parsing

21 years ago[project @ 2003-03-10 13:27:34 by simonmar]
simonmar [Mon, 10 Mar 2003 13:27:34 +0000 (13:27 +0000)]
[project @ 2003-03-10 13:27:34 by simonmar]
Use STK_CHK_NP rather than STK_CHK_GEN in the entry code for AP and
AP_STACK thunks.

The reason is that if the check fails, on return the closure might
have been blackholed (perhaps due to lazy blackholing, or even because
another thread has entered it), so we *must* enter the closure to
continue, rather than just continuing at the original entry point.

All compiler-generated thunks do this anyway, I think these are the
only cases of thunks which don't follow the rule.

Thanks to Robert Ennals for spotting, and correctly diagnosing, the
bug.

21 years ago[project @ 2003-03-10 12:48:10 by stolz]
stolz [Mon, 10 Mar 2003 12:48:10 +0000 (12:48 +0000)]
[project @ 2003-03-10 12:48:10 by stolz]
Fix typo

21 years ago[project @ 2003-03-10 10:30:26 by umuta]
umuta [Mon, 10 Mar 2003 10:30:26 +0000 (10:30 +0000)]
[project @ 2003-03-10 10:30:26 by umuta]
Fix compilation problem on mingw32

21 years ago[project @ 2003-03-07 13:37:15 by simonpj]
simonpj [Fri, 7 Mar 2003 13:37:15 +0000 (13:37 +0000)]
[project @ 2003-03-07 13:37:15 by simonpj]
Minor wording

21 years ago[project @ 2003-03-07 13:36:59 by simonpj]
simonpj [Fri, 7 Mar 2003 13:36:59 +0000 (13:36 +0000)]
[project @ 2003-03-07 13:36:59 by simonpj]
Update docs on class method types

21 years ago[project @ 2003-03-07 13:36:00 by simonpj]
simonpj [Fri, 7 Mar 2003 13:36:28 +0000 (13:36 +0000)]
[project @ 2003-03-07 13:36:00 by simonpj]
Markup glitch

21 years ago[project @ 2003-03-07 11:22:06 by simonmar]
simonmar [Fri, 7 Mar 2003 11:22:06 +0000 (11:22 +0000)]
[project @ 2003-03-07 11:22:06 by simonmar]
Oops, byteCodeGen should get the bindings from CorePrep, not CoreTidy
(should fix last night's GHCi breakage).

21 years ago[project @ 2003-03-06 15:23:35 by ross]
ross [Thu, 6 Mar 2003 15:23:35 +0000 (15:23 +0000)]
[project @ 2003-03-06 15:23:35 by ross]
some rearrangement.

21 years ago[project @ 2003-03-06 15:16:31 by ross]
ross [Thu, 6 Mar 2003 15:16:31 +0000 (15:16 +0000)]
[project @ 2003-03-06 15:16:31 by ross]
also install libraries.html

21 years ago[project @ 2003-03-06 13:24:46 by ross]
ross [Thu, 6 Mar 2003 13:24:46 +0000 (13:24 +0000)]
[project @ 2003-03-06 13:24:46 by ross]
notes for Hugs

21 years ago[project @ 2003-03-06 13:24:08 by ross]
ross [Thu, 6 Mar 2003 13:24:08 +0000 (13:24 +0000)]
[project @ 2003-03-06 13:24:08 by ross]
generate docs/libraries.html

21 years ago[project @ 2003-03-06 12:03:34 by simonmar]
simonmar [Thu, 6 Mar 2003 12:03:34 +0000 (12:03 +0000)]
[project @ 2003-03-06 12:03:34 by simonmar]
Split off the hierarchical libraries page, so the Hugs folks can use it too.

21 years ago[project @ 2003-03-05 10:22:22 by simonmar]
simonmar [Wed, 5 Mar 2003 10:22:22 +0000 (10:22 +0000)]
[project @ 2003-03-05 10:22:22 by simonmar]
Duh.  hsc2hs should be in $(GhcBinDistShScripts), not
$(GhcBinDistBins), otherwise it doesn't get the right directories
tacked on the front at installation time.  Strange that nobody
complained that hsc2hs wasn't working from a binary dist *shrug*.

21 years ago[project @ 2003-03-04 11:12:11 by simonmar]
simonmar [Tue, 4 Mar 2003 11:12:11 +0000 (11:12 +0000)]
[project @ 2003-03-04 11:12:11 by simonmar]
Make it compile again with 5.04.x

21 years ago[project @ 2003-03-04 10:39:58 by simonmar]
simonmar [Tue, 4 Mar 2003 10:39:59 +0000 (10:39 +0000)]
[project @ 2003-03-04 10:39:58 by simonmar]
Fix compilation breakage with GHC 4.08.x.

21 years ago[project @ 2003-03-04 01:29:25 by sof]
sof [Tue, 4 Mar 2003 01:29:25 +0000 (01:29 +0000)]
[project @ 2003-03-04 01:29:25 by sof]
win32/Ticker.c:startTicker(),
win32/IOManager.c:NewIOWorkerThread():
  pass in non-NULL pointer to _beginthreadex()'s outgoing thread ID arg.
  Needed to work with Win9x's impl of CreateThread().

21 years ago[project @ 2003-03-03 12:43:31 by simonmar]
simonmar [Mon, 3 Mar 2003 12:43:42 +0000 (12:43 +0000)]
[project @ 2003-03-03 12:43:31 by simonmar]
A round of space-leak fixing.

  - re-instate zapping of the PersistentCompilerState at various
    points during the compilation cycle in HscMain.  This affects
    one-shot compilation only, since in this mode the information
    collected in the PCS is not required after creating the final
    interface file.

  - Unravel the recursive dependency between MkIface and
    CoreTidy/CoreToStg.  Previously the CafInfo for each binding was
    calculated by CoreToStg, and fed back into the IdInfo of the Ids
    generated by CoreTidy (an earlier pass).  MkIface then took this
    IdInfo and the bindings from CoreTidy to generate the interface;
    but it couldn't do this until *after* CoreToStg, because the CafInfo
    hadn't been calculated yet.  The result was that the CoreTidy
    output lived until after CoreToStg, and at the same time as the
    CorePrep and STG syntax, which is wasted space, not to mention
    the complexity and general ugliness in HscMain.

    So now we calculate CafInfo directly in CoreTidy.  The downside is
    that we have to predict what CorePrep is going to do to the
    bindings so we can tell what will turn into a CAF later, but it's
    no worse than before (it turned out that we were doing this
    prediction before in CoreToStg anyhow).

  - The typechecker lazilly typechecks unfoldings.  It turns out that
    this is a good idea from a performance perspective, but it also
    means that it must hang on to all the information it needs to
    do the typechecking.  Previously this meant holding on to the
    whole of the typechecker's environment, which includes all sorts
    of stuff which isn't necessary to typecheck unfoldings.  By paring
    down the environment captured by the lazy unfoldings, we can
    save quite a bit of space in the phases after typechecking.

21 years ago[project @ 2003-03-03 12:31:55 by simonmar]
simonmar [Mon, 3 Mar 2003 12:31:55 +0000 (12:31 +0000)]
[project @ 2003-03-03 12:31:55 by simonmar]
Use listArray rather than array in (un)?boxedTupleArr.

21 years ago[project @ 2003-03-03 12:30:59 by simonmar]
simonmar [Mon, 3 Mar 2003 12:30:59 +0000 (12:30 +0000)]
[project @ 2003-03-03 12:30:59 by simonmar]
Remove unused export.

21 years ago[project @ 2003-03-03 12:30:39 by simonmar]
simonmar [Mon, 3 Mar 2003 12:30:39 +0000 (12:30 +0000)]
[project @ 2003-03-03 12:30:39 by simonmar]
underscore some variables that aren't used.

21 years ago[project @ 2003-03-03 12:30:11 by simonmar]
simonmar [Mon, 3 Mar 2003 12:30:11 +0000 (12:30 +0000)]
[project @ 2003-03-03 12:30:11 by simonmar]
Compilation fix after recent addition of environment stuff to System.Posix.

21 years ago[project @ 2003-02-26 17:04:11 by simonpj]
simonpj [Wed, 26 Feb 2003 17:04:16 +0000 (17:04 +0000)]
[project @ 2003-02-26 17:04:11 by simonpj]
----------------------------------
Improve higher-rank type inference
----------------------------------

Yanling Wang pointed out that if we have

f = \ (x :: forall a. a->a). x

it would be reasonable to expect that type inference would get the "right"
rank-2 type for f.  She also found that the plausible definition

f :: (forall a. a->a) = \x -> x

acutally failed to type check.

This commit fixes up TcBinds.tcMonoBinds so that it does a better job.
The main idea is that there are three cases to consider in a function binding:

  a) 'f' has a separate type signature
In this case, we know f's type everywhere

  b) The binding is recursive, and there is no type sig
In this case we must give f a monotype in its RHS

  c) The binding is non-recursive, and there is no type sig
Then we do not need to add 'f' to the envt, and can
simply infer a type for the RHS, which may be higher
ranked.

21 years ago[project @ 2003-02-24 13:12:08 by simonmar]
simonmar [Mon, 24 Feb 2003 13:12:08 +0000 (13:12 +0000)]
[project @ 2003-02-24 13:12:08 by simonmar]
Remove mention of man pages, which we don't have, and clarify a couple
of other things while I'm here.

21 years ago[project @ 2003-02-24 12:44:38 by simonpj]
simonpj [Mon, 24 Feb 2003 12:44:38 +0000 (12:44 +0000)]
[project @ 2003-02-24 12:44:38 by simonpj]
*** My last commit had a bogus commit message **
*** This is the right one.  I've appended the **
*** list of files changed as well.

-------------------------------------
   Fix up HOST/TARGET_OS ifdefs
-------------------------------------

Sigbjorn and Simon helped me to understand when it's appropriate to
say 'ifdef mingw32_HOST_OS' and when 'ifdef mingw32_TARGET_OS'.  I've
documented this in the building guide.

I've fixed up the ifdefs I erroneously changed last week, in this
commit.  I'm not certain about all of them.  For examples, in
DriverPhases there's an ifdef that deals with filename suffices.
Should this be the filename suffices for the system on which GHC runs
(HOST), or the system on which the compiled code will run (TARGET)?
Currently it's the latter.

Similarly, there's some path mangling ('/' vs '\') in DriverState:
should this be for the system on which GHC runs (HOST) or the system
on which the compiled code will run (TARGET)?  Currently the former.

I think some of the darwin_TARGET_OS should be darwin_HOST_OS's.

Finally, for the GHCi stuff we require that HOST_OS = TARGET_OS.  Rather than
make an arbitrary choice in (e.g.) Linker.lhs, it's be better to say
'#ifdef mingw32_OS', and arrange that this macro is set only in stage-2.
I have not done this.

I think these are 'right'.  But I'm not sure the filename mangling is
consistent throughout.

[Changes in the original commit, which had a bogus message.]

  Revision  Changes    Path
  1.46      +30 -0     fptools/docs/building/building.sgml
  1.148     +4 -4      fptools/ghc/compiler/ghci/InteractiveUI.hs
  1.114     +2 -2      fptools/ghc/compiler/main/DriverFlags.hs
  1.23      +3 -1      fptools/ghc/compiler/main/DriverPhases.hs
  1.85      +11 -11    fptools/ghc/compiler/main/SysTools.lhs
  1.20      +3 -3      fptools/ghc/compiler/utils/Panic.lhs

21 years ago[project @ 2003-02-24 12:39:24 by simonpj]
simonpj [Mon, 24 Feb 2003 12:39:27 +0000 (12:39 +0000)]
[project @ 2003-02-24 12:39:24 by simonpj]
Three Template Haskell improvements

a) Add type synonyms to THSyntax (and DsMeta, Convert)

b) Make Q into a newtype instead of a type synonym

c) Eliminate tiresome and error prone argument to DsMeta.wrapGenSyms
   and similarly addTyVarBinds

21 years ago[project @ 2003-02-22 06:13:41 by sof]
sof [Sat, 22 Feb 2003 06:13:41 +0000 (06:13 +0000)]
[project @ 2003-02-22 06:13:41 by sof]
bring getourtimeofday() proto into scope

21 years ago[project @ 2003-02-22 04:51:50 by sof]
sof [Sat, 22 Feb 2003 04:51:58 +0000 (04:51 +0000)]
[project @ 2003-02-22 04:51:50 by sof]
Clean up code&interfaces that deals with timers and asynchrony:

- Timer.{c,h} now defines the platform-independent interface
  to the timing services needed by the RTS. Itimer.{c,h} +
  win32/Ticker.{c,h} defines the OS-specific services that
  creates/destroys a timer.
- For win32 plats, drop the long-standing use of the 'multimedia'
  API timers and implement the ticking service ourselves. Simpler
  and more flexible.
- Select.c is now solely for platforms that use select() to handle
  non-blocking I/O & thread delays. win32/AwaitEvent.c provides
  the same API on the Win32 side.
- support threadDelay on win32 platforms via worker threads.

Not yet compiled up on non-win32 platforms; will do once checked in.

21 years ago[project @ 2003-02-21 14:52:54 by simonpj]
simonpj [Fri, 21 Feb 2003 14:52:55 +0000 (14:52 +0000)]
[project @ 2003-02-21 14:52:54 by simonpj]
Typos

21 years ago[project @ 2003-02-21 14:52:31 by simonpj]
simonpj [Fri, 21 Feb 2003 14:52:31 +0000 (14:52 +0000)]
[project @ 2003-02-21 14:52:31 by simonpj]
Fix buglets in new unused-binding story

21 years ago[project @ 2003-02-21 13:35:18 by simonpj]
simonpj [Fri, 21 Feb 2003 13:35:18 +0000 (13:35 +0000)]
[project @ 2003-02-21 13:35:18 by simonpj]
Use old-style foreign import for bkwd compatibility

21 years ago[project @ 2003-02-21 13:27:53 by simonpj]
simonpj [Fri, 21 Feb 2003 13:28:01 +0000 (13:28 +0000)]
[project @ 2003-02-21 13:27:53 by simonpj]
-------------------------------------
Improve the "unused binding" warnings
-------------------------------------

We've had a succession of hacks for reporting warnings for
unused bindings.  Consider

module M( f ) where

  f x = x

g x = g x + h x
h x = x

Here, g mentions itself and h, but is not itself mentioned. So
really both g and h are dead code.  We've been getting this wrong
for ages, and every hack so far has failed on some simple programs.

This commit does a much better job.  The renamer applied to a bunch
of bindings returns a NameSet.DefUses, which is a dependency-ordered
lists of def/use pairs.  It's documented in NameSet.
Given this, we can work out precisely what is not used, in a nice
tidy way.

It's less convenient in the case of type and class declarations, because
the strongly-connected-component analysis can span module boundaries.
So things are pretty much as they were for these.

As usual, there was a lot of chuffing around tidying things up.
I havn't tested it at all thoroughly yet.

Various unrelated import-decl-pruning has been done too.

21 years ago[project @ 2003-02-21 13:27:30 by simonpj]
simonpj [Fri, 21 Feb 2003 13:27:31 +0000 (13:27 +0000)]
[project @ 2003-02-21 13:27:30 by simonpj]
Import pruning

21 years ago[project @ 2003-02-21 13:26:58 by simonpj]
simonpj [Fri, 21 Feb 2003 13:27:01 +0000 (13:27 +0000)]
[project @ 2003-02-21 13:26:58 by simonpj]
Import pruning, use mingw32_TARGET not HOST, use old-style foreign import (for 4.08 compat)

21 years ago[project @ 2003-02-21 13:25:17 by simonpj]
simonpj [Fri, 21 Feb 2003 13:25:56 +0000 (13:25 +0000)]
[project @ 2003-02-21 13:25:17 by simonpj]
Import pruning

21 years ago[project @ 2003-02-21 13:24:06 by simonpj]
simonpj [Fri, 21 Feb 2003 13:24:06 +0000 (13:24 +0000)]
[project @ 2003-02-21 13:24:06 by simonpj]
More tidy up

21 years ago[project @ 2003-02-21 13:02:58 by simonpj]
simonpj [Fri, 21 Feb 2003 13:02:58 +0000 (13:02 +0000)]
[project @ 2003-02-21 13:02:58 by simonpj]
Small fix to a TH bug; this one concerning the constraint-gathering mechanism

21 years ago[project @ 2003-02-21 12:28:35 by simonpj]
simonpj [Fri, 21 Feb 2003 12:28:35 +0000 (12:28 +0000)]
[project @ 2003-02-21 12:28:35 by simonpj]
Another typo; sigh

21 years ago[project @ 2003-02-21 12:26:41 by simonpj]
simonpj [Fri, 21 Feb 2003 12:26:41 +0000 (12:26 +0000)]
[project @ 2003-02-21 12:26:41 by simonpj]
Typo

21 years ago[project @ 2003-02-21 12:16:44 by simonpj]
simonpj [Fri, 21 Feb 2003 12:16:45 +0000 (12:16 +0000)]
[project @ 2003-02-21 12:16:44 by simonpj]
Debugging hook jiggling

21 years ago[project @ 2003-02-21 12:16:05 by simonpj]
simonpj [Fri, 21 Feb 2003 12:16:05 +0000 (12:16 +0000)]
[project @ 2003-02-21 12:16:05 by simonpj]
Fix a type-error in desugaring TH code

21 years ago[project @ 2003-02-21 05:34:12 by sof]
sof [Fri, 21 Feb 2003 05:34:17 +0000 (05:34 +0000)]
[project @ 2003-02-21 05:34:12 by sof]
Asynchronous / non-blocking I/O for Win32 platforms.

This commit introduces a Concurrent Haskell friendly view of I/O on
Win32 platforms. Through the use of a pool of worker Win32 threads, CH
threads may issue asynchronous I/O requests without blocking the
progress of other CH threads. The issuing CH thread is blocked until
the request has been serviced though.

GHC.Conc exports the primops that take care of issuing the
asynchronous I/O requests, which the IO implementation now takes
advantage of. By default, all Handles are non-blocking/asynchronous,
but should performance become an issue, having a per-Handle flag for
turning off non-blocking could easily be imagined&introduced.

[Incidentally, this thread pool-based implementation could easily be
extended to also allow Haskell code to delegate the execution of
arbitrary pieces of (potentially blocking) external code to another OS
thread. Given how relatively gnarly the locking story has turned out
to be with the 'threaded' RTS, that may not be such a bad idea.]

21 years ago[project @ 2003-02-21 04:57:16 by sof]
sof [Fri, 21 Feb 2003 04:57:16 +0000 (04:57 +0000)]
[project @ 2003-02-21 04:57:16 by sof]
deja vu all over again

21 years ago[project @ 2003-02-20 18:53:15 by panne]
panne [Thu, 20 Feb 2003 18:53:15 +0000 (18:53 +0000)]
[project @ 2003-02-20 18:53:15 by panne]
* Nuked unused --with-glut-api and --with-glut-xlib arguments
* Only check for OpenGL headers and libs when --enable-hopengl is given

21 years ago[project @ 2003-02-20 18:34:11 by simonpj]
simonpj [Thu, 20 Feb 2003 18:34:11 +0000 (18:34 +0000)]
[project @ 2003-02-20 18:34:11 by simonpj]
typo

21 years ago[project @ 2003-02-20 18:33:50 by simonpj]
simonpj [Thu, 20 Feb 2003 18:33:55 +0000 (18:33 +0000)]
[project @ 2003-02-20 18:33:50 by simonpj]
-------------------------------------
      Add Core Notes and the {-# CORE #-} pragma
-------------------------------------

This is an idea of Hal Daume's. The key point is that Notes in Core
are augmented thus:

  data Note
    = SCC CostCentre
    | ...
    | CoreNote String     -- NEW

These notes can be injected via a Haskell-source pragma:

   f x = ({-# CORE "foo" #-} show) ({-# CORE "bar" #-} x)

This wraps a (Note (CoreNote "foo")) around the 'show' variable,
and a similar note around the argument to 'show'.

These notes are basically ignored by GHC, but are emitted into
External Core, where they may convey useful information.

Exactly how code involving these notes is munged by the simplifier
isn't very well defined.  We'll see how it pans out.  Meanwhile
the impact on the rest of the compiler is minimal.

21 years ago[project @ 2003-02-20 18:27:13 by simonpj]
simonpj [Thu, 20 Feb 2003 18:27:16 +0000 (18:27 +0000)]
[project @ 2003-02-20 18:27:13 by simonpj]
Document {-# CORE #-} pragma (thanks to Hal Daume)

21 years ago[project @ 2003-02-20 18:18:55 by simonpj]
simonpj [Thu, 20 Feb 2003 18:19:25 +0000 (18:19 +0000)]
[project @ 2003-02-20 18:18:55 by simonpj]
Import pruning

21 years ago[project @ 2003-02-20 16:02:57 by simonpj]
simonpj [Thu, 20 Feb 2003 16:02:57 +0000 (16:02 +0000)]
[project @ 2003-02-20 16:02:57 by simonpj]
Add comments

21 years ago[project @ 2003-02-20 16:01:56 by simonpj]
simonpj [Thu, 20 Feb 2003 16:01:56 +0000 (16:01 +0000)]
[project @ 2003-02-20 16:01:56 by simonpj]
Comments and imports only

21 years ago[project @ 2003-02-20 15:39:59 by simonmar]
simonmar [Thu, 20 Feb 2003 15:39:59 +0000 (15:39 +0000)]
[project @ 2003-02-20 15:39:59 by simonmar]
closureSatisfiesConstraints: check whether the retainer set is valid
before attempting to match it against a constraint.  It might not be
valid if the object is an ex-weak-pointer which was finalized after
the last GC.

MERGE TO STABLE

21 years ago[project @ 2003-02-20 13:23:47 by simonpj]
simonpj [Thu, 20 Feb 2003 13:23:49 +0000 (13:23 +0000)]
[project @ 2003-02-20 13:23:47 by simonpj]
-------------------------------------
   Complete an earlier TH commit
-------------------------------------

In this earlier commit:

  3.  Ensure that a declaration quotation [d| ... |] does not have a
      permanent effect on the instance environment. (A TH fix.)

I had forgotten to do a stage2 compile.  This commit just completes
the earlier work.  I moved some code from TcExpr (long) to TcSplice
(shorter) which had the happy effect of bringing related code together.

21 years ago[project @ 2003-02-20 13:21:15 by simonpj]
simonpj [Thu, 20 Feb 2003 13:21:15 +0000 (13:21 +0000)]
[project @ 2003-02-20 13:21:15 by simonpj]
-------------------------------------
   Generate correct dependencies when reading External Core
-------------------------------------

We have to be more careful than I realised when doing strongly-connected
component analysis of type/class decls when reading External Core.

Here's the relevant new comment:

-- Building edges for SCC analysis
--
-- When building the edges, we treat the 'main name' of the declaration as the
-- key for the node, but when dealing with External Core we may come across
-- references to one of the implicit names for the declaration.  For example:
-- class Eq a where ....
-- data :TSig a = :TSig (:TEq a) ....
-- The first decl is sucked in from an interface file; the second
-- is in an External Core file, generated from a class decl for Sig.
-- We have to recognise that the reference to :TEq represents a
-- dependency on the class Eq declaration, else the SCC stuff won't work right.
--
-- This complication can only happen when consuming an External Core file
--
-- Solution: keep an "EdgeMap" (bad name) that maps :TEq -> Eq.
-- Don't worry about data constructors, because we're only building
-- SCCs for type and class declarations here.  So the tiresome mapping
-- is need only to map   [class tycon -> class]

21 years ago[project @ 2003-02-20 13:18:10 by simonpj]
simonpj [Thu, 20 Feb 2003 13:18:10 +0000 (13:18 +0000)]
[project @ 2003-02-20 13:18:10 by simonpj]
Part 2 of fix :i in InteractiveUI

21 years ago[project @ 2003-02-20 13:17:02 by simonpj]
simonpj [Thu, 20 Feb 2003 13:17:02 +0000 (13:17 +0000)]
[project @ 2003-02-20 13:17:02 by simonpj]
Comments only

21 years ago[project @ 2003-02-20 13:16:31 by simonpj]
simonpj [Thu, 20 Feb 2003 13:16:31 +0000 (13:16 +0000)]
[project @ 2003-02-20 13:16:31 by simonpj]
Another datacon-naming wibble

21 years ago[project @ 2003-02-20 13:12:40 by simonpj]
simonpj [Thu, 20 Feb 2003 13:12:40 +0000 (13:12 +0000)]
[project @ 2003-02-20 13:12:40 by simonpj]
Fix :i in InteractiveUI

21 years ago[project @ 2003-02-20 13:01:20 by simonpj]
simonpj [Thu, 20 Feb 2003 13:01:21 +0000 (13:01 +0000)]
[project @ 2003-02-20 13:01:20 by simonpj]
Eliminate brain-dead outputC pattern-match failure

21 years ago[project @ 2003-02-20 13:00:24 by simonpj]
simonpj [Thu, 20 Feb 2003 13:00:25 +0000 (13:00 +0000)]
[project @ 2003-02-20 13:00:24 by simonpj]
Eliminate bogus string-literal duplication

21 years ago[project @ 2003-02-20 12:59:55 by simonpj]
simonpj [Thu, 20 Feb 2003 12:59:55 +0000 (12:59 +0000)]
[project @ 2003-02-20 12:59:55 by simonpj]
Compile binary stuff with -O always

21 years ago[project @ 2003-02-20 11:45:24 by simonmar]
simonmar [Thu, 20 Feb 2003 11:45:24 +0000 (11:45 +0000)]
[project @ 2003-02-20 11:45:24 by simonmar]
Add -fvia-C to utils/Panic_HC_OPTS, and remove it from main/Main_HC_OPTS.

21 years ago[project @ 2003-02-19 16:38:35 by sof]
sof [Wed, 19 Feb 2003 16:38:35 +0000 (16:38 +0000)]
[project @ 2003-02-19 16:38:35 by sof]
odir-ify prelude/PrimOp.o dependency

21 years ago[project @ 2003-02-19 16:30:17 by simonpj]
simonpj [Wed, 19 Feb 2003 16:30:17 +0000 (16:30 +0000)]
[project @ 2003-02-19 16:30:17 by simonpj]
Document phase control

21 years ago[project @ 2003-02-19 15:54:05 by simonpj]
simonpj [Wed, 19 Feb 2003 15:54:12 +0000 (15:54 +0000)]
[project @ 2003-02-19 15:54:05 by simonpj]
-------------------------------------
  Two minor wibbles
-------------------------------------

1.  Make the generic toT/fromT Ids for "generic derived classes" into
    proper ImplicitIds, with their own GlobalIdDetails. This makes it
    easier to identify them.  (The lack of this showed up as a bug
    when I made an apparently-innocuous other change.)

2.  Distinguish ClassOpIds from RecordSelIds in their GlobalIdDetails.
    They are treated differently here and there, so I made this change
    as part of (1)

3.  Ensure that a declaration quotation [d| ... |] does not have a
    permanent effect on the instance environment. (A TH fix.)

21 years ago[project @ 2003-02-19 13:05:45 by simonpj]
simonpj [Wed, 19 Feb 2003 13:05:47 +0000 (13:05 +0000)]
[project @ 2003-02-19 13:05:45 by simonpj]
Wibbles to the new datacon story; fixes ds002

21 years ago[project @ 2003-02-19 11:52:42 by simonmar]
simonmar [Wed, 19 Feb 2003 11:52:42 +0000 (11:52 +0000)]
[project @ 2003-02-19 11:52:42 by simonmar]
Add note to description of -no-hs-main: it forces linking in --make
mode too.

21 years ago[project @ 2003-02-19 11:51:35 by simonmar]
simonmar [Wed, 19 Feb 2003 11:51:35 +0000 (11:51 +0000)]
[project @ 2003-02-19 11:51:35 by simonmar]
If -no-hs-main is specified in --make mode, attempt linking even when
there's no Main module.

Fixes bug #686620

MERGE TO STABLE

21 years ago[project @ 2003-02-18 16:23:35 by igloo]
igloo [Tue, 18 Feb 2003 16:23:36 +0000 (16:23 +0000)]
[project @ 2003-02-18 16:23:35 by igloo]
Support strictness annotations on data declarations and support the record
and infix constructors. Also tweaked the pretty printer a bit.

21 years ago[project @ 2003-02-18 15:54:42 by simonpj]
simonpj [Tue, 18 Feb 2003 15:54:42 +0000 (15:54 +0000)]
[project @ 2003-02-18 15:54:42 by simonpj]
Remove un-necessary case

21 years ago[project @ 2003-02-18 15:54:19 by simonpj]
simonpj [Tue, 18 Feb 2003 15:54:20 +0000 (15:54 +0000)]
[project @ 2003-02-18 15:54:19 by simonpj]
-------------------------------------
  Two minor wibbles
-------------------------------------

[These two unrelated fixes just got tangled together in my tree.]

1.  Fix a crash when a class op is used as a record selector

2.  Fix a wibble related to the new DataCon naming story.
    In tcId, treat the DataCon case entirely separately, because
    its "stupid context" doesn't show up in its type.

    On the way, remove the DataCon cases in tcLookupId and tcLookupGlobalId
    The should not be necessary.  He says hopefully.

21 years ago[project @ 2003-02-18 15:54:02 by simonpj]
simonpj [Tue, 18 Feb 2003 15:54:02 +0000 (15:54 +0000)]
[project @ 2003-02-18 15:54:02 by simonpj]
Cosmetic wibble

21 years ago[project @ 2003-02-18 15:42:59 by simonpj]
simonpj [Tue, 18 Feb 2003 15:42:59 +0000 (15:42 +0000)]
[project @ 2003-02-18 15:42:59 by simonpj]
Comments only

21 years ago[project @ 2003-02-18 09:57:19 by simonmar]
simonmar [Tue, 18 Feb 2003 09:57:19 +0000 (09:57 +0000)]
[project @ 2003-02-18 09:57:19 by simonmar]
Fix build on GHC < 5.00

21 years ago[project @ 2003-02-18 05:47:53 by sof]
sof [Tue, 18 Feb 2003 05:47:53 +0000 (05:47 +0000)]
[project @ 2003-02-18 05:47:53 by sof]
make use of MBLOCK_ROUND_DOWN()

21 years ago[project @ 2003-02-18 05:40:20 by sof]
sof [Tue, 18 Feb 2003 05:40:20 +0000 (05:40 +0000)]
[project @ 2003-02-18 05:40:20 by sof]
arenaAlloc(): tidy up alignment calc

21 years ago[project @ 2003-02-17 15:14:25 by simonpj]
simonpj [Mon, 17 Feb 2003 15:14:25 +0000 (15:14 +0000)]
[project @ 2003-02-17 15:14:25 by simonpj]
More notes about building on Win32

21 years ago[project @ 2003-02-17 15:11:47 by simonpj]
simonpj [Mon, 17 Feb 2003 15:11:47 +0000 (15:11 +0000)]
[project @ 2003-02-17 15:11:47 by simonpj]
Use hasktags by default

21 years ago[project @ 2003-02-17 12:24:26 by simonmar]
simonmar [Mon, 17 Feb 2003 12:24:28 +0000 (12:24 +0000)]
[project @ 2003-02-17 12:24:26 by simonmar]
Restore interrupt/quit signal handlers after every evaluation in GHCi,
just in case the program set its own.

21 years ago[project @ 2003-02-17 11:42:15 by simonmar]
simonmar [Mon, 17 Feb 2003 11:42:15 +0000 (11:42 +0000)]
[project @ 2003-02-17 11:42:15 by simonmar]
Comment change only