1. 22 Feb, 2003 1 commit
    • sof's avatar
      [project @ 2003-02-22 04:51:50 by sof] · 557947d3
      sof authored
      Clean up code&interfaces that deals with timers and asynchrony:
      
      - Timer.{c,h} now defines the platform-independent interface
        to the timing services needed by the RTS. Itimer.{c,h} +
        win32/Ticker.{c,h} defines the OS-specific services that
        creates/destroys a timer.
      - For win32 plats, drop the long-standing use of the 'multimedia'
        API timers and implement the ticking service ourselves. Simpler
        and more flexible.
      - Select.c is now solely for platforms that use select() to handle
        non-blocking I/O & thread delays. win32/AwaitEvent.c provides
        the same API on the Win32 side.
      - support threadDelay on win32 platforms via worker threads.
      
      Not yet compiled up on non-win32 platforms; will do once checked in.
      557947d3
  2. 21 Feb, 2003 15 commits
    • simonpj's avatar
      [project @ 2003-02-21 14:52:54 by simonpj] · d6b7d200
      simonpj authored
      Typos
      d6b7d200
    • simonpj's avatar
      [project @ 2003-02-21 14:52:31 by simonpj] · 877d4fbd
      simonpj authored
      Fix buglets in new unused-binding story
      877d4fbd
    • simonpj's avatar
      [project @ 2003-02-21 13:35:18 by simonpj] · 2565ba31
      simonpj authored
      Use old-style foreign import for bkwd compatibility
      2565ba31
    • simonpj's avatar
      [project @ 2003-02-21 13:27:53 by simonpj] · 84ed91ab
      simonpj authored
      -------------------------------------
      	Improve the "unused binding" warnings
      	-------------------------------------
      
      We've had a succession of hacks for reporting warnings for
      unused bindings.  Consider
      
      	module M( f ) where
      
       	f x = x
      
      	g x = g x + h x
      	h x = x
      
      Here, g mentions itself and h, but is not itself mentioned. So
      really both g and h are dead code.  We've been getting this wrong
      for ages, and every hack so far has failed on some simple programs.
      
      This commit does a much better job.  The renamer applied to a bunch
      of bindings returns a NameSet.DefUses, which is a dependency-ordered
      lists of def/use pairs.  It's documented in NameSet.
      Given this, we can work out precisely what is not used, in a nice
      tidy way.
      
      It's less convenient in the case of type and class declarations, because
      the strongly-connected-component analysis can span module boundaries.
      So things are pretty much as they were for these.
      
      
      As usual, there was a lot of chuffing around tidying things up.
      I havn't tested it at all thoroughly yet.
      
      Various unrelated import-decl-pruning has been done too.
      84ed91ab
    • simonpj's avatar
      [project @ 2003-02-21 13:27:30 by simonpj] · dfc75488
      simonpj authored
      Import pruning
      dfc75488
    • simonpj's avatar
      [project @ 2003-02-21 13:26:58 by simonpj] · e440a5e2
      simonpj authored
      Import pruning, use mingw32_TARGET not HOST, use old-style foreign import (for 4.08 compat)
      e440a5e2
    • simonpj's avatar
      [project @ 2003-02-21 13:25:17 by simonpj] · 4e94cbc4
      simonpj authored
      Import pruning
      4e94cbc4
    • simonpj's avatar
      [project @ 2003-02-21 13:24:06 by simonpj] · 6d7e43c4
      simonpj authored
      More tidy up
      6d7e43c4
    • simonpj's avatar
      [project @ 2003-02-21 13:02:58 by simonpj] · 97583682
      simonpj authored
      Small fix to a TH bug; this one concerning the constraint-gathering mechanism
      97583682
    • simonpj's avatar
      [project @ 2003-02-21 12:28:35 by simonpj] · 136d6345
      simonpj authored
      Another typo; sigh
      136d6345
    • simonpj's avatar
      [project @ 2003-02-21 12:26:41 by simonpj] · 35057005
      simonpj authored
      Typo
      35057005
    • simonpj's avatar
      [project @ 2003-02-21 12:16:44 by simonpj] · 802b299f
      simonpj authored
      Debugging hook jiggling
      802b299f
    • simonpj's avatar
      [project @ 2003-02-21 12:16:05 by simonpj] · 7e7c296a
      simonpj authored
      Fix a type-error in desugaring TH code
      7e7c296a
    • sof's avatar
      [project @ 2003-02-21 05:34:12 by sof] · 5b4f5a6a
      sof authored
      Asynchronous / non-blocking I/O for Win32 platforms.
      
      This commit introduces a Concurrent Haskell friendly view of I/O on
      Win32 platforms. Through the use of a pool of worker Win32 threads, CH
      threads may issue asynchronous I/O requests without blocking the
      progress of other CH threads. The issuing CH thread is blocked until
      the request has been serviced though.
      
      GHC.Conc exports the primops that take care of issuing the
      asynchronous I/O requests, which the IO implementation now takes
      advantage of. By default, all Handles are non-blocking/asynchronous,
      but should performance become an issue, having a per-Handle flag for
      turning off non-blocking could easily be imagined&introduced.
      
      [Incidentally, this thread pool-based implementation could easily be
      extended to also allow Haskell code to delegate the execution of
      arbitrary pieces of (potentially blocking) external code to another OS
      thread. Given how relatively gnarly the locking story has turned out
      to be with the 'threaded' RTS, that may not be such a bad idea.]
      5b4f5a6a
    • sof's avatar
      [project @ 2003-02-21 04:57:16 by sof] · e4341897
      sof authored
      deja vu all over again
      e4341897
  3. 20 Feb, 2003 18 commits
    • panne's avatar
      [project @ 2003-02-20 18:53:15 by panne] · caadd032
      panne authored
      * Nuked unused --with-glut-api and --with-glut-xlib arguments
      * Only check for OpenGL headers and libs when --enable-hopengl is given
      caadd032
    • simonpj's avatar
      [project @ 2003-02-20 18:34:11 by simonpj] · f9388d14
      simonpj authored
      typo
      f9388d14
    • simonpj's avatar
      [project @ 2003-02-20 18:33:50 by simonpj] · 56b5a8b8
      simonpj authored
      -------------------------------------
            Add Core Notes and the {-# CORE #-} pragma
      	-------------------------------------
      
      This is an idea of Hal Daume's. The key point is that Notes in Core
      are augmented thus:
      
        data Note
          = SCC CostCentre
          | ...
          | CoreNote String     -- NEW
      
      These notes can be injected via a Haskell-source pragma:
      
         f x = ({-# CORE "foo" #-} show) ({-# CORE "bar" #-} x)
      
      This wraps a (Note (CoreNote "foo")) around the 'show' variable,
      and a similar note around the argument to 'show'.
      
      These notes are basically ignored by GHC, but are emitted into
      External Core, where they may convey useful information.
      
      Exactly how code involving these notes is munged by the simplifier
      isn't very well defined.  We'll see how it pans out.  Meanwhile
      the impact on the rest of the compiler is minimal.
      56b5a8b8
    • simonpj's avatar
      [project @ 2003-02-20 18:27:13 by simonpj] · 8589a690
      simonpj authored
      Document {-# CORE #-} pragma (thanks to Hal Daume)
      8589a690
    • simonpj's avatar
      [project @ 2003-02-20 18:18:55 by simonpj] · 3017b35f
      simonpj authored
      Import pruning
      3017b35f
    • simonpj's avatar
      [project @ 2003-02-20 16:02:57 by simonpj] · e83fa2eb
      simonpj authored
      Add comments
      e83fa2eb
    • simonpj's avatar
      [project @ 2003-02-20 16:01:56 by simonpj] · 3194c528
      simonpj authored
      Comments and imports only
      3194c528
    • simonmar's avatar
      [project @ 2003-02-20 15:39:59 by simonmar] · 51a1c2a2
      simonmar authored
      closureSatisfiesConstraints: check whether the retainer set is valid
      before attempting to match it against a constraint.  It might not be
      valid if the object is an ex-weak-pointer which was finalized after
      the last GC.
      
      MERGE TO STABLE
      51a1c2a2
    • simonpj's avatar
      [project @ 2003-02-20 13:23:47 by simonpj] · 00227c6a
      simonpj authored
      -------------------------------------
      	   Complete an earlier TH commit
      	-------------------------------------
      
      In this earlier commit:
      
        3.  Ensure that a declaration quotation [d| ... |] does not have a
            permanent effect on the instance environment. (A TH fix.)
      
      I had forgotten to do a stage2 compile.  This commit just completes
      the earlier work.  I moved some code from TcExpr (long) to TcSplice
      (shorter) which had the happy effect of bringing related code together.
      00227c6a
    • simonpj's avatar
      [project @ 2003-02-20 13:21:15 by simonpj] · 72c98446
      simonpj authored
      -------------------------------------
         Generate correct dependencies when reading External Core
      	-------------------------------------
      
      We have to be more careful than I realised when doing strongly-connected
      component analysis of type/class decls when reading External Core.
      
      Here's the relevant new comment:
      
      --		Building edges for SCC analysis
      --
      -- When building the edges, we treat the 'main name' of the declaration as the
      -- key for the node, but when dealing with External Core we may come across
      -- references to one of the implicit names for the declaration.  For example:
      --	class Eq a where ....
      --	data :TSig a = :TSig (:TEq a) ....
      -- The first decl is sucked in from an interface file; the second
      -- is in an External Core file, generated from a class decl for Sig.
      -- We have to recognise that the reference to :TEq represents a
      -- dependency on the class Eq declaration, else the SCC stuff won't work right.
      --
      -- This complication can only happen when consuming an External Core file
      --
      -- Solution: keep an "EdgeMap" (bad name) that maps :TEq -> Eq.
      -- Don't worry about data constructors, because we're only building
      -- SCCs for type and class declarations here.  So the tiresome mapping
      -- is need only to map   [class tycon -> class]
      72c98446
    • simonpj's avatar
      [project @ 2003-02-20 13:18:10 by simonpj] · 97958a39
      simonpj authored
      Part 2 of fix :i in InteractiveUI
      97958a39
    • simonpj's avatar
      [project @ 2003-02-20 13:17:02 by simonpj] · f6176af6
      simonpj authored
      Comments only
      f6176af6
    • simonpj's avatar
      [project @ 2003-02-20 13:16:31 by simonpj] · 3251e3ba
      simonpj authored
      Another datacon-naming wibble
      3251e3ba
    • simonpj's avatar
      [project @ 2003-02-20 13:12:40 by simonpj] · b7e64112
      simonpj authored
      Fix :i in InteractiveUI
      b7e64112
    • simonpj's avatar
      [project @ 2003-02-20 13:01:20 by simonpj] · f9853a3e
      simonpj authored
      Eliminate brain-dead outputC pattern-match failure
      f9853a3e
    • simonpj's avatar
      [project @ 2003-02-20 13:00:24 by simonpj] · 5b7c931a
      simonpj authored
      Eliminate bogus string-literal duplication
      5b7c931a
    • simonpj's avatar
      [project @ 2003-02-20 12:59:55 by simonpj] · d5aa9c5d
      simonpj authored
      Compile binary stuff with -O always
      d5aa9c5d
    • simonmar's avatar
      [project @ 2003-02-20 11:45:24 by simonmar] · 710316df
      simonmar authored
      Add -fvia-C to utils/Panic_HC_OPTS, and remove it from main/Main_HC_OPTS.
      710316df
  4. 19 Feb, 2003 6 commits
    • sof's avatar
      [project @ 2003-02-19 16:38:35 by sof] · 1e7f4834
      sof authored
      odir-ify prelude/PrimOp.o dependency
      1e7f4834
    • simonpj's avatar
      [project @ 2003-02-19 16:30:17 by simonpj] · ed6a7f5b
      simonpj authored
      Document phase control
      ed6a7f5b
    • simonpj's avatar
      [project @ 2003-02-19 15:54:05 by simonpj] · 3355c9d5
      simonpj authored
      -------------------------------------
      	 	Two minor wibbles
      	-------------------------------------
      
      
      1.  Make the generic toT/fromT Ids for "generic derived classes" into
          proper ImplicitIds, with their own GlobalIdDetails. This makes it
          easier to identify them.  (The lack of this showed up as a bug
          when I made an apparently-innocuous other change.)
      
      2.  Distinguish ClassOpIds from RecordSelIds in their GlobalIdDetails.
          They are treated differently here and there, so I made this change
          as part of (1)
      
      3.  Ensure that a declaration quotation [d| ... |] does not have a
          permanent effect on the instance environment. (A TH fix.)
      3355c9d5
    • simonpj's avatar
      [project @ 2003-02-19 13:05:45 by simonpj] · f761d6d0
      simonpj authored
      Wibbles to the new datacon story; fixes ds002
      f761d6d0
    • simonmar's avatar
      [project @ 2003-02-19 11:52:42 by simonmar] · d7a583e3
      simonmar authored
      Add note to description of -no-hs-main: it forces linking in --make
      mode too.
      d7a583e3
    • simonmar's avatar
      [project @ 2003-02-19 11:51:35 by simonmar] · 5c9bcb9b
      simonmar authored
      If -no-hs-main is specified in --make mode, attempt linking even when
      there's no Main module.
      
      Fixes bug #686620
      
      MERGE TO STABLE
      5c9bcb9b