ghc-hetmet.git
24 years ago[project @ 2000-01-13 14:33:57 by hwloidl]
hwloidl [Thu, 13 Jan 2000 14:34:09 +0000 (14:34 +0000)]
[project @ 2000-01-13 14:33:57 by hwloidl]
Merged GUM-4-04 branch into the main trunk. In particular merged GUM and
SMP code. Most of the GranSim code in GUM-4-04 still has to be carried over.

24 years ago[project @ 2000-01-13 14:11:51 by sewardj]
sewardj [Thu, 13 Jan 2000 14:11:51 +0000 (14:11 +0000)]
[project @ 2000-01-13 14:11:51 by sewardj]
Rearrange top-level nativeGen plumbing so that -ddump-stix is visible
even if subsequent nativeGen passes crash.

24 years ago[project @ 2000-01-13 12:59:58 by sewardj]
sewardj [Thu, 13 Jan 2000 12:59:59 +0000 (12:59 +0000)]
[project @ 2000-01-13 12:59:58 by sewardj]
Added a rudimentary implementation of -ddump-stix.

24 years ago[project @ 2000-01-13 12:40:15 by simonmar]
simonmar [Thu, 13 Jan 2000 12:40:16 +0000 (12:40 +0000)]
[project @ 2000-01-13 12:40:15 by simonmar]
- remove AllBlocked scheduler return code.  Nobody owned up to having
  created it or even knowing what it was there for.

- clean up fatal error condition handling somewhat.  The process
  exit code from a GHC program now indicates the kind of failure
  for certain kinds of exit:

general internal RTS error 254
program deadlocked 253
program interrupted (ctrl-C) 252
heap overflow 251
main thread killed 250

  and we leave exit codes 1-199 for the user (as is traditional at MS,
  200-249 are reserved for future expansion, and may contain
  undocumented extensions :-)

24 years ago[project @ 2000-01-13 10:47:05 by sewardj]
sewardj [Thu, 13 Jan 2000 10:47:05 +0000 (10:47 +0000)]
[project @ 2000-01-13 10:47:05 by sewardj]
evalExp(): rts_eval_ can no longer return AllBlocked, so remove test for it.

24 years ago[project @ 2000-01-13 10:37:31 by simonmar]
simonmar [Thu, 13 Jan 2000 10:37:31 +0000 (10:37 +0000)]
[project @ 2000-01-13 10:37:31 by simonmar]
- make some debug printfs more consistent
- #ifdef around call to initSparkPools() (was breaking the normal build).

24 years ago[project @ 2000-01-12 18:05:49 by rrt]
rrt [Wed, 12 Jan 2000 18:05:49 +0000 (18:05 +0000)]
[project @ 2000-01-12 18:05:49 by rrt]
Libraries documentation moved to hslibs tree.

24 years ago[project @ 2000-01-12 16:32:41 by sewardj]
sewardj [Wed, 12 Jan 2000 16:32:41 +0000 (16:32 +0000)]
[project @ 2000-01-12 16:32:41 by sewardj]
cgExpr(), case NAME: correctly handle tail call into native code

24 years ago[project @ 2000-01-12 16:29:47 by sewardj]
sewardj [Wed, 12 Jan 2000 16:29:47 +0000 (16:29 +0000)]
[project @ 2000-01-12 16:29:47 by sewardj]
Don't do implementCfun for [] and (:) in combined mode,
since GHC supplies implementations.

24 years ago[project @ 2000-01-12 15:15:17 by simonmar]
simonmar [Wed, 12 Jan 2000 15:15:18 +0000 (15:15 +0000)]
[project @ 2000-01-12 15:15:17 by simonmar]
Add 'par' and sparking support to the SMP implementation.

24 years ago[project @ 2000-01-12 14:52:53 by sewardj]
sewardj [Wed, 12 Jan 2000 14:52:54 +0000 (14:52 +0000)]
[project @ 2000-01-12 14:52:53 by sewardj]
Clear up confusion regarding names of tuple types.
-- (), coded as Z0T, is the unit.
-- (,), coded as Z1T, is the pair type.
-- (,,,N commas,,,) coded as ZNT, is the (N+1)-tuple type.
-- There is no 1-ary type type.

24 years ago[project @ 2000-01-12 14:47:27 by sewardj]
sewardj [Wed, 12 Jan 2000 14:47:27 +0000 (14:47 +0000)]
[project @ 2000-01-12 14:47:27 by sewardj]
readScripts(), combined mode: minor hack so that current eval module
is Prelude rather than PrelHugs, once the Prelude is loaded.

24 years ago[project @ 2000-01-12 12:39:20 by simonmar]
simonmar [Wed, 12 Jan 2000 12:39:20 +0000 (12:39 +0000)]
[project @ 2000-01-12 12:39:20 by simonmar]
mark INDirections as non-sparkable.

24 years ago[project @ 2000-01-12 10:44:50 by sewardj]
sewardj [Wed, 12 Jan 2000 10:44:50 +0000 (10:44 +0000)]
[project @ 2000-01-12 10:44:50 by sewardj]
Make hugsprimUnpackString :: Addr -> String available to Hugs' desugarer
in both modes.

24 years ago[project @ 2000-01-12 10:30:09 by sewardj]
sewardj [Wed, 12 Jan 2000 10:30:09 +0000 (10:30 +0000)]
[project @ 2000-01-12 10:30:09 by sewardj]
Link nameInd to "_indirect".  Haven't a clue what this is for but it
seems necessary.

24 years ago[project @ 2000-01-11 17:23:39 by sewardj]
sewardj [Tue, 11 Jan 2000 17:23:39 +0000 (17:23 +0000)]
[project @ 2000-01-11 17:23:39 by sewardj]
Handle tuple types (,,,) --> Z3T in enZcodeThenFindText().

24 years ago[project @ 2000-01-11 17:09:38 by sewardj]
sewardj [Tue, 11 Jan 2000 17:09:38 +0000 (17:09 +0000)]
[project @ 2000-01-11 17:09:38 by sewardj]
Connect PrelBase.[] to PrelBase_ZMZN_closure, and (:) likewise.

24 years ago[project @ 2000-01-11 15:40:57 by sewardj]
sewardj [Tue, 11 Jan 2000 15:40:57 +0000 (15:40 +0000)]
[project @ 2000-01-11 15:40:57 by sewardj]
Supply correct kinds for tycons created by addWiredInBoxingTycon().

24 years ago[project @ 2000-01-11 14:56:07 by sewardj]
sewardj [Tue, 11 Jan 2000 14:56:07 +0000 (14:56 +0000)]
[project @ 2000-01-11 14:56:07 by sewardj]
Remember to set name(n).arity when n is a class method

24 years ago[project @ 2000-01-11 14:51:43 by sewardj]
sewardj [Tue, 11 Jan 2000 14:51:43 +0000 (14:51 +0000)]
[project @ 2000-01-11 14:51:43 by sewardj]
nameFromOPtr(): don't try to search object sym tables for source modules
lookupSection(): ditto, plus don't forget to also look in
                 module(m).objectExtras

24 years ago[project @ 2000-01-11 14:21:43 by sewardj]
sewardj [Tue, 11 Jan 2000 14:21:43 +0000 (14:21 +0000)]
[project @ 2000-01-11 14:21:43 by sewardj]
Add nameShow and namePutStr as hooks for said fns so that evaluator()
in hugs.c can refer to them in a style consistent with the way the rest
of Hugs refers to specific symbol names.

24 years ago[project @ 2000-01-11 14:09:17 by sewardj]
sewardj [Tue, 11 Jan 2000 14:09:17 +0000 (14:09 +0000)]
[project @ 2000-01-11 14:09:17 by sewardj]
startGHCInstance: allocate a name() entry for the instance builder fn,
and store the name in the instance's .builder field.  Without this,
it's impossible to generate any code which uses an instance builder :-(

24 years ago[project @ 2000-01-11 10:15:24 by sewardj]
sewardj [Tue, 11 Jan 2000 10:15:24 +0000 (10:15 +0000)]
[project @ 2000-01-11 10:15:24 by sewardj]
A module for use with the combined GHC-Hugs system.  Contains various
small helper functions referred to which Hugs' desugarer emits references.
The same functions are implemented in ghc/interpreter/lib/Prelude.hs
for use in standalone Hugs.  The two versions should correspond exactly.

24 years ago[project @ 2000-01-10 17:19:32 by sewardj]
sewardj [Mon, 10 Jan 2000 17:19:33 +0000 (17:19 +0000)]
[project @ 2000-01-10 17:19:32 by sewardj]
Back out previous commit.

24 years ago[project @ 2000-01-10 17:06:41 by sewardj]
sewardj [Mon, 10 Jan 2000 17:06:42 +0000 (17:06 +0000)]
[project @ 2000-01-10 17:06:41 by sewardj]
This is the missing log message for the commit by sewardj at
2000/01/10 08:23:33 PST for these files:

Some names in the standalone Prelude are referred to during desugaring
in Hugs.  These functions therefore need to be supplied from the GHC
world in combined mode.  Rename the relevant functions from
primXYZ to hugsprimXYZ to distinguish them, in preparation for
create of ghc/lib/std/PrelHugs.lhs.
---------------------------------------------------------------------

24 years ago[project @ 2000-01-10 16:27:03 by sewardj]
sewardj [Mon, 10 Jan 2000 16:27:04 +0000 (16:27 +0000)]
[project @ 2000-01-10 16:27:03 by sewardj]
nameRunIO --> nameRunIO_toplevel

24 years ago[project @ 2000-01-10 16:23:32 by sewardj]
sewardj [Mon, 10 Jan 2000 16:23:33 +0000 (16:23 +0000)]
[project @ 2000-01-10 16:23:32 by sewardj]

24 years ago[project @ 2000-01-10 15:52:42 by sewardj]
sewardj [Mon, 10 Jan 2000 15:52:42 +0000 (15:52 +0000)]
[project @ 2000-01-10 15:52:42 by sewardj]
ocGetNames: sort the acquired symbol table by symbol name, so that
ocLookupSym can then use a fast binary search to find symbols.

24 years ago[project @ 2000-01-10 14:52:21 by rrt]
rrt [Mon, 10 Jan 2000 14:52:23 +0000 (14:52 +0000)]
[project @ 2000-01-10 14:52:21 by rrt]
Retagged <Literal>s into <Filename>, <Option>, <Command>, &c.

24 years ago[project @ 2000-01-10 11:59:55 by simonmar]
simonmar [Mon, 10 Jan 2000 11:59:55 +0000 (11:59 +0000)]
[project @ 2000-01-10 11:59:55 by simonmar]
fix more breakage

24 years ago[project @ 2000-01-10 11:08:04 by simonmar]
simonmar [Mon, 10 Jan 2000 11:08:04 +0000 (11:08 +0000)]
[project @ 2000-01-10 11:08:04 by simonmar]
ordering matters when you're using ':='...

24 years ago[project @ 2000-01-07 17:49:29 by sewardj]
sewardj [Fri, 7 Jan 2000 17:49:29 +0000 (17:49 +0000)]
[project @ 2000-01-07 17:49:29 by sewardj]
type.c: implement typechecker(POSTPREL), so that initialisation
    of the typechecker is completed correctly in combined mode.
storage.c(addTupleTycon): create a name table entry for () so that
    nameUnit in the above can be bound to something.

24 years ago[project @ 2000-01-07 17:28:14 by simonmar]
simonmar [Fri, 7 Jan 2000 17:28:14 +0000 (17:28 +0000)]
[project @ 2000-01-07 17:28:14 by simonmar]
import Float# from PrelGHC

24 years ago[project @ 2000-01-07 17:23:52 by simonmar]
simonmar [Fri, 7 Jan 2000 17:23:52 +0000 (17:23 +0000)]
[project @ 2000-01-07 17:23:52 by simonmar]
set $(HC)=$(GHC_INPLACE)

24 years ago[project @ 2000-01-07 17:22:09 by simonmar]
simonmar [Fri, 7 Jan 2000 17:22:09 +0000 (17:22 +0000)]
[project @ 2000-01-07 17:22:09 by simonmar]
- set directories using ':=' because the value of $(TOP) can change
- remove some old cruft

24 years ago[project @ 2000-01-07 16:58:50 by simonmar]
simonmar [Fri, 7 Jan 2000 16:58:50 +0000 (16:58 +0000)]
[project @ 2000-01-07 16:58:50 by simonmar]
A few fixups:

- correct some addresses

- update the mail archive pointers to
  point to the new archives on mail-archive.com

- use <email> tag for email addresses.

24 years ago[project @ 2000-01-07 16:56:47 by sewardj]
sewardj [Fri, 7 Jan 2000 16:56:47 +0000 (16:56 +0000)]
[project @ 2000-01-07 16:56:47 by sewardj]
storage.c:   unZcode tuple types (eg Z4T) correctly (off by one)
interface.c(startGHCClass):
              remember to do dictapsToQualtype on class member types
           (processInterfaces): return a Bool if Prelude.hi was
              processed, so we can know when to do everybody(POSTPREL)

24 years ago[project @ 2000-01-07 16:47:15 by simonmar]
simonmar [Fri, 7 Jan 2000 16:47:15 +0000 (16:47 +0000)]
[project @ 2000-01-07 16:47:15 by simonmar]
Add $(SGML_DOC).tex to $(CLEAN_FILES).

24 years ago[project @ 2000-01-07 15:31:12 by sewardj]
sewardj [Fri, 7 Jan 2000 15:31:12 +0000 (15:31 +0000)]
[project @ 2000-01-07 15:31:12 by sewardj]
finishGHCModule: correctly create export list entries for non-Names
importEntity: allow TUPLE as a kind of TYCON (am dubious about this)

24 years ago[project @ 2000-01-07 10:29:59 by sewardj]
sewardj [Fri, 7 Jan 2000 10:29:59 +0000 (10:29 +0000)]
[project @ 2000-01-07 10:29:59 by sewardj]
Add a few more symbols to EXTERN_SYMS to track recent GHC Prelude changes.

24 years ago[project @ 2000-01-07 10:27:33 by sewardj]
sewardj [Fri, 7 Jan 2000 10:27:33 +0000 (10:27 +0000)]
[project @ 2000-01-07 10:27:33 by sewardj]
Remove _fast from macro name gcdIntegerIntzh_fast.

24 years ago[project @ 2000-01-06 16:33:10 by sewardj]
sewardj [Thu, 6 Jan 2000 16:33:10 +0000 (16:33 +0000)]
[project @ 2000-01-06 16:33:10 by sewardj]
Update Hugs' knowledge of the GHC Prelude to track recent Prelude changes.

24 years ago[project @ 2000-01-06 14:17:16 by sewardj]
sewardj [Thu, 6 Jan 2000 14:17:16 +0000 (14:17 +0000)]
[project @ 2000-01-06 14:17:16 by sewardj]
Reinstate debug printing, but only only for combined mode.

24 years ago[project @ 2000-01-06 11:57:50 by sewardj]
sewardj [Thu, 6 Jan 2000 11:57:50 +0000 (11:57 +0000)]
[project @ 2000-01-06 11:57:50 by sewardj]
Remove #ifdef COMPILER, since the contents of this file is now needed
by the combined system.

24 years ago[project @ 2000-01-06 11:57:11 by sewardj]
sewardj [Thu, 6 Jan 2000 11:57:11 +0000 (11:57 +0000)]
[project @ 2000-01-06 11:57:11 by sewardj]
Change NUM_TUPLES to 37, to match GHC.

24 years ago[project @ 2000-01-06 10:43:15 by simonmar]
simonmar [Thu, 6 Jan 2000 10:43:15 +0000 (10:43 +0000)]
[project @ 2000-01-06 10:43:15 by simonmar]
Fix a bug in inlining that gave unresolved references
whenever you compile without -O.  Silly me.

24 years ago[project @ 2000-01-05 19:10:21 by andy]
andy [Wed, 5 Jan 2000 19:10:21 +0000 (19:10 +0000)]
[project @ 2000-01-05 19:10:21 by andy]
Commenting out the debugging messages for in the new interface code.

24 years ago[project @ 2000-01-05 18:05:33 by sewardj]
sewardj [Wed, 5 Jan 2000 18:05:34 +0000 (18:05 +0000)]
[project @ 2000-01-05 18:05:33 by sewardj]
Fix more interface-reading bugs:
-- Qualtypes were not being generated from DICTAPs for overloaded
   non-class values.  New function dictapsToQualtype to handle this.
-- Incorrect construction of constructor result type in startGHCDataDecl
   for parameterised types eg   Just :: a -> Maybe a.

Changed meaning of DICTAP, so that the construction is
  ap(DICTAP, (QConId, Type))  rather than
  ap(DICTAP, (QConId, [Type])).  Will have to undo this if we want
                                 to support multiparam type classes.

24 years ago[project @ 2000-01-05 17:24:51 by simonmar]
simonmar [Wed, 5 Jan 2000 17:24:51 +0000 (17:24 +0000)]
[project @ 2000-01-05 17:24:51 by simonmar]
Add test for unterminated ``.

24 years ago[project @ 2000-01-05 17:23:34 by simonmar]
simonmar [Wed, 5 Jan 2000 17:23:34 +0000 (17:23 +0000)]
[project @ 2000-01-05 17:23:34 by simonmar]
Emit a reasonable error message instead of crashing when there's an
unterminated literal-liberal in the source file.

24 years ago[project @ 2000-01-05 15:57:40 by sewardj]
sewardj [Wed, 5 Jan 2000 15:57:41 +0000 (15:57 +0000)]
[project @ 2000-01-05 15:57:40 by sewardj]
Remember to add entities to module(m).names/.tycons/.classes as well as
to module(m).exports.  Otherwise the 'eval environment' will be wrong.

Add assertions in storage.c for addName/addTycon/addClass.

24 years ago[project @ 2000-01-05 13:53:36 by sewardj]
sewardj [Wed, 5 Jan 2000 13:53:37 +0000 (13:53 +0000)]
[project @ 2000-01-05 13:53:36 by sewardj]
Fix some serious errors in the handling of instances in interfaces.

24 years ago[project @ 2000-01-05 11:55:29 by rrt]
rrt [Wed, 5 Jan 2000 11:55:29 +0000 (11:55 +0000)]
[project @ 2000-01-05 11:55:29 by rrt]
Changed rules to make SGML documentation using DocBook tools rather than
LinuxDoc.

24 years ago[project @ 2000-01-05 11:20:23 by rrt]
rrt [Wed, 5 Jan 2000 11:20:25 +0000 (11:20 +0000)]
[project @ 2000-01-05 11:20:23 by rrt]
VSGML files removed because of conversion from LinuxDoc to DocBook (now
have just SGML files).

24 years ago[project @ 2000-01-05 11:14:06 by rrt]
rrt [Wed, 5 Jan 2000 11:14:08 +0000 (11:14 +0000)]
[project @ 2000-01-05 11:14:06 by rrt]
VSGML files changed back to plain SGML during change from LinuxDoc to DocBook.

24 years ago[project @ 2000-01-05 11:06:23 by rrt]
rrt [Wed, 5 Jan 2000 11:06:24 +0000 (11:06 +0000)]
[project @ 2000-01-05 11:06:23 by rrt]
Documentation changed from LinuxDoc to DocBook format, and license added to
the user guide.

24 years ago[project @ 2000-01-04 17:40:46 by simonpj]
simonpj [Tue, 4 Jan 2000 17:40:52 +0000 (17:40 +0000)]
[project @ 2000-01-04 17:40:46 by simonpj]
This commit arranges that literal strings will fuse
nicely, by expressing them as an application of build.

* NoRepStr is now completely redundant, though I havn't removed it yet.

* The unpackStr stuff moves from PrelPack to PrelBase.

* There's a new form of Rule, a BuiltinRule, for rules that
  can't be expressed in Haskell.  The string-fusion rule is one
  such.  It's defined in prelude/PrelRules.lhs.

* PrelRules.lhs also contains a great deal of code that
  implements constant folding.  In due course this will replace
  ConFold.lhs, but for the moment it simply duplicates it.

24 years ago[project @ 1999-12-29 14:46:29 by simonpj]
simonpj [Wed, 29 Dec 1999 14:46:36 +0000 (14:46 +0000)]
[project @ 1999-12-29 14:46:29 by simonpj]
Many tweaks to expected output

24 years ago[project @ 1999-12-29 14:28:48 by simonpj]
simonpj [Wed, 29 Dec 1999 14:28:48 +0000 (14:28 +0000)]
[project @ 1999-12-29 14:28:48 by simonpj]
Set MKDEPENDHS to $(HC) instead of $(GHC).
This means that dependencies will be computed with the same
compiler as compilations, which is presumably the right thing.

24 years ago[project @ 1999-12-29 12:38:25 by simonpj]
simonpj [Wed, 29 Dec 1999 12:38:25 +0000 (12:38 +0000)]
[project @ 1999-12-29 12:38:25 by simonpj]
Clarification on output files

24 years ago[project @ 1999-12-29 12:26:51 by simonpj]
simonpj [Wed, 29 Dec 1999 12:26:51 +0000 (12:26 +0000)]
[project @ 1999-12-29 12:26:51 by simonpj]
Improve rn029, remove dup rn033

24 years ago[project @ 1999-12-29 12:17:36 by simonpj]
simonpj [Wed, 29 Dec 1999 12:17:36 +0000 (12:17 +0000)]
[project @ 1999-12-29 12:17:36 by simonpj]
Fix a renamer bug that rejected

import M hiding( C )

where C is a constructor.

24 years ago[project @ 1999-12-29 12:12:59 by simonpj]
simonpj [Wed, 29 Dec 1999 12:12:59 +0000 (12:12 +0000)]
[project @ 1999-12-29 12:12:59 by simonpj]
Add rn037

24 years ago[project @ 1999-12-22 10:36:34 by simonmar]
simonmar [Wed, 22 Dec 1999 10:36:34 +0000 (10:36 +0000)]
[project @ 1999-12-22 10:36:34 by simonmar]
Remove more vestiges of IntAbsOp, and now unused absIntCode.

24 years ago[project @ 1999-12-22 10:11:48 by simonmar]
simonmar [Wed, 22 Dec 1999 10:11:48 +0000 (10:11 +0000)]
[project @ 1999-12-22 10:11:48 by simonmar]
Add comment about TMPDIR.

24 years ago[project @ 1999-12-21 13:01:59 by simonmar]
simonmar [Tue, 21 Dec 1999 13:01:59 +0000 (13:01 +0000)]
[project @ 1999-12-21 13:01:59 by simonmar]
remove old unused $RTS_PREFIX I just noticed.

24 years ago[project @ 1999-12-21 13:00:54 by simonmar]
simonmar [Tue, 21 Dec 1999 13:00:54 +0000 (13:00 +0000)]
[project @ 1999-12-21 13:00:54 by simonmar]
Hopefully banish bogus "Happy version 1.6 or later is required to
compile GHC" messages.  The new rule is: if you don't have an
installed copy of Happy, but have a Happy source tree, we point the
build system at the latter (and pull the version number out of
happy/mk/version.mk).

24 years ago[project @ 1999-12-20 22:21:09 by lewie]
lewie [Mon, 20 Dec 1999 22:21:10 +0000 (22:21 +0000)]
[project @ 1999-12-20 22:21:09 by lewie]
Remove *uses* of unused IntAbsOp (see recent log message in prelude/PrimOp).

24 years ago[project @ 1999-12-20 17:07:05 by simonmar]
simonmar [Mon, 20 Dec 1999 17:07:05 +0000 (17:07 +0000)]
[project @ 1999-12-20 17:07:05 by simonmar]
Remove unused IntAbsOp

24 years ago[project @ 1999-12-20 16:55:26 by sewardj]
sewardj [Mon, 20 Dec 1999 16:55:28 +0000 (16:55 +0000)]
[project @ 1999-12-20 16:55:26 by sewardj]
* Fix silly bugs in new linker, object.[ch].

* Allow modules to have arbitrary numbers of "extra" object files
  as well as their primary object file.  Initial requirement is
  that Prelude needs libHS_cbits.o/.dll as well as Prelude.o
  module(m).object is the primary object
  module(m).objectExtras are the extra objects
  module(m).objectExtraNames :: [Text] are their names.
  Modify machdep.c to assume that extra objects for module M
  live in the same directory as M's primary object.

* Stuff 130ish symbol names into the RTS symbol table, enough
  so that the whole Prelude can be linked.  That includes symbols
  in the C library needed by libHS_cbits.  This is very hacky
  and needs to be fixed properly.

24 years ago[project @ 1999-12-20 14:38:30 by simonmar]
simonmar [Mon, 20 Dec 1999 14:38:30 +0000 (14:38 +0000)]
[project @ 1999-12-20 14:38:30 by simonmar]
3.02 hi-boot syntax wibble

24 years ago[project @ 1999-12-20 10:35:47 by simonpj]
simonpj [Mon, 20 Dec 1999 10:35:47 +0000 (10:35 +0000)]
[project @ 1999-12-20 10:35:47 by simonpj]
Forgot to remove PrelNumExtra in the last commit

24 years ago[project @ 1999-12-20 10:34:27 by simonpj]
simonpj [Mon, 20 Dec 1999 10:34:37 +0000 (10:34 +0000)]
[project @ 1999-12-20 10:34:27 by simonpj]
This commit implements a substantial re-organisation of the Prelude
It also fixes a couple of small renamer bugs that were reported recently
(notably, Sven pointed out that we weren't reporting
unused imports properly)

My original goal was to get rid of all "orphan" modules (i.e. ones
with instance decls that don't belong either to a tycon or a class
defined in the same module).  This should reduce the number of
interface files that have to be read when compiling small Haskell
modules.

But like most expeditions into the Prelude Swamp, it spiraled out
of control.  The result is quite satisfactory, though.

GONE AWAY: PrelCCall, PrelNumExtra

NEW: PrelReal, PrelFloat, PrelByteArr, PrelNum.hi-boot

(The extra PrelNum.hi-boot is because of a tiresome thin-air Id, addr2Integer,
which used to be in PrelBase.)

Quite a lot of types have moved from one module to another,
which entails some changes to part of the compiler (PrelInfo, PrelMods) etc,
and there are a few places in the RTS includes and even in the driver
that know about these home modules (alas).

So the rough structure is as follows, in (linearised) dependency order
[this list now appears in PrelBase.lhs]

PrelGHC Has no implementation.  It defines built-in things, and
by importing it you bring them into scope.
The source file is PrelGHC.hi-boot, which is just
copied to make PrelGHC.hi

Classes: CCallable, CReturnable

PrelBase Classes: Eq, Ord, Functor, Monad
Types:   list, (), Int, Bool, Ordering, Char, String

PrelTup Types: tuples, plus instances for PrelBase classes

PrelShow Class: Show, plus instances for PrelBase/PrelTup types

PrelEnum Class: Enum,  plus instances for PrelBase/PrelTup types

PrelMaybe Type: Maybe, plus instances for PrelBase classes

PrelNum Class: Num, plus instances for Int
Type:  Integer, plus instances for all classes so far (Eq, Ord, Num, Show)

Integer is needed here because it is mentioned in the signature
of 'fromInteger' in class Num

PrelReal Classes: Real, Integral, Fractional, RealFrac
 plus instances for Int, Integer
Types:  Ratio, Rational
plus intances for classes so far

Rational is needed here because it is mentioned in the signature
of 'toRational' in class Real

Ix Classes: Ix, plus instances for Int, Bool, Char, Integer, Ordering, tuples

PrelArr Types: Array, MutableArray, MutableVar

Does *not* contain any ByteArray stuff (see PrelByteArr)
Arrays are used by a function in PrelFloat

PrelFloat Classes: Floating, RealFloat
Types:   Float, Double, plus instances of all classes so far

This module contains everything to do with floating point.
It is a big module (900 lines)
With a bit of luck, many modules can be compiled without ever reading PrelFloat.hi

PrelByteArr Types: ByteArray, MutableByteArray

We want this one to be after PrelFloat, because it defines arrays
of unboxed floats.

Other Prelude modules are much easier with fewer complex dependencies.

24 years ago[project @ 1999-12-20 10:18:36 by simonpj]
simonpj [Mon, 20 Dec 1999 10:18:36 +0000 (10:18 +0000)]
[project @ 1999-12-20 10:18:36 by simonpj]
wibble

24 years ago[project @ 1999-12-20 10:12:50 by simonpj]
simonpj [Mon, 20 Dec 1999 10:12:50 +0000 (10:12 +0000)]
[project @ 1999-12-20 10:12:50 by simonpj]
Fix a gotcha in the interface-file post processing that
led to bizarre omissions from interface files when working
with existential types.  That's what you get for using Perl

24 years ago[project @ 1999-12-17 16:34:08 by sewardj]
sewardj [Fri, 17 Dec 1999 16:34:08 +0000 (16:34 +0000)]
[project @ 1999-12-17 16:34:08 by sewardj]
Reorganised object code loader/linker to make it much more modular and
cleaner.  All the machinery is now in object.[ch].  This stuff is
packaged up as close to a standalone library as I can reasonably get
it -- in particular, it knows nothing about Hugs -- so that the linker
could easily be used in some entirely different application with
almost no changes, if we so desire.

Minor mods to interface.c & storage.c to use the new linker API.

24 years ago[project @ 1999-12-17 15:25:02 by simonmar]
simonmar [Fri, 17 Dec 1999 15:25:02 +0000 (15:25 +0000)]
[project @ 1999-12-17 15:25:02 by simonmar]
Add netbsd to the list of platforms supported.

ToDo: add info to the User's Guide once the Shiny New Documentation is
committed.

24 years ago[project @ 1999-12-16 16:42:56 by sewardj]
sewardj [Thu, 16 Dec 1999 16:42:56 +0000 (16:42 +0000)]
[project @ 1999-12-16 16:42:56 by sewardj]
Add extended version of previous commit message as a comment.

24 years ago[project @ 1999-12-16 16:34:40 by sewardj]
sewardj [Thu, 16 Dec 1999 16:34:46 +0000 (16:34 +0000)]
[project @ 1999-12-16 16:34:40 by sewardj]
Further major improvements in interface processing, mostly in the
handling of types.

Interfaces can contain references to unboxed types, and these need to
be handled carefully.  The following is a summary of how the interface
loader now works.  It is applied to groups of interfaces simultaneously,
viz, the entire Prelude at once:

1.  Throw away any entity not mentioned in the export lists.

2.  Delete type (not data or newtype) definitions which refer to
    unknown types in their right hand sides.  Because Hugs doesn't
    know of any unboxed types, this has the side effect of removing
    all type defns referring to unboxed types.  Repeat step 2 until
    a fixed point is reached.

3.  Make abstract all data/newtype defns which refer to an unknown
    type.  eg, data Word = MkW Word# becomes data Word, because
    Word# is unknown.  Hugs is happy to know about abstract boxed
    Words, but not about Word#s.

4.  Step 2 could delete types referred to by values, instances and
    classes.  So filter all entities, and delete those referring to
    unknown types _or_ classes.  This could cause other entities
    to become invalid, so iterate step 4 to a fixed point.

    After step 4, the interfaces no longer contain anything
    unpalatable to Hugs.

5.  Steps 1-4 operate purely on the iface syntax trees.  We now start
    creating symbol table entries.  First, create a module table
    entry for each interface, and locate and read in the corresponding
    object file.

6.  Traverse all interfaces.  For each entity, create an entry in
    the name, tycon, class or instance table, and fill in relevant
    fields, but do not attempt to link tycon/class/instance/name uses
    to their symbol table entries.

7.  Revisit all symbol table entries created in step 6.  We should
    now be able to replace all references to tycons/classes/instances/
    names with the relevant symbol table entries.

8.  Traverse all interfaces.  For each iface, examine the export lists
    and use it to build export lists in the module table.  Do the
    implicit 'import Prelude' thing if necessary.  Finally, resolve
    references in the object code for this module.

I'm sure the number of passes could be reduced.  For the moment,
understandability is of much higher priority.

Hugs can now complete stages 1 through 8 for the whole GHC Prelude,
excepting doing the object linking, which needs further work.

24 years ago[project @ 1999-12-15 10:01:42 by simonmar]
simonmar [Wed, 15 Dec 1999 10:01:42 +0000 (10:01 +0000)]
[project @ 1999-12-15 10:01:42 by simonmar]
Add test displaying bug in fixity resolution on lhs of a function
binding.  We currently fail on this example, but at least putting it
in the test suite will make sure we don't forget about it :)

24 years ago[project @ 1999-12-15 09:43:23 by simonmar]
simonmar [Wed, 15 Dec 1999 09:43:25 +0000 (09:43 +0000)]
[project @ 1999-12-15 09:43:23 by simonmar]
Add NetBSD/x86 support.

24 years ago[project @ 1999-12-14 14:26:14 by simonmar]
simonmar [Tue, 14 Dec 1999 14:26:14 +0000 (14:26 +0000)]
[project @ 1999-12-14 14:26:14 by simonmar]
Don't set O_NONBLOCK on stdout and stderr.  This is a workaround for a
combination of bizarre Unix semantics and shells which don't reset the
nonblocking flag after running a program.

24 years ago[project @ 1999-12-13 17:34:54 by simonmar]
simonmar [Mon, 13 Dec 1999 17:34:54 +0000 (17:34 +0000)]
[project @ 1999-12-13 17:34:54 by simonmar]
Include hslibs in a binary-dist.

24 years ago[project @ 1999-12-13 17:28:53 by simonmar]
simonmar [Mon, 13 Dec 1999 17:28:53 +0000 (17:28 +0000)]
[project @ 1999-12-13 17:28:53 by simonmar]
Add a few minBound::Int tests.

24 years ago[project @ 1999-12-13 17:25:57 by simonmar]
simonmar [Mon, 13 Dec 1999 17:25:57 +0000 (17:25 +0000)]
[project @ 1999-12-13 17:25:57 by simonmar]
Fix bug in abs::Integer->Integer: result was wrong for minBound::Int.

24 years ago[project @ 1999-12-13 16:10:56 by simonmar]
simonmar [Mon, 13 Dec 1999 16:10:56 +0000 (16:10 +0000)]
[project @ 1999-12-13 16:10:56 by simonmar]
Correct off-by-one error in bounds checking when converting
NoRepIntegers into the real thing.  Not a bug, just a cleanup.

24 years ago[project @ 1999-12-10 16:24:50 by simonmar]
simonmar [Fri, 10 Dec 1999 16:24:50 +0000 (16:24 +0000)]
[project @ 1999-12-10 16:24:50 by simonmar]
bump version to 4.06

24 years ago[project @ 1999-12-10 15:59:41 by sewardj]
sewardj [Fri, 10 Dec 1999 15:59:57 +0000 (15:59 +0000)]
[project @ 1999-12-10 15:59:41 by sewardj]
Major improvements in interface processing, and minor supporting
improvements to CT-storage management.

* Make the iface parser return the complete interface as a single
  tree, which is processed later.  Added abs syntax tags
  I_INTERFACE .. I_VALUE to support this.

* Add tagged ("z") 2,3,4,5 tuples.  Because they are tagged, they can't
  be confused with lists, etc.  Selectors zfst, zsnd ... zsel45, zsel55
  check tags first.  Iface processing uses z-tuples wherever it can.

* Add unap as a safe "inverse" of ap; it checks tags.  So
  unap(TAG1, ap(TAG2,cell)) == cell but only if TAG1==TAG2, else
  assertion failure.

* In interface.c, clean up the startGHC*/endGHC* functions.
  processInterfaces() is the top-level driver; it makes 4
  passes over the supplied iface trees.

* Throw away iface symbols not mentioned in export lists.

* Use iface export lists to construct both the export and
  eval environments for a module.

* Don't use Texts to refer to things.  Instead use ConId and
  VarId.  Added ConId and VarId as synonyms for Cell in
  storage.h.

* Add findSimpleInstance in storage.c.

24 years ago[project @ 1999-12-10 15:50:10 by simonmar]
simonmar [Fri, 10 Dec 1999 15:50:10 +0000 (15:50 +0000)]
[project @ 1999-12-10 15:50:10 by simonmar]
Unbreak finalization.

24 years ago[project @ 1999-12-10 12:33:12 by simonpj]
simonpj [Fri, 10 Dec 1999 12:33:12 +0000 (12:33 +0000)]
[project @ 1999-12-10 12:33:12 by simonpj]
I was too enthusiastic about removing empty usage entries
from interface files.  This commit fixes my errors of yesterday.

Simon

24 years ago[project @ 1999-12-09 16:45:57 by simonmar]
simonmar [Thu, 9 Dec 1999 16:45:57 +0000 (16:45 +0000)]
[project @ 1999-12-09 16:45:57 by simonmar]
allow certain keywords as scc labels.

24 years ago[project @ 1999-12-09 14:40:07 by simonmar]
simonmar [Thu, 9 Dec 1999 14:40:07 +0000 (14:40 +0000)]
[project @ 1999-12-09 14:40:07 by simonmar]
eliminate recursive defn: HC <--> WithGhcHc

24 years ago[project @ 1999-12-09 12:30:56 by simonpj]
simonpj [Thu, 9 Dec 1999 12:31:02 +0000 (12:31 +0000)]
[project @ 1999-12-09 12:30:56 by simonpj]
A bunch of small changes in the way that usage information
is generated to stuff into interface files.  I'm not certain
anything was really wrong before, but it's tidier now, and
there are slightly fewer dependencies generated.  Main
differences are in RnIfaces.getImportVersions

I also made the check for orphan rules a bit cleverer
(Rename.isOrphanDecl) so that we get fewer spurious orphan modules.

Simon

24 years ago[project @ 1999-12-09 11:25:44 by simonmar]
simonmar [Thu, 9 Dec 1999 11:25:45 +0000 (11:25 +0000)]
[project @ 1999-12-09 11:25:44 by simonmar]
Remove bogus #! lines.

Obtained-from: Michael Weber <michael.weber@post.rwth-aachen.de>

24 years ago[project @ 1999-12-09 11:24:05 by simonmar]
simonmar [Thu, 9 Dec 1999 11:24:05 +0000 (11:24 +0000)]
[project @ 1999-12-09 11:24:05 by simonmar]
cleanups & fixes

Obtained-from: Michael Weber <michael.weber@post.rwth-aachen.de>

24 years ago[project @ 1999-12-09 11:23:16 by simonmar]
simonmar [Thu, 9 Dec 1999 11:23:16 +0000 (11:23 +0000)]
[project @ 1999-12-09 11:23:16 by simonmar]
clean sgmlverb.c

Obtained-from: Michael Weber <michael.weber@post.rwth-aachen.de>

24 years ago[project @ 1999-12-09 11:22:48 by simonmar]
simonmar [Thu, 9 Dec 1999 11:22:48 +0000 (11:22 +0000)]
[project @ 1999-12-09 11:22:48 by simonmar]
recurse into libraries.

Obtained-from: Michael Weber <michael.weber@post.rwth-aachen.de>

24 years ago[project @ 1999-12-09 11:21:54 by simonmar]
simonmar [Thu, 9 Dec 1999 11:21:54 +0000 (11:21 +0000)]
[project @ 1999-12-09 11:21:54 by simonmar]
clean PrelGHC.hi in its various flavours.

Obtained-from: Michael Weber <michael.weber@post.rwth-aachen.de>

24 years ago[project @ 1999-12-08 15:47:06 by simonmar]
simonmar [Wed, 8 Dec 1999 15:47:08 +0000 (15:47 +0000)]
[project @ 1999-12-08 15:47:06 by simonmar]
misc ansification and -Wall cleanup

24 years ago[project @ 1999-12-08 14:21:52 by simonmar]
simonmar [Wed, 8 Dec 1999 14:22:00 +0000 (14:22 +0000)]
[project @ 1999-12-08 14:21:52 by simonmar]
Add Marc Van Dongen's Integer improvements.  Specifically:

- new primops: gcdInt#, gcdIntegerInt#, divExact#,
  quotInteger#, remInteger#.

- new definitions of quot and rem for Integer in
  PrelNum (using the new quotInteger# and remInteger#
  primops instead of quotRemInteger#).  Should be
  slightly faster than before.  div & mod aren't
  likewise optimised (yet).

- specialisations of gcd for Int and Integer, and
  lcm for Integer in PrelNum.