1. 16 Dec, 2003 5 commits
    • simonpj's avatar
      [project @ 2003-12-16 16:18:08 by simonpj] · 32c4b4b2
      simonpj authored
      Clarify newtype deriving documentation
    • simonpj's avatar
      [project @ 2003-12-16 16:17:49 by simonpj] · daacf054
      simonpj authored
      Clarify warn-unused-bindings documention
    • simonpj's avatar
      [project @ 2003-12-16 14:27:31 by simonpj] · 064a4bf8
      simonpj authored
      comments only
    • simonmar's avatar
      [project @ 2003-12-16 13:27:31 by simonmar] · de02e02a
      simonmar authored
      Clean up Capability API
      - yieldToReturningWorker() is now yieldCapability(), and performs all
        kinds of yielding (both to returning workers and passing to other
        OS threads).  yieldCapabiltiy() does *not* re-acquire a capability.
      - waitForWorkCapabilty() is now waitForCapability().
      - releaseCapbility() also releases the capability when passing to
        another OS thread.  It is the only way to release a capability (apart
        from yieldCapability(), which calls releaseCapability() internally).
      - passCapability() and passCapabilityToWorker() now do not release the
        capability.  They just set a flag to indicate where the capabiliy
        should go when it it next released.
      Other cleanups:
        - Removed all the SMP stuff from Schedule.c.  It had extensive bitrot,
          and was just obfuscating the code.  If it is ever needed again,
          it can be resurrected from CVS.
        - Removed some other dead code in Schedule.c, in an attempt to make
          this file more manageable.
    • simonmar's avatar
      [project @ 2003-12-16 13:19:01 by simonmar] · 4ff7d0b1
      simonmar authored
  2. 15 Dec, 2003 5 commits
    • simonmar's avatar
      [project @ 2003-12-15 16:45:23 by simonmar] · 2ca13796
      simonmar authored
      Add assertion.
    • simonmar's avatar
      [project @ 2003-12-15 16:43:45 by simonmar] · 410a99e4
      simonmar authored
      Debugging output wibble
    • simonmar's avatar
      [project @ 2003-12-15 16:23:54 by simonmar] · 56a125f2
      simonmar authored
      Fix a deadlock: an OS thread returning from a C call could enter
      grabReturnCapability, grabbing the capability that was in the process
      of being passed to another thread via passCapability.  This leads to a
      deadlock shortly afterward, because the passCapability flag is still
      set, so a normal worker won't pick up the capability when it is
      Fix (not sure if this is the best fix, though): don't grab the
      capability in grabReturnCapability() if passCapabilty is set.
    • simonmar's avatar
      [project @ 2003-12-15 14:31:48 by simonmar] · 622da085
      simonmar authored
      Fix locking bug in awaitEvent(): in one code path it could return with
      sched_lock unlocked.
    • simonmar's avatar
      [project @ 2003-12-15 14:28:39 by simonmar] · ddbdee33
      simonmar authored
      Fix bogosity in implementation of ACQUIRE_LOCK/RELEASE_LOCK on Win32.
      These functions were essentially doing nothing, due to a missing
      dereference on the argument.
      I've rewritten them as inlines (to catch type errors) and added some
      checking of the return values, which should help catch errors like
      this in the future.
  3. 12 Dec, 2003 1 commit
  4. 11 Dec, 2003 3 commits
  5. 10 Dec, 2003 8 commits
    • simonmar's avatar
      [project @ 2003-12-10 17:35:48 by simonmar] · 298a8b81
      simonmar authored
      oops, forgot a reverse
    • simonmar's avatar
      [project @ 2003-12-10 17:29:26 by simonmar] · c5a2edaf
      simonmar authored
      Fix syntax error
    • simonmar's avatar
      [project @ 2003-12-10 17:25:12 by simonmar] · c7b38930
      simonmar authored
      - Move the collect* functions from HsSyn into HsUtils.  Check that we
        have a clean separation of utilties over HsSyn, with the generic
        versions in HsUtils, and the specific versions in RdrHsSyn, RnHsSyn
        and TcHsSyn as appropriate.
      - Remove the RdrBinding data type, which was really just a nested list
        with O(1) append, and use OrdList instead.  This makes it much clearer
        that there's nothing strange going on.
      - Various other minor cleanups.
    • simonmar's avatar
      [project @ 2003-12-10 17:15:44 by simonmar] · 49fabae4
      simonmar authored
      fix bogosity spotted by -Wall
    • simonmar's avatar
      [project @ 2003-12-10 14:21:36 by simonmar] · 76465093
      simonmar authored
      New file of miscellaneous utility functions over HsSyn.
    • simonmar's avatar
      [project @ 2003-12-10 14:15:16 by simonmar] · 55042138
      simonmar authored
      Add accurate source location annotations to HsSyn
      Every syntactic entity in HsSyn is now annotated with a SrcSpan, which
      details the exact beginning and end points of that entity in the
      original source file.  All honest compilers should do this, and it was
      about time GHC did the right thing.
      The most obvious benefit is that we now have much more accurate error
      messages; when running GHC inside emacs for example, the cursor will
      jump to the exact location of an error, not just a line somewhere
      nearby.  We haven't put a huge amount of effort into making sure all
      the error messages are accurate yet, so there could be some tweaking
      still needed, although the majority of messages I've seen have been
      Error messages now contain a column number in addition to the line
      number, eg.
         read001.hs:25:10: Variable not in scope: `+#'
      To get the full text span info, use the new option -ferror-spans.  eg.
         read001.hs:25:10-11: Variable not in scope: `+#'
      I'm not sure whether we should do this by default.  Emacs won't
      understand the new error format, for one thing.
      In a more elaborate editor setting (eg. Visual Studio), we can arrange
      to actually highlight the subexpression containing an error.  Eventually
      this information will be used so we can find elements in the abstract
      syntax corresponding to text locations, for performing high-level editor
      functions (eg. "tell me the type of this expression I just highlighted").
      Performance of the compiler doesn't seem to be adversely affected.
      Parsing is still quicker than in 6.0.1, for example.
      This was an excrutiatingly painful change to make: both Simon P.J. and
      myself have been working on it for the last three weeks or so.  The
      basic changes are:
       - a new datatype SrcSpan, which represents a beginning and end position
         in a source file.
       - To reduce the pain as much as possible, we also defined:
            data Located e = L SrcSpan e
       - Every datatype in HsSyn has an equivalent Located version.  eg.
            type LHsExpr id = Located (HsExpr id)
         and pretty much everywhere we used to use HsExpr we now use
         LHsExpr.  Believe me, we thought about this long and hard, and
         all the other options were worse :-)
      Additional changes/cleanups we made at the same time:
        - The abstract syntax for bindings is now less arcane.  MonoBinds
          and HsBinds with their built-in list constructors have gone away,
          replaced by HsBindGroup and HsBind (see HsSyn/HsBinds.lhs).
        - The various HsSyn type synonyms have now gone away (eg. RdrNameHsExpr,
          RenamedHsExpr, and TypecheckedHsExpr are now HsExpr RdrName,
          HsExpr Name, and HsExpr Id respectively).
        - Utilities over HsSyn are now collected in a new module HsUtils.
          More stuff still needs to be moved in here.
        - MachChar now has a real Char instead of an Int.  All GHC versions that
          can compile GHC now support 32-bit Chars, so this was a simplification.
    • wolfgang's avatar
      [project @ 2003-12-10 11:35:24 by wolfgang] · 60ea58ab
      wolfgang authored
      PowerPC Linux support for registerised compilation and native code
      generation. (object splitting and GHCi are still unsupported).
      Code for other platforms is not affected, so MERGE TO STABLE.
    • wolfgang's avatar
      [project @ 2003-12-10 10:12:13 by wolfgang] · f8026808
      wolfgang authored
      PowerPC NCG bugfix: 2-byte data objects should be .short, not .byte
  6. 09 Dec, 2003 1 commit
  7. 06 Dec, 2003 2 commits
    • panne's avatar
      [project @ 2003-12-06 18:27:37 by panne] · 71284101
      panne authored
      Fixed typo in OpenAL handling.
    • panne's avatar
      [project @ 2003-12-06 18:24:05 by panne] · b38fc90a
      panne authored
      Completely overhauled OpenGL/GLUT detection magic, making things more
      modular. Removed support for Mesa and non-HW-accelerated support on
      Windoze. Added initial support for handling missing glut.h header on
      MinGW/MSYS (to be completed). Tested on Cygwin (plain, -mno-cygwin,
      --without-x), MSYS/MinGW and SuSE 8.2 x86 Linux.
  8. 05 Dec, 2003 1 commit
  9. 02 Dec, 2003 1 commit
    • panne's avatar
      [project @ 2003-12-02 19:16:41 by panne] · e3dc3922
      panne authored
      Added the first pieces of an OpenAL binding which has been of my disk for quite
      a while. Note that it is built by default when a usable OpenAL library is found,
      but this could be disabled via --disable-openal on the configure commandline.
      Similar behaviour should probably be the default for all optional libraries.
      Note that I have created a new hierarchy rooted at "Sound", the existing
      hierarchies didn't fit.
  10. 28 Nov, 2003 2 commits
  11. 27 Nov, 2003 5 commits
  12. 26 Nov, 2003 2 commits
  13. 21 Nov, 2003 1 commit
  14. 18 Nov, 2003 3 commits