1. 23 Mar, 2000 1 commit
  2. 29 Feb, 2000 1 commit
  3. 19 Jan, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-01-19 17:06:25 by simonmar] · d6e5fc13
      simonmar authored
      The minInt saga continues:
      
       - fix several Integer division-type functions for the
         case when the dividend == S# (-2147483648#).
      
      Pointed out by: Marc Van Dongen <dongen@cs.ucc.ie>
      d6e5fc13
  4. 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
  5. 13 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. 22 Nov, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-11-22 15:55:49 by simonmar] · d3aa7046
      simonmar authored
      Reduce the number of orphan-instance modules.  There are a few left,
      but these can't be removed without significant reorganisation due to
      recursive dependencies.
      d3aa7046
  8. 11 Nov, 1999 1 commit
  9. 06 Jul, 1999 1 commit
    • simonpj's avatar
      [project @ 1999-07-06 16:45:31 by simonpj] · 9d38678e
      simonpj authored
      All Simon's recent tuning changes.  Rough summary follows:
      
      * Fix Kevin Atkinson's cant-find-instance bug.  Turns out that Rename.slurpSourceRefs
        needs to repeatedly call getImportedInstDecls, and then go back to slurping
        source-refs.  Comments with Rename.slurpSourceRefs.
      
      * Add a case to Simplify.mkDupableAlt for the quite-common case where there's
        a very simple alternative, in which case there's no point in creating a
        join-point binding.
      
      * Fix CoreUtils.exprOkForSpeculation so that it returns True of (==# a# b#).
        This lack meant that
      	case ==# a# b# of { True -> x; False -> x }
        was not simplifying
      
      * Make float-out dump bindings at the top of a function argument, as
        at the top of a let(rec) rhs.  See notes with FloatOut.floatRhs
      
      * Make the ArgOf case of mkDupableAlt generate a OneShot lambda.
        This gave a noticeable boost to spectral/boyer2
      
      
      * Reduce the number of coerces, using worker/wrapper stuff.
        The main idea is in WwLib.mkWWcoerce.  The gloss is that we must do
        the w/w split even for small non-recursive things.  See notes with
        WorkWrap.tryWw.
      
      * This further complicated getWorkerId, so I finally bit the bullet and
        make the workerInfo field of the IdInfo work properly, including
        under substitutions.  Death to getWorkerId.  Kevin Glynn will be happy.
      
      * Make all lambdas over realWorldStatePrimTy
        into one-shot lambdas.  This is a GROSS HACK.
      
      * Also make the occurrence analyser aware of one-shot lambdas.
      
      * Make various Prelude things into INLINE, so that foldr doesn't
        get inlined in their body, so that the caller gets the benefit
        of fusion.  Notably in PrelArr.lhs.
      9d38678e
  10. 28 May, 1999 1 commit
  11. 18 May, 1999 1 commit
  12. 19 Feb, 1999 1 commit
  13. 17 Feb, 1999 1 commit
    • simonm's avatar
      [project @ 1999-02-17 15:57:20 by simonm] · 449deb80
      simonm authored
      Fast Integers.  The rep. of Integers is now
      
      	data Integer = S# Int#
      		     | J# Int# ByteArray#
      
      - several new primops added for overflow-detecting arithmetic
      - negateInteger# removed; it can be done directly
      - integer_0, integer_1 etc. removed.
      - the compiler now uses S# where it previously used int2Integer.
      - the compiler generates small integers for -2^32 .. 2^32-1, instead
        of -2^29 .. -2^29-1.
      
      - PrelST.State datatype moved to LazyST (its only use).
      - some library code (in Time.lhs) still needs cleaning up, it depends
        on the Integer rep.
      449deb80
  14. 01 Feb, 1999 1 commit
  15. 23 Jan, 1999 1 commit
    • sof's avatar
      [project @ 1999-01-23 17:43:21 by sof] · 4d38d072
      sof authored
      Changed the various Ix.range methods, to specifically check whether we're
      dealing with an empty range or not. As it was, empty array weren't handled
      properly.
      4d38d072
  16. 21 Jan, 1999 1 commit
    • sof's avatar
      [project @ 1999-01-21 20:15:30 by sof] · 4864e32a
      sof authored
      Enum instances updated to comply with the behaviour that
      Haskell 98 specifies. Notable changes,
      
        * [a..b] is not the empty list when a>b any longer.
        * [x..] and [x,y..] for Enum Int are now bounded lists.
      
      The first change is might be worth bearing in mind when converting
      1.4 code to Haskell 98; functions may have made use of the
      old behaviour.
      4864e32a
  17. 19 Jan, 1999 1 commit
  18. 14 Jan, 1999 1 commit
    • sof's avatar
      [project @ 1999-01-14 18:12:47 by sof] · 0d65c162
      sof authored
      Changes to make the Prelude comply with Haskell 98.
      
      I claim that this completes GHC's implementation of Haskell 98 (at
      least feature-wise, but there's bound to be some bugs lurking..)
      0d65c162
  19. 02 Dec, 1998 1 commit
  20. 21 Oct, 1998 1 commit
  21. 30 Sep, 1998 1 commit
  22. 27 Aug, 1998 1 commit
  23. 02 Jul, 1998 1 commit
  24. 22 May, 1998 1 commit
    • simonm's avatar
      [project @ 1998-05-22 15:57:05 by simonm] · 6bfd2f54
      simonm authored
      - Add NOINLINE pragmas to the unsafe things (unsafe*IO, unsafe*ST, runST etc.)
      - Move unsafe function back into the proper modules
      - Remove PrelUnsafe*.lhs
      6bfd2f54
  25. 06 May, 1998 1 commit
  26. 11 Mar, 1998 1 commit
  27. 02 Feb, 1998 1 commit
    • simonm's avatar
      [project @ 1998-02-02 17:27:26 by simonm] · 28139aea
      simonm authored
      Library re-organisation:
      
      All libraries now live under ghc/lib, which has the following structure:
      
      	ghc/lib/std    		--  all prelude files 		(libHS.a)
      	ghc/lib/std/cbits
      
      	ghc/lib/exts		-- standard Hugs/GHC extensions (libHSexts.a)
      				-- available with '-fglasgow-exts'
      
      	ghc/lib/posix		-- POSIX library                (libHSposix.a)
      	ghc/lib/posix/cbits     -- available with '-syslib posix'
      
      	ghc/lib/misc		-- used to be hslibs/ghc	(libHSmisc.a)
      	ghc/lib/misc/cbits	-- available with '-syslib misc'
      
      	ghc/lib/concurrent	-- Concurrent libraries		(libHSconc.a)
      				-- available with '-concurrent'
      
      Also, several non-standard prelude modules had their names changed to begin
      with 'Prel' to reduce namespace pollution.
      
      	Addr      ==> PrelAddr     (Addr interface available in 'exts')
      	ArrBase   ==> PrelArr
      	CCall     ==> PrelCCall    (CCall interface available in 'exts')
      	ConcBase  ==> PrelConc
      	GHCerr    ==> PrelErr
      	Foreign   ==> PrelForeign  (Foreign interface available in 'exts')
      	GHC       ==> PrelGHC
      	IOHandle  ==> PrelHandle
      	IOBase    ==> PrelIOBase
      	GHCmain   ==> PrelMain
      	STBase    ==> PrelST
      	Unsafe    ==> PrelUnsafe
      	UnsafeST  ==> PrelUnsafeST
      28139aea
  28. 22 Jan, 1998 1 commit
    • sof's avatar
      [project @ 1998-01-22 15:54:43 by sof] · 552de7b4
      sof authored
      * removed ghc/Error.{lhs,hi-boot}
      * moved contents of Error to GHCerr + adjusted
        import lists of files that use old Error functionality.
      * moved seqError from Prelude to GHCerr.
      552de7b4
  29. 08 Jan, 1998 1 commit
    • simonm's avatar
      [project @ 1998-01-08 18:03:08 by simonm] · 9dd6e1c2
      simonm authored
      The Great Multi-Parameter Type Classes Merge.
      
      Notes from Simon (abridged):
      
      * Multi-parameter type classes are fully implemented.
      * Error messages from the type checker should be noticeably improved
      * Warnings for unused bindings (-fwarn-unused-names)
      * many other minor bug fixes.
      
      Internally there are the following changes
      
      * Removal of Haskell 1.2 compatibility.
      * Dramatic clean-up of the PprStyle stuff.
      * The type Type has been substantially changed.
      * The dictionary for each class is represented by a new
        data type for that purpose, rather than by a tuple.
      9dd6e1c2
  30. 24 Nov, 1997 1 commit
  31. 11 Nov, 1997 1 commit
    • simonm's avatar
      [project @ 1997-11-11 14:32:34 by simonm] · a138ab7b
      simonm authored
      Library changes to:
      
      	* remove PrimIO
      	* change type of _ccall_ to IO
      	* incorporate Alastair Reid's new library interfaces for
      	  compatibility with Hugs.
      a138ab7b
  32. 05 Oct, 1997 1 commit
  33. 05 Jul, 1997 1 commit
  34. 03 Jun, 1997 1 commit
  35. 18 May, 1997 1 commit
  36. 13 Apr, 1997 1 commit
  37. 20 Mar, 1997 2 commits
  38. 14 Mar, 1997 1 commit
  39. 18 Jan, 1997 1 commit