1. 06 Feb, 2002 1 commit
  2. 05 Feb, 2002 10 commits
    • sewardj's avatar
      [project @ 2002-02-05 16:56:38 by sewardj] · 0fee0e07
      sewardj authored
      [non-code-change] complaint --> compliant
    • keithw's avatar
      [project @ 2002-02-05 16:44:37 by keithw] · 6eaccd1a
      keithw authored
      Generalise types of minusUFM and intersectUFM_C (this was applied long
      ago to FiniteMap, IIRC).
      Untested: I haven't got a build tree handy, so please shoot me if this
      2-line change to two type signatures is type-incorrect.  Sorry!
    • simonpj's avatar
      [project @ 2002-02-05 15:42:04 by simonpj] · e6601808
      simonpj authored
      A bunch of related fixes concerning 'main'
      * Arrange that 'main' doesn't need to be defined in module Main;
        it can be imported.
      * The typechecker now injects a binding
      	Main.$main = PrelTopHandler.runMain main
        So the runtime system now calls Main.$main, not PrelMain.main.
        With z-encoding, this look like
      * The function
        	PrelTopHandler.runMain :: IO a -> IO ()
        wraps the programmer's 'main' in an exception-cacthing wrapper.
      * PrelMain.hs and Main.hi-boot are both removed from lib/std, along
        with multiple lines of special case handling in lib/std/Makefile.
        This is a worthwhile cleanup.
      * Since we now pick up whatever 'main' is in scope, the ranamer gets
        in on the act (RnRnv.checkMain).  There is a little more info to
        get from the renamer to the typechecker, so I've defined a new type
        Rename.RnResult (c.f. TcModule.TcResult)
      * With GHCi, it's now a warning, not an error, to omit the binding
        of main (RnEnv.checkMain)
      * It would be easy to add a flag "-main-is foo"; the place to use
        that information is in RnEnv.checkMain.
      On the way I made a new type,
      	type HscTypes.FixityEnv = NameEnv Fixity
      and used it in various places I'd tripped over
    • simonpj's avatar
      [project @ 2002-02-05 15:37:01 by simonpj] · fcd0dea6
      simonpj authored
      add renamer stuff
    • simonpj's avatar
      [project @ 2002-02-05 15:34:32 by simonpj] · 5b9d0e0f
      simonpj authored
      Add a bit of renamer documentation
    • simonpj's avatar
      [project @ 2002-02-05 15:02:23 by simonpj] · c43a63d3
      simonpj authored
      Imports only
    • simonpj's avatar
      [project @ 2002-02-05 14:46:26 by simonpj] · f50b860a
      simonpj authored
      Imports only
    • simonpj's avatar
      [project @ 2002-02-05 14:43:35 by simonpj] · 144e841e
      simonpj authored
      Imports and comments only
    • simonpj's avatar
      [project @ 2002-02-05 14:39:24 by simonpj] · c7eeb711
      simonpj authored
      Imports only
    • simonmar's avatar
      [project @ 2002-02-05 10:06:24 by simonmar] · 84a29fdd
      simonmar authored
      Fix bad bugs in deleteAllThreds: we were looping through the thread
      queues calling deleteThread() on each thread as we go, but calling
      deleteThread() has the side effect of removing the thread from the
      relevant queue, so we would end up breaking out of the loop after
      processing only a single thread.
      This may fix problems like "resurrectThreads: thread blocked in a
      strange way" seen after pressing ^C.
      Aside: we really shouldn't be using deleteThread() at all, since it
      doesn't give the thread a chance to clean up & release locks.  To be
      well-behaved a program has to catch ^C itself at the moment.
  3. 04 Feb, 2002 29 commits
    • sof's avatar
      [project @ 2002-02-04 22:17:50 by sof] · e9f0f9d7
      sof authored
      .y/.ly handling: patsubst'ery broke when HAPPY_SRCS suddenly contained two file extensions; now fixed.
    • sof's avatar
      [project @ 2002-02-04 20:56:53 by sof] · 632827e0
      sof authored
      resumeThread: ifdef threads-specific code
    • sof's avatar
      [project @ 2002-02-04 20:40:36 by sof] · be72dc05
      sof authored
      Snapshot of 'native thread'-friendly extension:
      - call-outs now work, i.e., a Concurrent Haskell thread which
        makes an external (C) call no longer stop other CH threads
        dead in their tracks. [More testing and tightening up of
        invariants reqd, this is just a snapshot].
      - separated task handling into sep. module.
    • sof's avatar
      [project @ 2002-02-04 20:26:25 by sof] · cc517f07
      sof authored
    • sof's avatar
      [project @ 2002-02-04 20:25:39 by sof] · ea0e6441
      sof authored
      startupHaskell: Scheduler startup now handles task creation
    • sof's avatar
      [project @ 2002-02-04 20:24:14 by sof] · e53c9fc7
      sof authored
      Factor out the task handling into separate 'module'.
      [Tasks represent native threads that execute STG code, with this
       module providing the API which the Scheduler uses to control
       their creation and destruction.]
    • sof's avatar
      [project @ 2002-02-04 20:21:16 by sof] · 2374f2fd
      sof authored
      - sm_mutex is now a Mutex (not a pthread_mutex_t).
      - sm_mutex lock/unlocks are only done for SMP builds.
    • sof's avatar
      [project @ 2002-02-04 20:18:26 by sof] · bf96cc34
      sof authored
      - renamed MutexVar to Mutex, CondVar to Condition.
      - added yieldThread().
      - simplified/specialised type of entry point to new (native) threads;
        now takes no args & returns no result.
    • sof's avatar
      [project @ 2002-02-04 20:14:56 by sof] · 237d1510
      sof authored
      simplified startup of this 'sub-system', initCapabilities() takes care of it all
    • sof's avatar
      [project @ 2002-02-04 20:12:08 by sof] · 73064dcf
      sof authored
      stat_getElapsedTime(): now visible when RTS_SUPPORTS_THREADS is defined (was: SMP only)
    • sof's avatar
      [project @ 2002-02-04 20:10:47 by sof] · 53057d6f
      sof authored
      moved {ACQUIRE,RELEASE}_LOCK to OSThreads.h
    • sewardj's avatar
      [project @ 2002-02-04 17:09:02 by sewardj] · 5316d543
      sewardj authored
      Also implement MO_32U_to_8U for sparc.  sigh.
    • sewardj's avatar
      [project @ 2002-02-04 16:47:47 by sewardj] · 4e408d57
      sewardj authored
      Implement missing MachOp, MO_8U_to_32U, for sparc.  (duh!)
    • sewardj's avatar
      [project @ 2002-02-04 16:30:20 by sewardj] · c5ab8000
      sewardj authored
      Adding section descriptions, for ELF: don't record sections satisfying
         size == 0
      The latter condition is really an optimisation based on knowledge of
      what queries will be made of the table.  Still, seems to work, and
      reduces the number of sections in the list by about a factor of 3,
      so hopefully will improve GC performance in GHCi.
      If you get wierd GC problems in GHCi ... this may be to blame.
    • simonmar's avatar
      [project @ 2002-02-04 13:59:48 by simonmar] · 5881f6a5
      simonmar authored
    • sewardj's avatar
      [project @ 2002-02-04 13:54:53 by sewardj] · 3be6a230
      sewardj authored
      Expand out use of modifyIORef because 4.08.2 doesn't have that.
    • simonmar's avatar
      [project @ 2002-02-04 12:23:02 by simonmar] · bc07c299
      simonmar authored
      HC_OPTS is now used in both .c and .hc compilations (again).
    • simonmar's avatar
      [project @ 2002-02-04 12:22:33 by simonmar] · c4b1d82b
      simonmar authored
      GhcRtsHcOpts is included in both .c and .hc compilations (again).
    • simonmar's avatar
      [project @ 2002-02-04 12:21:45 by simonmar] · e6149575
      simonmar authored
      GHC_CC_OPTS should include HC_OPTS
    • sewardj's avatar
      [project @ 2002-02-04 12:15:39 by sewardj] · 5ed6149d
      sewardj authored
      Start to record some stuff about GHCi.
    • simonpj's avatar
      [project @ 2002-02-04 12:14:50 by simonpj] · 1624ef3b
      simonpj authored
      Add a bit of documentation on implicit params
    • simonmar's avatar
      [project @ 2002-02-04 12:09:44 by simonmar] · 75d25e19
      simonmar authored
      oops, fix HC_OBJS for non-normal ways.
    • simonpj's avatar
      [project @ 2002-02-04 11:59:55 by simonpj] · 18dbe364
      simonpj authored
      	Improve type validity checking
      Two main effects here
      a) Type synonyms can be unboxed tuples
      	tupe T = (# Int, Int #)
      	f :: Int -> T
      b) Hoisting works for implicit parameters
      	f :: Int -> (?x::Int) => Int
    • simonpj's avatar
      [project @ 2002-02-04 11:58:30 by simonpj] · 41aba23a
      simonpj authored
      Correct assertion
    • simonpj's avatar
      [project @ 2002-02-04 11:57:58 by simonpj] · af9d3183
      simonpj authored
      Document hoisting and implicit quantification
    • simonmar's avatar
      [project @ 2002-02-04 11:49:33 by simonmar] · 1ba0b04c
      simonmar authored
      Tighten up syntax w.r.t. Haskell 98; this is disallowed:
      	(a `op` b) = ...
      since a parenthesised lhs must be followed by at least one parameter.
    • sewardj's avatar
      [project @ 2002-02-04 10:48:11 by sewardj] · cbebc113
      sewardj authored
      Clarify explaination about problems with x87 FPU stack invalid exceptions.
    • chak's avatar
      [project @ 2002-02-04 09:05:45 by chak] · f539427b
      chak authored
      Conformed the FFI libraries to meet the FFI Addendum 1.0 specification (except
      hs_init() and friends).
    • chak's avatar
      [project @ 2002-02-04 03:40:31 by chak] · 0299e1a1
      chak authored
      Foreign import/export declarations now conform to FFI Addendum Version 1.0
      * The old form of foreign declarations is still supported, but generates
        deprecation warnings.
      * There are some rather exotic old-style declarations which have become
        invalid as they are interpreted differently under the new scheme and there
        is no (easy) way to determine which style the programmer had in mind (eg,
        importing a C function with the name `wrapper' where the external name is
        explicitly given will not work in some situations - depends on whether an
        `unsafe' was specified and similar things).
      * Some "new" old-style forms have been introduced to make parsing a little bit
        easier (ie, avoid shift/reduce conflicts between new-style and old-style
        grammar rules), but they are few, arcane, and don't really hurt (and I won't
        tell what they are, you need to find that out by yourself ;-)
      * The FFI Addendum doesn't specify whether a header file that is requested for
        inclusion by multiple foreign declarations should be included only once or
        multiple times.  GHC at the moment includes an header as often as it appears
        in a foreign declaration.  For properly written headers, it doesn't make a
        difference anyway...
      * Library object specifications are currently silently ignored.  The feature
        was mainly requested for external calls in .NET (ie, calls which invoke C
        routines when Haskell is compiled to ILX), but those don't seem to be
        supported yet.
      * Foreign label declarations are currently broken, but they were already
        broken before I started messing with the stuff.
      The code is moderately tested.  All modules in lib/std/ and hslibs/lang/
      (using old-style declarations) still compile fine and I have run a couple of
      tests on the different forms of new-style declarations.