1. 09 Mar, 2000 2 commits
    • panne's avatar
      [project @ 2000-03-09 13:28:08 by panne] · 93522b22
      panne authored
      Removed a typo, i.e. ]\begin{code} => \begin{code}
      93522b22
    • andy's avatar
      [project @ 2000-03-09 06:14:38 by andy] · 7bc3ecec
      andy authored
      improving the synatax and semantics of the privileged import
      
       Typical use might be:
      
        import Prelude
        import privileged Prelude ( IORef , unsafePerformIO )
      
       Which means please ignore the export that comes with Prelude,
       and let me at compiler internal magic operations, IORef and
       unsafePerformIO (both are later exported by IOExt)
      
      I've also updated the stdlib files to use this (hugs only :-).
      7bc3ecec
  2. 06 Mar, 2000 1 commit
  3. 18 Jan, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-01-18 12:44:37 by simonmar] · 382ca27d
      simonmar authored
      Don't hold the lock on the Handle while we block waiting for data on a
      read.  This is a partial solution to the general problem of holding a
      lock on the Handle while in mayBlock.
      382ca27d
  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. 23 Nov, 1999 1 commit
  6. 22 Nov, 1999 3 commits
  7. 19 Nov, 1999 1 commit
  8. 01 Nov, 1999 1 commit
  9. 29 Oct, 1999 1 commit
    • andy's avatar
      [project @ 1999-10-29 01:16:48 by andy] · f608faec
      andy authored
      Adding in the modified versions of the Standard Haskell 98 libraries.
      These should compile under both Hugs and GHC.
      
      use the flags  -D__HUGS__ -DUSE_REPORT_PRELUDE to extract the Hugs src.
      f608faec
  10. 19 Sep, 1999 1 commit
  11. 23 Aug, 1999 1 commit
    • keithw's avatar
      [project @ 1999-08-23 12:53:23 by keithw] · d392968d
      keithw authored
      Revert commit of 1999/06/12 16:17:28.  We use -traditional for CPP,
      and so x##y and #x don't work and we must use x/**/y (ugh) and "x"
      (urk!!) instead.  Ah well.
      d392968d
  12. 25 Jun, 1999 1 commit
  13. 12 Jun, 1999 1 commit
  14. 01 Jun, 1999 1 commit
  15. 18 May, 1999 1 commit
  16. 10 May, 1999 1 commit
    • sof's avatar
      [project @ 1999-05-10 16:55:43 by sof] · d993f5b0
      sof authored
      The implementation of hGetLine, as given in the report, doesn't handle
      partial lines on unbuffered handles that well (not at all, as it turns
      out). Fixed.
      d993f5b0
  17. 15 Jan, 1999 1 commit
    • sof's avatar
      [project @ 1999-01-15 17:54:20 by sof] · b9bd8aed
      sof authored
      Re-integrated mod. that seems to have been dropped on the
      floor when new-rts moved back onto the main trunk. Here's
      the commit msg. that was originally used:
      
        Extend hConnectTo to also allow output handles to be connected, i.e.,
      
          h1 <- openFile "foo" WriteMode
          h2 <- openFile "bar" WriteMode
          hConnectTo h1 h2
      
        will cause h1's buffer to be flushed when h2's buffer overflows
        (and it is just about to be flushed.) The implementation is currently
        not as lazy as that, it flushes h1's buffer regardless of whether a
        write to h2 causes h2's buffer to overflow or not.
      
        This is used to connect 'stderr' and 'stdout', i.e., output on
        'stderr' will now cause 'stdout' output to (first) be flushed.
      b9bd8aed
  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. 23 Nov, 1998 1 commit
    • sof's avatar
      [project @ 1998-11-23 15:44:21 by sof] · bbe9c555
      sof authored
      Extend hConnectTo to also allow output handles to be connected, i.e.,
      
          h1 <- openFile "foo" WriteMode
          h2 <- openFile "bar" WriteMode
          hConnectTo h1 h2
      
        will cause h1's buffer to be flushed when h2's buffer overflows
        (and it is just about to be flushed.) The implementation is currently
        not as lazy as that, it flushes h1's buffer regardless of whether h2's
        buffer overflows or not.
      
        This is used to connect 'stderr' and 'stdout', i.e., output on
        'stderr' will now cause 'stdout' output to (first) be flushed.
      bbe9c555
  21. 11 Nov, 1998 1 commit
  22. 27 Aug, 1998 1 commit
  23. 14 Aug, 1998 1 commit
  24. 22 Jul, 1998 1 commit
  25. 29 Jun, 1998 1 commit
  26. 19 Jun, 1998 1 commit
  27. 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
  28. 07 Apr, 1998 1 commit
  29. 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
  30. 28 Jan, 1998 1 commit
  31. 19 Jan, 1998 1 commit
  32. 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
  33. 24 Nov, 1997 2 commits
  34. 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
  35. 21 Oct, 1997 1 commit
  36. 13 Oct, 1997 1 commit
    • simonm's avatar
      [project @ 1997-10-13 16:12:54 by simonm] · df10403c
      simonm authored
      Changes to unbox the state in the ST and IO monads.
      
      ST now has type
      
      	newtype ST s a = ST (State# s -> STret s a)
      	data STret s a = STret (State# s) a
      
      IO now has type
      
      	newtype IO a = IO (State# RealWorld -> IOResult a)
      	data IOResult a = IOok   (State# RealWorld) a
      	                | IOfail (State# RealWorld) IOError
      
      So ST should be slightly more efficient, and IO should be nearly as
      efficient as ST.
      df10403c