1. 12 Jan, 2000 2 commits
  2. 06 Jan, 2000 1 commit
  3. 20 Dec, 1999 1 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
      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.
      e921b2e3
  4. 15 Dec, 1999 1 commit
  5. 10 Dec, 1999 1 commit
  6. 08 Dec, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-12-08 14:21:52 by simonmar] · 9c370d69
      simonmar authored
      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.
      9c370d69
  7. 07 Dec, 1999 4 commits
    • simonmar's avatar
      [project @ 1999-12-07 15:52:40 by simonmar] · f9716798
      simonmar authored
      Now that $(GHC) refers to an installed haskell compiler, use
      $(GHC_INPLACE) to refer to the ghc in the build tree.
      f9716798
    • sewardj's avatar
      [project @ 1999-12-07 11:49:09 by sewardj] · eaf6532a
      sewardj authored
      Add i_ALLOC_CONSTR_big (== i_ALLOC_CONSTR with a 16-bit field
      denoting offset of into table).  The large constant tables in
      nofib/spectral/hartel/nucleic2 need this.
      eaf6532a
    • sewardj's avatar
      [project @ 1999-12-07 11:22:56 by sewardj] · fffe6bca
      sewardj authored
      Remove unused machinery for computing the amount of heap a BCO will
      allocate.  This isn't used because Hugs uses the allocate() mechanism
      rather than allocating by advancing Hp.
      fffe6bca
    • sewardj's avatar
      [project @ 1999-12-07 11:14:56 by sewardj] · 6478af6d
      sewardj authored
      Don't create a new infotable for every constructor application.
      Amazingly, that's what the codegen.c used to do.  It didn't generate
      vast numbers of redundant infotables until recently, when I changed
      translate.c to generate saturated constructor applications in line.
      Prior to that, there was only ever one application of each constructor,
      so the old scheme was ok.
      
      Also, fix the assembler so that info table ptrs are commoned up.
      Eg, for [1,2,3], store only one copy of the address of the (:) itbl,
      rather than 3, in the BCO.
      6478af6d
  8. 03 Dec, 1999 1 commit
  9. 02 Dec, 1999 1 commit
  10. 01 Dec, 1999 7 commits
  11. 30 Nov, 1999 1 commit
  12. 29 Nov, 1999 2 commits
    • sewardj's avatar
      [project @ 1999-11-29 18:59:23 by sewardj] · b3c8ae4e
      sewardj authored
      Make StgHugs use the same naming scheme as GHC does for class +
      instance machinery.
      
      Add machinery to do Z-encoding/decoding of names extracted from
      interface files.
      
      Make the ELF object loader work again.  It seemed to have suffered
      slight bitrot over the past couple of months.  Fix various minor bugs.
      
      Track a small change in interface file syntax.
      
      Make Printer.c print tagged-unboxed stack sections in a decent way
      now that Alastair-style stack tags have been abandoned.
      b3c8ae4e
    • keithw's avatar
      [project @ 1999-11-29 12:02:42 by keithw] · 0ee48772
      keithw authored
      This commit adds the new RTS option `-xc', which prints the current
      cost-centre stack to stderr whenever an exception is raised.  This is
      intended to be a debugging tool, to help trace those "Prelude.head:
      empty list" errors that are so frustrating to find.
      
      `-xc' is only available for programs compiled with -prof, and you
      probably want -auto as well to get useful information.
      
      This is currently experimental; it would be better if it only
      displayed the info for *uncaught* exceptions, but this is harder to
      implement.
      
      This commit also makes an OFTEL-inspired extension to the RTS option
      space.  Since we've almost run out of options, `-x' is now reserved
      for `extended' options.  `-xc' is the first of these, but that leaves
      '-x[0-9A-Zabd-wyz]' still to be used!  The prefix `-xx' is reserved
      for future extension.
      0ee48772
  13. 24 Nov, 1999 1 commit
  14. 22 Nov, 1999 2 commits
  15. 19 Nov, 1999 3 commits
  16. 18 Nov, 1999 2 commits
    • sewardj's avatar
      [project @ 1999-11-18 16:02:17 by sewardj] · d3cb7bf5
      sewardj authored
      Minor bugfixes for concurrency support in Hugs.
      
      Evaluator.c: correctly handle case of entering a black hole.
      Prelude.hs:  better exception catching in forkIO and primRunIO
      GC.c:        (revert_dead_CAFs): don't ASSERT(0) on a dead CAF
                   (I don't know why this assert was there)
      d3cb7bf5
    • sewardj's avatar
      [project @ 1999-11-18 12:10:17 by sewardj] · 1b39436b
      sewardj authored
      In hugs, implement ThreadId(..), instance Eq/Ord ThreadId,
      and forkIO.  Add deleteAllThreads() to scheduler so Hugs can
      clean up after evaluation.
      1b39436b
  17. 17 Nov, 1999 1 commit
  18. 16 Nov, 1999 1 commit
  19. 15 Nov, 1999 1 commit
  20. 12 Nov, 1999 2 commits
  21. 11 Nov, 1999 4 commits