ghc-hetmet.git
22 years ago[project @ 2002-01-23 17:51:46 by lewie]
lewie [Wed, 23 Jan 2002 17:51:46 +0000 (17:51 +0000)]
[project @ 2002-01-23 17:51:46 by lewie]
Add special case for installing shared libs (which need the execute bit set).

22 years ago[project @ 2002-01-23 16:50:46 by simonmar]
simonmar [Wed, 23 Jan 2002 16:50:52 +0000 (16:50 +0000)]
[project @ 2002-01-23 16:50:46 by simonmar]
- Implement an alternative :module syntax so we can play around with it.

- Implement ':show bindings' and ':show modules'

- Fix a bug whereby doing :info on a local binding would cause a panic
  (this needs to be merged to STABLE - the change is part of the patch
  to HscMain).

- Some cleanups in InteractiveUI.hs

22 years ago[project @ 2002-01-23 11:29:12 by sewardj]
sewardj [Wed, 23 Jan 2002 11:29:12 +0000 (11:29 +0000)]
[project @ 2002-01-23 11:29:12 by sewardj]
Fix two problems with the ELF linker:

1.  Determine section attributes by examining various bits in the
    section header tables, rather than from the section names.  This
    makes it robust against future changes / additions to the set of
    section names.

2.  Handle local symbols differently.  Do not add them to our own
    local symbol table for this object, since that's

    (a) wrong -- multiple local symbols can have the same name so long
        as each is in a different section, so if we just dump them into
        the local symbol table we'll wind up with apparently duplicate
        symbols

    (b) totally unnecessary, since the relocations against local symbols
        simply specify an index into the ELF symbol table for the object,
        from whence the address can be calculated without reference to the
        name.

TODO: Test on sparc-solaris
      Investigate whether PEi386 linker needs fixing similarly
and then
MERGE TO STABLE

22 years ago[project @ 2002-01-23 11:11:13 by simonmar]
simonmar [Wed, 23 Jan 2002 11:11:13 +0000 (11:11 +0000)]
[project @ 2002-01-23 11:11:13 by simonmar]
Revert to running command-line statements in the context of the
current thread, so that ^C exceptions get delivered to the right
place.

Now that a deadlock generates an exception this is not so bad, but it
would be nice to do it the "right" way so I've left the old code in a
comment for now.

22 years ago[project @ 2002-01-22 16:58:37 by simonmar]
simonmar [Tue, 22 Jan 2002 16:58:37 +0000 (16:58 +0000)]
[project @ 2002-01-22 16:58:37 by simonmar]
More wibbles, sigh.  Must have been typing with my elbows when I made
that change.

22 years ago[project @ 2002-01-22 16:50:29 by simonmar]
simonmar [Tue, 22 Jan 2002 16:50:29 +0000 (16:50 +0000)]
[project @ 2002-01-22 16:50:29 by simonmar]
CmRunDeadlocked no longer exists

22 years ago[project @ 2002-01-22 15:55:59 by simonmar]
simonmar [Tue, 22 Jan 2002 15:55:59 +0000 (15:55 +0000)]
[project @ 2002-01-22 15:55:59 by simonmar]
Fix wibbles in previous commit.

22 years ago[project @ 2002-01-22 14:47:52 by simonmar]
simonmar [Tue, 22 Jan 2002 14:47:52 +0000 (14:47 +0000)]
[project @ 2002-01-22 14:47:52 by simonmar]
Strip whitespace from the beginning of the line when looking for
OPTIONS pragmas.

22 years ago[project @ 2002-01-22 13:54:22 by simonmar]
simonmar [Tue, 22 Jan 2002 13:54:23 +0000 (13:54 +0000)]
[project @ 2002-01-22 13:54:22 by simonmar]
Deadlock is now an exception instead of a return status from
rts_evalIO().

The current behaviour is as follows, and can be changed if necessary:
in the event of a deadlock, the top main thread is taken from the main
thread queue, and if it is blocked on an MVar or an Exception (for
throwTo), then it receives a Deadlock exception.  If it is blocked on
a BLACKHOLE, we instead send it the NonTermination exception.  Note
that only the main thread gets the exception: it is the responsibility
of the main thread to unblock other threads if necessary.

There's a slight difference in the SMP build: *all* the main threads
get an exception, because clearly none of them may make progress
(compared to the non-SMP situation, where all but the top main thread
are usually blocked).

22 years ago[project @ 2002-01-22 13:35:36 by simonmar]
simonmar [Tue, 22 Jan 2002 13:35:37 +0000 (13:35 +0000)]
[project @ 2002-01-22 13:35:36 by simonmar]
Attempt to fix the problems with missing instances once more.

The current problem is that in the case where a ModDetails is being
constructed from its interface (in compilation manager modes) we
weren't getting any instances because the instances are gotten from
the [InstInfo] returned from tcInstDecls1, which only contains
*source* instance declarations.  Fix: return a list of DFuns defined
in the current module from tcInstDecls1, to be plugged into the
ModDetails later.

Also: revert the previous change to the isLocalThing predicate,
because now we really want to know which dfuns come from the current
module.  The comment about the iface_dfuns containing only package and
local instances is incorrect in batch-compile mode, because we also
demand-load stuff from home package interfaces, so I deleted this
comment and fixed up some of the other commentary.

22 years ago[project @ 2002-01-22 13:09:36 by simonmar]
simonmar [Tue, 22 Jan 2002 13:09:37 +0000 (13:09 +0000)]
[project @ 2002-01-22 13:09:36 by simonmar]
Fix for a change in CPP's behaviour in gcc 2.96 relative to 2.95.
Unlit used to inject '# <line> <file>' at the beginning of the output
file, but in gcc 2.96 this is ignored.  Instead we have to inject
'#line <line> <file>', which in turn means that GHC's lexer has to
understand this kind of pragma in addition to the plain '#' form, in
the case when we aren't running CPP after unlitting.

22 years ago[project @ 2002-01-22 13:04:13 by simonmar]
simonmar [Tue, 22 Jan 2002 13:04:13 +0000 (13:04 +0000)]
[project @ 2002-01-22 13:04:13 by simonmar]
Import wibbles

22 years ago[project @ 2002-01-21 19:56:20 by sof]
sof [Mon, 21 Jan 2002 19:56:20 +0000 (19:56 +0000)]
[project @ 2002-01-21 19:56:20 by sof]
assume bash (and not ash) is used with mingw

22 years ago[project @ 2002-01-21 17:18:43 by sof]
sof [Mon, 21 Jan 2002 17:18:43 +0000 (17:18 +0000)]
[project @ 2002-01-21 17:18:43 by sof]
multi-slurp protect

22 years ago[project @ 2002-01-18 07:02:59 by sof]
sof [Fri, 18 Jan 2002 07:02:59 +0000 (07:02 +0000)]
[project @ 2002-01-18 07:02:59 by sof]
tcInstDecls1: partition up interface instances using isHomePackageThing rather than isLocalThing

22 years ago[project @ 2002-01-18 06:44:33 by sof]
sof [Fri, 18 Jan 2002 06:44:33 +0000 (06:44 +0000)]
[project @ 2002-01-18 06:44:33 by sof]
added isHomePackageThing :: NamedThing a => a -> Bool

22 years ago[project @ 2002-01-17 09:52:18 by sof]
sof [Thu, 17 Jan 2002 09:52:19 +0000 (09:52 +0000)]
[project @ 2002-01-17 09:52:18 by sof]
For AR and LD, transform "/cygdrive/<drive>/..." paths to "<drive>:\..." --
enables the use of mingw-based GNU Make.

22 years ago[project @ 2002-01-17 09:15:16 by sof]
sof [Thu, 17 Jan 2002 09:15:16 +0000 (09:15 +0000)]
[project @ 2002-01-17 09:15:16 by sof]
bash behaviour re: quoting and backslashes has changed (win32), cope.

22 years ago[project @ 2002-01-17 08:37:57 by sof]
sof [Thu, 17 Jan 2002 08:38:00 +0000 (08:38 +0000)]
[project @ 2002-01-17 08:37:57 by sof]
- removed KludgedSystem; no longer needed.
- be path separator savvy.

22 years ago[project @ 2002-01-16 23:34:31 by chak]
chak [Wed, 16 Jan 2002 23:34:31 +0000 (23:34 +0000)]
[project @ 2002-01-16 23:34:31 by chak]
Added an intro to the workings of the desugarer and details about the pattern
matching compiler.

22 years ago[project @ 2002-01-15 05:39:14 by sof]
sof [Tue, 15 Jan 2002 05:39:15 +0000 (05:39 +0000)]
[project @ 2002-01-15 05:39:14 by sof]
updates & fixes to hc-bootstrapping story; from Thomas Nordin

22 years ago[project @ 2002-01-11 15:32:05 by sof]
sof [Fri, 11 Jan 2002 15:32:05 +0000 (15:32 +0000)]
[project @ 2002-01-11 15:32:05 by sof]
add HSstd{1,2}.o to INSTALL_LIBS (mingw only)

22 years ago[project @ 2002-01-10 10:46:12 by sof]
sof [Thu, 10 Jan 2002 10:46:12 +0000 (10:46 +0000)]
[project @ 2002-01-10 10:46:12 by sof]
Better off if GhcBinDistShScripts is just empty on mingw plats

22 years ago[project @ 2002-01-10 10:33:48 by sof]
sof [Thu, 10 Jan 2002 10:33:48 +0000 (10:33 +0000)]
[project @ 2002-01-10 10:33:48 by sof]
mingw only: associate FPish icon (nicked from Hugs) with
the GHCi wrapper app.

22 years ago[project @ 2002-01-10 10:29:09 by sof]
sof [Thu, 10 Jan 2002 10:29:09 +0000 (10:29 +0000)]
[project @ 2002-01-10 10:29:09 by sof]
'std' now also needs user32 (under win32)

22 years ago[project @ 2002-01-09 12:41:45 by simonmar]
simonmar [Wed, 9 Jan 2002 12:41:47 +0000 (12:41 +0000)]
[project @ 2002-01-09 12:41:45 by simonmar]
First cut at enhancing the facilities for manipulating the scope in
GHCi.  The scope now consists of

  1. the full top-level scope of zero or more interpreted modules
  2. the exports from zero or more modules
  3. the temporary bindings

The sets 1 & 2 are manipulated using an extended :m command: eg :m +A
will add module A to either set 1 or two depending on whether A is
interpreted, and :m -A will remove it.  The user interface may change,
pending feedback from the punters on the mailing list.

'Prelude' is automatically added to the scope if set 1 is empty and
set 2 doesn't already contain it.

We now cache the GlobalRdrEnv for the current scope between
evaluations in the InteractiveContext, and also the current
PrintUnqualified setting (which also depends on the scope).

Cvs: ----------------------------------------------------------------------

22 years ago[project @ 2002-01-09 10:29:32 by simonmar]
simonmar [Wed, 9 Jan 2002 10:29:32 +0000 (10:29 +0000)]
[project @ 2002-01-09 10:29:32 by simonmar]
Back out previous fix, I've hacked it in a different place which is at
least closer to the source of the problem.

22 years ago[project @ 2002-01-09 10:27:41 by simonmar]
simonmar [Wed, 9 Jan 2002 10:27:41 +0000 (10:27 +0000)]
[project @ 2002-01-09 10:27:41 by simonmar]
Don't add -package-name if $(PACKAGE) == "rts".  THis is a HACK and we
need to fix the mess in ghc/rts/Makefile properly.

22 years ago[project @ 2002-01-08 17:31:30 by simonmar]
simonmar [Tue, 8 Jan 2002 17:31:30 +0000 (17:31 +0000)]
[project @ 2002-01-08 17:31:30 by simonmar]
Fix a problem which lead to home-package instances ending up in the
package instance table in GHCi, which results in strange duplicate
instance errors when reloading modules.  See the comments for details.

22 years ago[project @ 2002-01-08 16:38:27 by sof]
sof [Tue, 8 Jan 2002 16:38:27 +0000 (16:38 +0000)]
[project @ 2002-01-08 16:38:27 by sof]
Make better use of the -M<size> setting under Win32. Use it to guide
the amount of VM to reserve -- the default is (still) 256M, but the
user will now have a way of overriding this setting.

22 years ago[project @ 2002-01-08 15:56:03 by sof]
sof [Tue, 8 Jan 2002 15:56:03 +0000 (15:56 +0000)]
[project @ 2002-01-08 15:56:03 by sof]
Track PrimOp changes.

22 years ago[project @ 2002-01-08 14:55:50 by sof]
sof [Tue, 8 Jan 2002 14:55:50 +0000 (14:55 +0000)]
[project @ 2002-01-08 14:55:50 by sof]
make -split-objs work again

22 years ago[project @ 2002-01-08 14:11:28 by sof]
sof [Tue, 8 Jan 2002 14:11:28 +0000 (14:11 +0000)]
[project @ 2002-01-08 14:11:28 by sof]
adjust pointer to the RTS profiling options section

22 years ago[project @ 2002-01-08 13:52:34 by sof]
sof [Tue, 8 Jan 2002 13:52:34 +0000 (13:52 +0000)]
[project @ 2002-01-08 13:52:34 by sof]
IS setup: remove HDirect com lib reference; no longer bundled

22 years ago[project @ 2002-01-08 10:59:42 by sewardj]
sewardj [Tue, 8 Jan 2002 10:59:42 +0000 (10:59 +0000)]
[project @ 2002-01-08 10:59:42 by sewardj]
merge from stable branch:
  1.46.4.3  +14 -7     fptools/ghc/compiler/nativeGen/AsmCodeGen.lhs
  1.47.4.3  +2 -0      fptools/ghc/compiler/nativeGen/MachMisc.lhs

  Treat literal appearances of BaseReg in Stix trees uniformly.
  This is now taken to mean the &MainCapability.r, regardless of
  whether BaseReg is in a register (x86) or synthesised (sparc).

22 years ago[project @ 2002-01-08 10:42:56 by sewardj]
sewardj [Tue, 8 Jan 2002 10:42:56 +0000 (10:42 +0000)]
[project @ 2002-01-08 10:42:56 by sewardj]
merge from stable branch, rev 1.34.4.1:

   Add missing case to magicIdPrimRep.

22 years ago[project @ 2002-01-08 10:36:24 by sewardj]
sewardj [Tue, 8 Jan 2002 10:36:24 +0000 (10:36 +0000)]
[project @ 2002-01-08 10:36:24 by sewardj]
merge from the stable branch:

  1.70.4.2  fptools/ghc/compiler/nativeGen/StixPrim.lhs
  1.5.10.3  fptools/ghc/includes/mkNativeHdr.c

  Track recent changes to HpLim assignment in load_thread_state.

22 years ago[project @ 2002-01-08 07:29:07 by chak]
chak [Tue, 8 Jan 2002 07:29:07 +0000 (07:29 +0000)]
[project @ 2002-01-08 07:29:07 by chak]
Some docu covering VarSet, NameSet, VarEnv, and NameEnv.

22 years ago[project @ 2002-01-07 22:39:20 by ken]
ken [Mon, 7 Jan 2002 22:39:20 +0000 (22:39 +0000)]
[project @ 2002-01-07 22:39:20 by ken]
Ignore -package-name <package-name> on the command line.
MERGE TO STABLE

22 years ago[project @ 2002-01-07 22:35:55 by ken]
ken [Mon, 7 Jan 2002 22:35:55 +0000 (22:35 +0000)]
[project @ 2002-01-07 22:35:55 by ken]
On the alpha, __divq() in libc.a clobbers $s6, so StgRun() needs to save
$s6.  While we are at it, let us save $f8 and $f9 as well.
MERGE TO STABLE

22 years ago[project @ 2002-01-07 20:52:53 by sof]
sof [Mon, 7 Jan 2002 20:52:53 +0000 (20:52 +0000)]
[project @ 2002-01-07 20:52:53 by sof]
updated

22 years ago[project @ 2002-01-07 20:50:00 by sof]
sof [Mon, 7 Jan 2002 20:50:00 +0000 (20:50 +0000)]
[project @ 2002-01-07 20:50:00 by sof]
Convert PrelPosix from a .hsc file into a
.hs file (that gets its configuration-time info
via config.h).

22 years ago[project @ 2002-01-07 20:46:52 by sof]
sof [Mon, 7 Jan 2002 20:46:52 +0000 (20:46 +0000)]
[project @ 2002-01-07 20:46:52 by sof]
remove debugging bits

22 years ago[project @ 2002-01-07 20:24:22 by sof]
sof [Mon, 7 Jan 2002 20:24:23 +0000 (20:24 +0000)]
[project @ 2002-01-07 20:24:22 by sof]
added feature tests for a bunch of C types we need to know the Haskell equiv. of

22 years ago[project @ 2002-01-07 16:32:54 by sof]
sof [Mon, 7 Jan 2002 16:32:54 +0000 (16:32 +0000)]
[project @ 2002-01-07 16:32:54 by sof]
doc fix - correct example invoc. of 'rc'

22 years ago[project @ 2002-01-07 15:29:56 by sof]
sof [Mon, 7 Jan 2002 15:29:57 +0000 (15:29 +0000)]
[project @ 2002-01-07 15:29:56 by sof]
Ho-hum, readdir() and readdir_r() with GNU libc doesn't
flag the end of the directory stream the same way. Cope.

22 years ago[project @ 2002-01-07 12:26:49 by simonpj]
simonpj [Mon, 7 Jan 2002 12:26:49 +0000 (12:26 +0000)]
[project @ 2002-01-07 12:26:49 by simonpj]
Dont print (Prod [AAA]) same as (Poly Abs)

22 years ago[project @ 2002-01-07 12:25:09 by simonpj]
simonpj [Mon, 7 Jan 2002 12:25:09 +0000 (12:25 +0000)]
[project @ 2002-01-07 12:25:09 by simonpj]
comments only

22 years ago[project @ 2002-01-05 11:28:31 by sof]
sof [Sat, 5 Jan 2002 11:28:31 +0000 (11:28 +0000)]
[project @ 2002-01-05 11:28:31 by sof]
fix pathconf() usage

22 years ago[project @ 2002-01-04 23:21:18 by sof]
sof [Fri, 4 Jan 2002 23:21:18 +0000 (23:21 +0000)]
[project @ 2002-01-04 23:21:18 by sof]
prel_readdir: tidied

22 years ago[project @ 2002-01-04 16:02:03 by simonmar]
simonmar [Fri, 4 Jan 2002 16:02:05 +0000 (16:02 +0000)]
[project @ 2002-01-04 16:02:03 by simonmar]
Some driver cleanups; in particular -fno-code should work in a more
reasonable way (it is now a "mode flag" like -C, -c, --make etc.).

22 years ago[project @ 2002-01-04 11:39:00 by simonpj]
simonpj [Fri, 4 Jan 2002 11:39:01 +0000 (11:39 +0000)]
[project @ 2002-01-04 11:39:00 by simonpj]
-----------------------------
Fix a too-vigorous export bug
-----------------------------

MERGE TO STABLE

[this is the Ian Lynagh -O2 bug]

CoreTidy didn't filter the rules that it exports, so it
exported some that mentioned Ids on the *left* hand side
that are not exported.  So an importing module fell over.

The fix is simple: filter the exposed rules.   On the way
I tidied up CoreFVs a little.

22 years ago[project @ 2002-01-04 11:35:47 by simonpj]
simonpj [Fri, 4 Jan 2002 11:36:28 +0000 (11:36 +0000)]
[project @ 2002-01-04 11:35:47 by simonpj]
Comments only

22 years ago[project @ 2002-01-04 11:35:22 by simonpj]
simonpj [Fri, 4 Jan 2002 11:35:22 +0000 (11:35 +0000)]
[project @ 2002-01-04 11:35:22 by simonpj]
----------------------------------------
Be a bit less gung ho about let-floating
----------------------------------------

Sometimes it's a bad idea to float cheap expressions
outwards, even if they escape a value lambda.

  -- Even if it escapes a value lambda, we only
  -- float if it's not cheap (unless it'll get all the
  -- way to the top).  I've seen cases where we
  -- float dozens of tiny free expressions, which cost
  -- more to allocate than to evaluate.
  -- NB: exprIsCheap is also true of bottom expressions, which
  --     is good; we don't want to share them
  --
  -- It's only Really Bad to float a cheap expression out of a
  -- strict context, because that builds a thunk that otherwise
  -- would never be built.  So another alternative would be to
  -- add
  --  || (strict_ctxt && not (exprIsBottom expr))
  -- to the condition above. We should really try this out.

The relevant function is lvlMFE, which has been subject to a lot
of fiddling over the years.  Probably this isn't the last time.

This all actually showed up when I was compiling IA.lhs from Ian Lynagh.

22 years ago[project @ 2002-01-04 11:35:13 by simonmar]
simonmar [Fri, 4 Jan 2002 11:35:13 +0000 (11:35 +0000)]
[project @ 2002-01-04 11:35:13 by simonmar]
- rename CompManager.cmLoadModule to cmLoadModules and make it take
  a DynFlags argument to be consistent with the rest of the
  CompManager interface.

- split cmLoadModule into two parts: cmDepAnal which takes a list of
  filenames and returns a ModuleGraph, and cmLoadModules which takes
  the ModuleGraph and does the rest.  This lets the consumer know
  whether the dependency analysis step fails before unloading any
  existing modules - i.e. if you :reload and a module is missing, you
  don't lose the modules that are already loaded (bug reported by
  MIchael Weber some time ago).

22 years ago[project @ 2002-01-04 10:56:09 by sof]
sof [Fri, 4 Jan 2002 10:56:10 +0000 (10:56 +0000)]
[project @ 2002-01-04 10:56:09 by sof]
getDirectoryContents: use the re-entrant readdir_r() to get at directory
entries, if available.

22 years ago[project @ 2002-01-04 10:54:20 by sof]
sof [Fri, 4 Jan 2002 10:54:21 +0000 (10:54 +0000)]
[project @ 2002-01-04 10:54:20 by sof]
add feature test for readdir_r()

22 years ago[project @ 2002-01-04 10:44:16 by simonmar]
simonmar [Fri, 4 Jan 2002 10:44:16 +0000 (10:44 +0000)]
[project @ 2002-01-04 10:44:16 by simonmar]
update the rather dated usage message

22 years ago[project @ 2002-01-04 10:25:33 by simonpj]
simonpj [Fri, 4 Jan 2002 10:25:33 +0000 (10:25 +0000)]
[project @ 2002-01-04 10:25:33 by simonpj]
Warn, dont crash, when isIn gets a big list

22 years ago[project @ 2002-01-04 10:18:58 by simonmar]
simonmar [Fri, 4 Jan 2002 10:19:00 +0000 (10:19 +0000)]
[project @ 2002-01-04 10:18:58 by simonmar]
Replace all instances of '--' with '&ndash;&ndash;' since '--' gets
interpreted by JadeTeX to mean a single dash.

22 years ago[project @ 2002-01-04 10:04:44 by simonmar]
simonmar [Fri, 4 Jan 2002 10:04:44 +0000 (10:04 +0000)]
[project @ 2002-01-04 10:04:44 by simonmar]
replace -- with &mdash;

22 years ago[project @ 2002-01-04 09:35:42 by simonmar]
simonmar [Fri, 4 Jan 2002 09:35:42 +0000 (09:35 +0000)]
[project @ 2002-01-04 09:35:42 by simonmar]
oops, unb??rk the export list in the non-GHCI case.

22 years ago[project @ 2002-01-03 17:09:13 by simonmar]
simonmar [Thu, 3 Jan 2002 17:09:15 +0000 (17:09 +0000)]
[project @ 2002-01-03 17:09:13 by simonmar]
- change the mi_globals field of ModIface to be (Maybe GlobalRdrEnv)
  from GlobalRdrEnv.  The idea is that modules which we have
  compiled from source will have a complete GlobalRdrEnv in this field
  containing their top-level environments, whereas modules which we
  have loaded from object files (package modules and pre-compiled home
  modules) will have Nothing and we'll create a fake GlobalRdrEnv on
  demand from the export list.

  Previously we used to create the fake env all the time, but this way
  highlights the fact that we don't really have a proper GlobalRdrEnv
  for these modules (something we'd like to address at some point).

- rename CompManager.cmLoadModule to cmLoadModules and make it take
  a DynFlags argument to be consistent with the rest of the
  CompManager interface.

- split cmLoadModule into two parts: cmDepAnal which takes a list of
  filenames and returns a ModuleGraph, and cmLoadModules which takes
  the ModuleGraph and does the rest.  This lets the consumer know
  whether the dependency analysis step fails before unloading any
  existing modules - i.e. if you :reload and a module is missing, you
  don't lose the modules that are already loaded (bug reported by
  MIchael Weber some time ago).

22 years ago[project @ 2002-01-03 17:05:50 by sewardj]
sewardj [Thu, 3 Jan 2002 17:05:50 +0000 (17:05 +0000)]
[project @ 2002-01-03 17:05:50 by sewardj]
If addDLL returns an error message, actually show it to the user :)

Fixes: Sourceforge [ #482594 ] dlopen() errors reported badly

MERGE TO STABLE

22 years ago[project @ 2002-01-03 14:43:30 by sof]
sof [Thu, 3 Jan 2002 14:43:30 +0000 (14:43 +0000)]
[project @ 2002-01-03 14:43:30 by sof]
prel_sizeof_{termios,sigset_t}: sync up proto and impl

22 years ago[project @ 2002-01-03 11:45:06 by simonmar]
simonmar [Thu, 3 Jan 2002 11:45:06 +0000 (11:45 +0000)]
[project @ 2002-01-03 11:45:06 by simonmar]
Fix for previous commit: use the SRT on the top-level constructor when
deciding whether it has any CAF references, since not all top-level
bindings have CgInfo pinned on.

22 years ago[project @ 2002-01-03 11:44:17 by simonmar]
simonmar [Thu, 3 Jan 2002 11:44:17 +0000 (11:44 +0000)]
[project @ 2002-01-03 11:44:17 by simonmar]
Add comment.

22 years ago[project @ 2002-01-03 11:43:41 by simonmar]
simonmar [Thu, 3 Jan 2002 11:43:41 +0000 (11:43 +0000)]
[project @ 2002-01-03 11:43:41 by simonmar]
Export nonEmptySRT.

22 years ago[project @ 2002-01-02 12:32:18 by simonmar]
simonmar [Wed, 2 Jan 2002 12:32:20 +0000 (12:32 +0000)]
[project @ 2002-01-02 12:32:18 by simonmar]
- Implement a small GC optimisation: when a static constructor has
  been determined to have no (indirect) CAF references, we set its
  static link field to a non-zero value (currently 1).  This prevents
  the garbage collector from traversing this closure and transitively
  everything it points to, and thus should speed up GC a little.

- Omit the static link field from static constructors which have no
  pointer fields (i.e. they are CONSTR_NOCAF_STATIC).

- Add the padding words and the static link field for a static
  constructor at (AbsC) code generation time, rather than in the back
  ends.  This eliminates some duplication between PprAbsC and
  AbsCStixGen.

22 years ago[project @ 2002-01-02 12:27:43 by simonmar]
simonmar [Wed, 2 Jan 2002 12:27:43 +0000 (12:27 +0000)]
[project @ 2002-01-02 12:27:43 by simonmar]
No need for #ifdef around shift primop now.

22 years ago[project @ 2001-12-30 19:52:23 by sof]
sof [Sun, 30 Dec 2001 19:52:23 +0000 (19:52 +0000)]
[project @ 2001-12-30 19:52:23 by sof]
document --update-package option

22 years ago[project @ 2001-12-30 19:51:33 by sof]
sof [Sun, 30 Dec 2001 19:51:33 +0000 (19:51 +0000)]
[project @ 2001-12-30 19:51:33 by sof]
new option: -u / --update-package

22 years ago[project @ 2001-12-29 09:24:42 by sof]
sof [Sat, 29 Dec 2001 09:24:42 +0000 (09:24 +0000)]
[project @ 2001-12-29 09:24:42 by sof]
add raft of missing symbols to RTS_SYMBOLS

22 years ago[project @ 2001-12-28 22:58:17 by sof]
sof [Fri, 28 Dec 2001 22:58:17 +0000 (22:58 +0000)]
[project @ 2001-12-28 22:58:17 by sof]
struct sigset_t -> sigset_t

22 years ago[project @ 2001-12-28 17:25:31 by simonpj]
simonpj [Fri, 28 Dec 2001 17:25:32 +0000 (17:25 +0000)]
[project @ 2001-12-28 17:25:31 by simonpj]
---------------------
Dealing with deriving
---------------------

I spent a ridiculously long time peering at a bug report whereby
a 'deriving' clause sent GHC 5.02.1 into a loop.  It was all to
do with allowing instances like

instance Foo a b => Baz (T a)

(Notice the 'b' on the left which does not appear on the right.)

I realised that it's hard for the deriving machinery to find a
fixpoint when these sort of instance decls are around.  So I
now constrain *derived* instance decls not to have this form;
all the tyvars on the left must appear on the right.

On the way I commoned up the previously-separate tcSimplify
machinery for 'deriving' and 'default' decls with that for
everything else.   As a result, quite a few files are touched.

I hope I havn't broken anything.

22 years ago[project @ 2001-12-28 17:20:36 by simonpj]
simonpj [Fri, 28 Dec 2001 17:20:36 +0000 (17:20 +0000)]
[project @ 2001-12-28 17:20:36 by simonpj]
-----------------------------
Buglet in rank-N polymorphism
-----------------------------

Fix a bug in the way result type signatures are handled; they
hadn't been brought into the rank-N polymorphism world.

22 years ago[project @ 2001-12-28 16:36:54 by sof]
sof [Fri, 28 Dec 2001 16:36:54 +0000 (16:36 +0000)]
[project @ 2001-12-28 16:36:54 by sof]
heal

22 years ago[project @ 2001-12-28 00:14:33 by sof]
sof [Fri, 28 Dec 2001 00:14:33 +0000 (00:14 +0000)]
[project @ 2001-12-28 00:14:33 by sof]
debugging-by-nightly-build-reports; give poke_c_flag a correct FI decl

22 years ago[project @ 2001-12-27 11:29:58 by sof]
sof [Thu, 27 Dec 2001 11:30:10 +0000 (11:30 +0000)]
[project @ 2001-12-27 11:29:58 by sof]
Get rid of uses of #const, #peek, #poke and #ptr from PrelPosix.hsc
(this leaves just uses of #type in PrelPosix) - provide constant and
accessor wrappers via PrelIOUtils.c instead.

Who knows, we might just be able to bootstrap via .hc files again..?

Only compiled & tested under Win32.

22 years ago[project @ 2001-12-27 11:26:03 by sof]
sof [Thu, 27 Dec 2001 11:26:03 +0000 (11:26 +0000)]
[project @ 2001-12-27 11:26:03 by sof]
Added & exported low-level memcpy() wrappers - possible to offset both
src and dest.

22 years ago[project @ 2001-12-27 09:28:10 by sof]
sof [Thu, 27 Dec 2001 09:28:11 +0000 (09:28 +0000)]
[project @ 2001-12-27 09:28:10 by sof]
- removed PrelPosix.c_read, PrelPosix.c_write
- added Ptr and RawBuffer versions of PrelHandle.write_off,
  and PrelHandle.read_off and exported them, i.e., PrelHandle
  now exports:

    read_off_ba :: FD -> Bool -> RawBuffer -> Int -> CInt -> IO CInt
    read_off :: FD -> Bool -> Ptr CChar -> Int -> CInt -> IO CInt
    write_off_ba :: CInt -> Bool -> RawBuffer -> Int -> CInt -> IO CInt
    write_off :: CInt -> Bool -> Ptr CChar -> Int -> CInt -> IO CInt

- make hPutChar (win)socket friendly.

22 years ago[project @ 2001-12-26 23:08:07 by sof]
sof [Wed, 26 Dec 2001 23:08:07 +0000 (23:08 +0000)]
[project @ 2001-12-26 23:08:07 by sof]
add exeext to HS_PROG to avoid redundant re-linking

22 years ago[project @ 2001-12-21 17:03:18 by sewardj]
sewardj [Fri, 21 Dec 2001 17:03:18 +0000 (17:03 +0000)]
[project @ 2001-12-21 17:03:18 by sewardj]
derive Eq Cond so that an assertion in MachCode works.

22 years ago[project @ 2001-12-21 16:39:09 by simonpj]
simonpj [Fri, 21 Dec 2001 16:39:09 +0000 (16:39 +0000)]
[project @ 2001-12-21 16:39:09 by simonpj]
wibble

22 years ago[project @ 2001-12-21 10:30:32 by simonpj]
simonpj [Fri, 21 Dec 2001 10:30:32 +0000 (10:30 +0000)]
[project @ 2001-12-21 10:30:32 by simonpj]
Wibble

22 years ago[project @ 2001-12-21 10:24:24 by simonmar]
simonmar [Fri, 21 Dec 2001 10:24:24 +0000 (10:24 +0000)]
[project @ 2001-12-21 10:24:24 by simonmar]
Allow record declaratoins with zero fields.

22 years ago[project @ 2001-12-21 10:05:55 by simonpj]
simonpj [Fri, 21 Dec 2001 10:05:55 +0000 (10:05 +0000)]
[project @ 2001-12-21 10:05:55 by simonpj]
Docment newtype deriving stuff

22 years ago[project @ 2001-12-21 10:05:11 by simonpj]
simonpj [Fri, 21 Dec 2001 10:05:11 +0000 (10:05 +0000)]
[project @ 2001-12-21 10:05:11 by simonpj]
More wibbles to newtype deriving

22 years ago[project @ 2001-12-20 17:38:40 by sewardj]
sewardj [Thu, 20 Dec 2001 17:38:41 +0000 (17:38 +0000)]
[project @ 2001-12-20 17:38:40 by sewardj]
Move some small inline-in-C functions out of PrelPosix.hsc and into
the supporting cbits sources, where they belong.

Following this change, can you now compile the entire Prelude on
x86-linux with the native code generator, and get something which
actually works properly.

22 years ago[project @ 2001-12-20 17:10:00 by simonpj]
simonpj [Thu, 20 Dec 2001 17:10:01 +0000 (17:10 +0000)]
[project @ 2001-12-20 17:10:00 by simonpj]
Wibbles

22 years ago[project @ 2001-12-20 17:09:46 by simonpj]
simonpj [Thu, 20 Dec 2001 17:09:46 +0000 (17:09 +0000)]
[project @ 2001-12-20 17:09:46 by simonpj]
Comments

22 years ago[project @ 2001-12-20 16:39:29 by simonmar]
simonmar [Thu, 20 Dec 2001 16:39:29 +0000 (16:39 +0000)]
[project @ 2001-12-20 16:39:29 by simonmar]
Now that we can derive arbitrary classes for newtypes, use this to
derive all the classes we need for the types in PrelCTypes and
PrelCTypesISO, instead of the previous hack of explicitly coercing the
methods.

This should improve the quality of code using these types too; the
coercions were surely getting in the way of optimisations before.

22 years ago[project @ 2001-12-20 16:12:09 by sewardj]
sewardj [Thu, 20 Dec 2001 16:12:09 +0000 (16:12 +0000)]
[project @ 2001-12-20 16:12:09 by sewardj]
Outline freeStablePtr, so NCG-generated code actually has something to call :)

Also remove the presumably-defunct splitStablePtr.

22 years ago[project @ 2001-12-20 15:20:37 by sewardj]
sewardj [Thu, 20 Dec 2001 15:20:38 +0000 (15:20 +0000)]
[project @ 2001-12-20 15:20:37 by sewardj]
Generate floating-point comparisons on x86 which deal with NaNs in what
I assume is an IEEE854 compliant fashion.  For
   == >= > <= <
if either arg is a NaN, produce False, and for
   /=
if either arg is a NaN, produce True.

This is the behaviour that gcc has, by default.

Requires some ultramagical x86 code frags to be emitted.  A big comment
in PprMach explains how it works.

22 years ago[project @ 2001-12-20 15:16:13 by sewardj]
sewardj [Thu, 20 Dec 2001 15:16:13 +0000 (15:16 +0000)]
[project @ 2001-12-20 15:16:13 by sewardj]
nano-comment-wibble

22 years ago[project @ 2001-12-20 11:19:05 by simonpj]
simonpj [Thu, 20 Dec 2001 11:19:12 +0000 (11:19 +0000)]
[project @ 2001-12-20 11:19:05 by simonpj]
---------------------------------------------
More type system extensions (for John Hughes)
---------------------------------------------

1.  Added a brand-new extension that lets you derive ARBITRARY CLASSES
for newtypes.  Thus

newtype Age = Age Int deriving( Eq, Ord, Shape, Ix )

The idea is that the dictionary for the user-defined class Shape Age
is *identical* to that for Shape Int, so there is really no deriving
work to do.   This saves you writing the very tiresome instance decl:

instance Shape Age where
   shape_op1 (Age x) = shape_op1 x
   shape_op2 (Age x1) (Age x2) = shape_op2 x1 x2
   ...etc...

It's more efficient, too, becuase the Shape Age dictionary really
will be identical to the Shape Int dictionary.

There's an exception for Read and Show, because the derived instance
*isn't* the same.

There is a complication where higher order stuff is involved.  Here is
the example John gave:

   class StateMonad s m | m -> s where ...

   newtype Parser tok m a = Parser (State [tok] (Failure m) a)
  deriving( Monad, StateMonad )

Then we want the derived instance decls to be

   instance Monad (State [tok] (Failure m)) => Monad (Parser tok m)
   instance StateMonad [tok] (State [tok] (Failure m))
 => StateMonad [tok] (Parser tok m)

John is writing up manual entry for all of this, but this commit
implements it.   I think.

2.  Added -fallow-incoherent-instances, and documented it.  The idea
is that sometimes GHC is over-protective about not committing to a
particular instance, and the programmer may want to say "commit anyway".
Here's the example:

    class Sat a where
      dict :: a

    data EqD a = EqD {eq :: a->a->Bool}

    instance Sat (EqD a) => Eq a where
      (==) = eq dict

    instance Sat (EqD Integer) where
      dict = EqD{eq=(==)}

    instance Eq a => Sat (EqD a) where
      dict = EqD{eq=(==)}

    class Collection c cxt | c -> cxt where
      empty :: Sat (cxt a) => c a
      single :: Sat (cxt a) => a -> c a
      union :: Sat (cxt a) => c a -> c a -> c a
      member :: Sat (cxt a) => a -> c a -> Bool

    instance Collection [] EqD where
      empty = []
      single x = [x]
      union = (++)
      member = elem

It's an updated attempt to model "Restricted Data Types", if you
remember my Haskell workshop paper. In the end, though, GHC rejects
the program (even with fallow-overlapping-instances and
fallow-undecideable-instances), because there's more than one way to
construct the Eq instance needed by elem.

Yet all the ways are equivalent! So GHC is being a bit over-protective
of me, really: I know what I'm doing and I would LIKE it to pick an
arbitrary one. Maybe a flag fallow-incoherent-instances would be a
useful thing to add?

22 years ago[project @ 2001-12-19 17:07:49 by sewardj]
sewardj [Wed, 19 Dec 2001 17:07:49 +0000 (17:07 +0000)]
[project @ 2001-12-19 17:07:49 by sewardj]
Correctly handle signed vs unsigned integer division on x86.

22 years ago[project @ 2001-12-19 15:51:49 by simonmar]
simonmar [Wed, 19 Dec 2001 15:51:49 +0000 (15:51 +0000)]
[project @ 2001-12-19 15:51:49 by simonmar]
Documentation update to describe the new retainer profiling and
biographical profiling features.

22 years ago[project @ 2001-12-19 15:20:27 by simonmar]
simonmar [Wed, 19 Dec 2001 15:20:27 +0000 (15:20 +0000)]
[project @ 2001-12-19 15:20:27 by simonmar]
Remove some temporary debugging code.

22 years ago[project @ 2001-12-18 19:42:41 by sebc]
sebc [Tue, 18 Dec 2001 19:42:41 +0000 (19:42 +0000)]
[project @ 2001-12-18 19:42:41 by sebc]
THIS CHANGE AFFECTS ALL OBJECT FILES.
Please say "make clean"

Move the entry code pointer to the start of info tables, according
to Plan C in ghc/rts/Storage.h