This project is mirrored from Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 31 Jan, 2000 1 commit
  2. 30 Jan, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-01-30 10:25:27 by simonmar] · ca2ab438
      simonmar authored
      Change the type of catch# to
      	catch# :: (W# -> (# W#, a #))
      	       -> (b -> W# -> (# W#, a #))
      	       -> W# -> (# W# , a #)
      where W# == State# RealWorld.  In other words, make it explicit that
      catch# is an IO operation and takes IO operations as arguments.  The
      previous type was too general, and resulted in catch# having the wrong
      arity which could cause mis-optimisations.
      The down side is that we now have to pass the state token around
      inside the primop instead of doing it in the Haskell wrapper, and
      raiseAsync() also has to build a PAP(handler,exception,realworld)
      instead of just a PAP(handler,exception) when it invokes a handler as
      a result of an async exception.
      I also added some optimisations to (un)?blockAsyncException to not
      grow the stack if it can be avoided, such as when we're about to block
      async exceptions and there's a blockAsyncExceptions_ret stack frame on
      the top of the stack.
  3. 04 Jan, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-01-04 17:40:46 by simonpj] · 5ca77490
      simonpj authored
      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.
  4. 20 Dec, 1999 1 commit
  5. 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.
  6. 01 Dec, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-12-01 14:34:38 by simonmar] · e1dc924b
      simonmar authored
      Support for blocking & unblocking asynchronous exceptions.
        - new primops:
      	blockAsyncExceptions#, unblockAsyncExceptions# :: IO a -> IO a
        - raiseInThread will block if the target thread is currently
          blocking async exceptions.
        - async exceptions are currently implicitly blocked inside
          an exception handler.  This decision might be reversed when
          we have more experience with this stuff.
        - Move exception-related stuff in the RTS into its own file,
  7. 24 Aug, 1999 1 commit
    • simonpj's avatar
      [project @ 1999-08-24 08:52:25 by simonpj] · ac049528
      simonpj authored
      Make primOpHasSideEffects return True for the various Write primops.
      Amazingly, this wasn't done, and that meant that Write operations
      could be silently discarded!  This broke the GHC typechecker
      (actually the implementation of checkNoErrsTc, showed up in
      deriving code)
  8. 27 Jul, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-07-27 11:09:31 by simonmar] · 3c40d602
      simonmar authored
      Allow mkWeak# to take an unlifted type as the key argument.  The
      intention is that boxed-but-unlifted types can be used as keys, not
      unlifted types in general but there's no way to enforce this at the
  9. 22 Jun, 1999 1 commit
  10. 08 Jun, 1999 1 commit
  11. 28 May, 1999 1 commit
    • simonpj's avatar
      [project @ 1999-05-28 19:24:26 by simonpj] · f016a43f
      simonpj authored
      Enable rules for simplification of SeqOp
      Fix a related bug in WwLib that made it look as if the binder
      in a case expression was being demanded, when it wasn't.
  12. 18 May, 1999 1 commit
  13. 11 May, 1999 1 commit
    • keithw's avatar
      [project @ 1999-05-11 16:37:29 by keithw] · d133b73a
      keithw authored
      (this is number 4 of 9 commits to be applied together)
        The major purpose of this commit is to introduce usage information
        and usage analysis into the compiler, per the paper _Once Upon a
        Polymorphic Type_ (Keith Wansbrough and Simon Peyton Jones, POPL'99,
        and Glasgow TR-1998-19).
        Usage information has been added to types, in the form of a new kind
        of NoteTy: (UsgNote UsageAnn(UsOnce|UsMany|UsVar UVar)).  Usages
        print as __o (once), __m (many, usually omitted), or (not in
        interface files) __uvxxxx.  Usage annotations should only appear at
        certain places in a type (see the paper).  The `default' annotation
        is __m, and so an omitted annotation implies __m.  Utility functions
        for handling usage annotations are provided in Type.
        If the compiler is built with -DUSMANY (a flag intended for use in
        debugging by KSW only), __m are *required* and may not be omitted.
        The major constraint is that type arguments (eg to mkAppTy) must be
        unannotated on top.  To maintain this invariant, many functions
        required the insertion of Type.unUsgTy (removing annot from top of a
        type) or UsageSPUtils.unannotTy (removing all annotations from a
        type).  A function returning usage-annotated types for primops has
        been added to PrimOp.
        A new kind of Note, (TermUsg UsageAnn), has been added to annotate
        Terms.  This note is *not* printed in interface files, and for the
        present does not escape the internals of the usage inference engine.
  14. 27 Apr, 1999 1 commit
  15. 23 Apr, 1999 1 commit
    • simonm's avatar
      [project @ 1999-04-23 13:53:28 by simonm] · 699e9f22
      simonm authored
      Support for
      	dataToTag# :: a -> Int#  (if a is a data type)
      and (partial) support for
      	tagToEnum# :: Int# -> a  (if a is an enumerated type)
      The con2tag functions generated by derived Eq,Ord and Enum instances
      are now replaced by dataToTag# for data types with a large number of
  16. 16 Mar, 1999 1 commit
    • simonm's avatar
      [project @ 1999-03-16 13:20:07 by simonm] · 456eca73
      simonm authored
      Improvements to the threading model.
         - asynchronous exceptions supported.
      	- killThread# can now raise an exception in the specified
      	  thread.  It's new type is
      		killThread# :: ThreadId# -> Exception -> IO ()
      	  High-level versions:
      		killThread :: ThreadId -> IO ()
      		raiseInThread :: ThreadId -> Exception -> IO ()
      	  (killThread raises a 'ThreadKilled' exception in the
      	   specified thread).
      	  If the thread has no exception handler, it is killed
      	  as before.  Otherwise, the exception is passed to
      	  the innermost CATCH_FRAME and the thread is woken up
      	  if it was blocked.  The current computation is
      	  suspended, instead of being replaced by the exception
      	  (as is the case with throw).
      	  Sending an exception to the current thread works too.
         - new primitive: myThreadId# :: IO ThreadId# and corresponding
           high-level version myThreadId :: IO ThreadId.
         - new primitive: yield# :: IO (), and yield :: IO ().
         - the TSO now contains a pointer to the resource currently blocked
           on (MVAR or BLACKHOLE_BQ).
        - Add a giant comment to TSO.h about what the various link fields
          are supposed to do, and invariants etc.
  17. 05 Mar, 1999 1 commit
    • sof's avatar
      [project @ 1999-03-05 10:21:22 by sof] · 9b910bc8
      sof authored
      Support for unsafely thawing your (Byte)Arrays, i.e., added the
      following ops:
       MutableArray.unsafeThawArray :: Ix ix => Array ix elt -> ST s (MutableArray s ix elt)
       MutableArray.unsafeThawByteArray :: Ix ix => ByteArray ix -> ST s (MutableByteArray s ix)
       MutableArray.thawByteArray :: Ix ix => ByteArray ix -> ST s (MutableByteArray s ix)
       ST.unsafeThawSTArray 	    :: Ix ix => Array ix elt -> ST s (STArray s ix elt)
       LazyST.unsafeThawSTArray   :: Ix ix => Array ix elt -> ST s (STArray s ix elt)
       IOExts.unsafeFreezeIOArray :: Ix ix => IOArray ix elt -> IO (Array ix elt)
       IOExts.unsafeThawIOArray   :: Ix ix => Array ix elt -> IO (IOArray ix elt)
      + removed the re-exportation of Monad that ST and LazyST did.
  18. 18 Feb, 1999 1 commit
    • simonm's avatar
      [project @ 1999-02-18 12:26:11 by simonm] · e58d0e9b
      simonm authored
      Add two new operations to StgPrimFloat.c:
      for encoding floats/doubles from small integers.  This avoids having
      to convert small integers to large ones before an encodeFloat
      operation, and fixes the two cases of slowdown in nofib after the
      small integer changes.
      	- remove encodeFloat and decodeFloat as primops
      	- use foreign import for encode{Float,Double} and
      	  the various isNaN etc. ccalls in PrelNumExtra.
  19. 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.
  20. 11 Feb, 1999 1 commit
    • simonm's avatar
      [project @ 1999-02-11 14:22:53 by simonm] · b41f38a4
      simonm authored
      - s/finalise/finalize/g
      - make finalize run the finalizer immediately, and wait for its completion
      - make mkWeak take a (Maybe (IO ())) for the finalizer argument
      - remove mkWeakNoFinalizer
  21. 01 Feb, 1999 1 commit
  22. 27 Jan, 1999 1 commit
    • simonpj's avatar
      [project @ 1999-01-27 14:51:14 by simonpj] · 18976e61
      simonpj authored
      Finally!  This commits the ongoing saga of Simon's hygiene sweep
      a) The 'unused variable' warnings from the renamer work.  
      b) Better error messages here and there, esp type checker
      c) Fixities for Haskell 98 (maybe I'd done that before)
      d) Lazy reporting of name clashes for Haskell 98 (ditto)
      a) type OccName has its own module.  OccNames are represented
         by a single FastString, not three as in the last round.  This
         string is held in Z-encoded form; a decoding function decodes
         for printing in user error messages.  There's a nice tight
         encoding for (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
      b) type Module is a proper ADT, in module OccName
      c) type RdrName is a proper ADT, in its own module
      d) type Name has a new, somwhat tidier, representation
      e) much grunting in the renamer to get Provenances right.
         This makes error messages look better (no spurious qualifiers)
  23. 26 Jan, 1999 1 commit
    • simonm's avatar
      [project @ 1999-01-26 11:12:41 by simonm] · ed4cd6d4
      simonm authored
      - Add Stable Names
      - Stable pointers and stable names are now both provided by the
        "Stable" module in ghc/lib/exts.  Documentation is updated, and Foriegn
        still exports the stable pointer operations for backwards compatibility.
  24. 15 Jan, 1999 1 commit
  25. 14 Jan, 1999 2 commits
    • sof's avatar
      [project @ 1999-01-14 19:53:57 by sof] · 0fffbea8
      sof authored
      Fixes to support .hi unfoldings containing "_ccall_ dynamic"s
    • sof's avatar
      [project @ 1999-01-14 17:58:41 by sof] · 3160f854
      sof authored
      Assorted minor Haskell 98 changes:
        * Maximal munch rule for "--" comments
        * _ as lower-case letter, "_" is a reserved id. Prefixing unused
          variable names in patterns with '_' causes the renamer not to
          report such names as being unused.
        * allow empty decls
        * comprehensions are now list comprehensions, not monadic.
        * use to signal pattern matching errors within
          do expressions.
        * remove record punning.
        * empty contexts are now legal  (go wild!)
        * allow records with no fields
        * allow newtypes with a labelled field
        * default default is now (Integer, Double)
        * turn off defaulting mechanism for args & res to a _ccall_.
        * allow LHSs of the form  (a -.- b) x = ...
        * Main.main can now have type (IO a)
        * nuked Void (and its use in the compiler sources.)
        * deriving machinery for Enum now also generate 'succ' and 'pred'
          method bindings.
  26. 23 Dec, 1998 2 commits
  27. 22 Dec, 1998 1 commit
    • simonpj's avatar
      [project @ 1998-12-22 16:31:28 by simonpj] · 8295d9ca
      simonpj authored
      1.  Add primOpStrictness to PrimOp.lhs, and use it in
      	- the strictness analyser
      	- the simplifier
          to deal correctly with PrimOps that are non-strict.
         ToDo: use this new facility to clean up SeqOp, ParOp.
      2. Fix the instance-decl-import bug, but printing de-synonym'd types
         in interface files.
      3. Make the simplifier treat applications with an unlifted-type arg
         in the same way it would if the function was strict
         (in rebuild_strict)
  28. 18 Dec, 1998 1 commit
    • simonpj's avatar
      [project @ 1998-12-18 17:40:31 by simonpj] · 7e602b0a
      simonpj authored
      Another big commit from Simon.  Actually, the last one
      didn't all go into the main trunk; because of a CVS glitch it
      ended up in the wrong branch.
      So this commit includes:
      * Scoped type variables
      * Warnings for unused variables should work now (they didn't before)
      * Simplifier improvements:
      	- Much better treatment of strict arguments
      	- Better treatment of bottoming Ids
      	- No need for w/w split for fns that are merely strict
      	- Fewer iterations needed, I hope
      * Less gratuitous renaming in interface files and abs C
      * OccName is a separate module, and is an abstract data type
      I think the whole Prelude and Exts libraries compile correctly.
      Something isn't quite right about typechecking existentials though.
  29. 02 Dec, 1998 1 commit
  30. 09 Nov, 1998 1 commit
  31. 08 Nov, 1998 1 commit
  32. 21 Oct, 1998 1 commit
    • sof's avatar
      [project @ 1998-10-21 11:28:00 by sof] · e88bfcee
      sof authored
      - added primops for read&writing StablePtrs to ByteArrays, Adds and FOs
      - egcs crashes in odd ways when encountering the typedefs we need to
        produce when compiling 'foreign import dynamic's. To workaround the
        problem, kludgily add a CCallTypedef constructor to AbsCSyn.AbstractC
        which the flattener will produce (at the toplevel) when encountering
        CCallOps inside COptStmts.
      - augmented PrimOp.CCallOp to carry a unique when it represents a
        'foreign import dynamic' call. The CoreToStg pass ensures that these
        uniques are exactly that. They're used to eventuall generate (unique)
        typedef names.
  33. 14 Aug, 1998 1 commit
    • sof's avatar
      [project @ 1998-08-14 11:40:55 by sof] · a156da2f
      sof authored
      PrimOp.CCallOp extended to possibly use first arg as function pointer; 64-bit <--> Integer primops added, write*OffAddr primop family added; removed SraOp
  34. 17 Jul, 1998 1 commit
  35. 09 Apr, 1998 1 commit
  36. 19 Mar, 1998 1 commit
  37. 13 Mar, 1998 1 commit
  38. 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/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