1. 22 Dec, 1999 2 commits
  2. 21 Dec, 1999 2 commits
    • simonmar's avatar
      [project @ 1999-12-21 13:01:59 by simonmar] · 546d5831
      simonmar authored
      remove old unused $RTS_PREFIX I just noticed.
    • simonmar's avatar
      [project @ 1999-12-21 13:00:54 by simonmar] · 525a1e65
      simonmar authored
      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
  3. 20 Dec, 1999 8 commits
    • lewie's avatar
      [project @ 1999-12-20 22:21:09 by lewie] · 1c155370
      lewie authored
      Remove *uses* of unused IntAbsOp (see recent log message in prelude/PrimOp).
    • simonmar's avatar
      [project @ 1999-12-20 17:07:05 by simonmar] · 4f79c6ac
      simonmar authored
      Remove unused IntAbsOp
    • sewardj's avatar
      [project @ 1999-12-20 16:55:26 by sewardj] · 0f92da17
      sewardj authored
      * 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.
    • simonmar's avatar
      [project @ 1999-12-20 14:38:30 by simonmar] · 8a20e269
      simonmar authored
      3.02 hi-boot syntax wibble
    • simonpj's avatar
      [project @ 1999-12-20 10:35:47 by simonpj] · 34a4921d
      simonpj authored
      Forgot to remove PrelNumExtra in the last commit
    • simonpj's avatar
      [project @ 1999-12-20 10:34:27 by simonpj] · e921b2e3
      simonpj authored
      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
      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.
    • simonpj's avatar
      [project @ 1999-12-20 10:18:36 by simonpj] · f7989a6d
      simonpj authored
    • simonpj's avatar
      [project @ 1999-12-20 10:12:50 by simonpj] · ed974e41
      simonpj authored
      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
  4. 17 Dec, 1999 2 commits
    • sewardj's avatar
      [project @ 1999-12-17 16:34:08 by sewardj] · 3e47ab23
      sewardj authored
      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.
    • simonmar's avatar
      [project @ 1999-12-17 15:25:02 by simonmar] · b711838e
      simonmar authored
      Add netbsd to the list of platforms supported.
      ToDo: add info to the User's Guide once the Shiny New Documentation is
  5. 16 Dec, 1999 2 commits
    • sewardj's avatar
      [project @ 1999-12-16 16:42:56 by sewardj] · a8bf3684
      sewardj authored
      Add extended version of previous commit message as a comment.
    • sewardj's avatar
      [project @ 1999-12-16 16:34:40 by sewardj] · 0c97d649
      sewardj authored
      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.
  6. 15 Dec, 1999 2 commits
  7. 14 Dec, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-12-14 14:26:14 by simonmar] · 406aa1d7
      simonmar authored
      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.
  8. 13 Dec, 1999 4 commits
  9. 10 Dec, 1999 4 commits
    • simonmar's avatar
      [project @ 1999-12-10 16:24:50 by simonmar] · b90964e2
      simonmar authored
      bump version to 4.06
    • sewardj's avatar
      [project @ 1999-12-10 15:59:41 by sewardj] · 51c33894
      sewardj authored
      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
      * Add findSimpleInstance in storage.c.
    • simonmar's avatar
      [project @ 1999-12-10 15:50:10 by simonmar] · 0491574d
      simonmar authored
      Unbreak finalization.
    • simonpj's avatar
      [project @ 1999-12-10 12:33:12 by simonpj] · 5204750a
      simonpj authored
      I was too enthusiastic about removing empty usage entries
      from interface files.  This commit fixes my errors of yesterday.
  10. 09 Dec, 1999 8 commits
  11. 08 Dec, 1999 5 commits