1. 18 Dec, 2003 6 commits
  2. 17 Dec, 2003 6 commits
    • sof's avatar
      [project @ 2003-12-17 17:29:28 by sof] · 911a9fad
      sof authored
      merge rev. 1.106.2.3
      911a9fad
    • sof's avatar
      [project @ 2003-12-17 17:18:27 by sof] · 920a3de7
      sof authored
      merge rev. 1.128.2.11
      920a3de7
    • simonmar's avatar
      [project @ 2003-12-17 12:17:18 by simonmar] · 39dbe3c2
      simonmar authored
      Fix up following changes to the Capability API.  (strange, I'm *sure*
      I tested this stuff...)
      39dbe3c2
    • simonpj's avatar
      [project @ 2003-12-17 11:43:13 by simonpj] · 9d458d01
      simonpj authored
      ---------------------------------
        Gate in a few more instance decls
        ---------------------------------
      
      When we have
      	instance T a where...
      
      we need to suck in the instance decl rather more aggressively than we
      were.  (A case I hadn't thought of because it only happens with
      undecideable instances.)
      9d458d01
    • simonpj's avatar
      [project @ 2003-12-17 11:29:40 by simonpj] · ca0b7c66
      simonpj authored
      -----------------------------------------------------
        Fix a subtle loop in the context-reduction machinery
        ----------------------------------------------------
      
      This bug was provoked by a recent change: when trying to prove
      a constraint C, TcSimplify.reduce now adds C to the database before
      trying to prove C, thus building recursive dictionaries.
      
      Two bugs
      a) If we add C's superclasses (which we were) we can now build a
         bogusly-recursive dictionary (see Note [SUPERCLASS-LOOP]).
         Solution: in reduce, add C only (via addIrred NoSCs) and then
         later use addWanted to add its definition plus SCs.
      
      b) Since we can have recursive definitions, the superclass-loop
         handling machinery (findAllDeps) must carry its visited-set
         with it (which it was not doing before)
      
      
      The main file is TcSimplify; but I modified a bunch of others to
      take advantage of new function extendVarSetList
      ca0b7c66
    • panne's avatar
      [project @ 2003-12-17 08:38:14 by panne] · 69e27f1d
      panne authored
      To get wglGetProcAddress on Windows, we have to link with
      opengl32.dll, too, even when we are using Cygwin with X11.
      69e27f1d
  3. 16 Dec, 2003 12 commits
  4. 15 Dec, 2003 5 commits
    • simonmar's avatar
      [project @ 2003-12-15 16:45:23 by simonmar] · 2ca13796
      simonmar authored
      Add assertion.
      2ca13796
    • simonmar's avatar
      [project @ 2003-12-15 16:43:45 by simonmar] · 410a99e4
      simonmar authored
      Debugging output wibble
      410a99e4
    • 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
      released.
      
      Fix (not sure if this is the best fix, though): don't grab the
      capability in grabReturnCapability() if passCapabilty is set.
      56a125f2
    • 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.
      622da085
    • 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.
      ddbdee33
  5. 12 Dec, 2003 1 commit
  6. 11 Dec, 2003 3 commits
  7. 10 Dec, 2003 7 commits
    • simonmar's avatar
      [project @ 2003-12-10 17:35:48 by simonmar] · 298a8b81
      simonmar authored
      oops, forgot a reverse
      298a8b81
    • simonmar's avatar
      [project @ 2003-12-10 17:29:26 by simonmar] · c5a2edaf
      simonmar authored
      Fix syntax error
      c5a2edaf
    • simonmar's avatar
      [project @ 2003-12-10 17:25:12 by simonmar] · c7b38930
      simonmar authored
      Cleanups:
      
      - 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.
      c7b38930
    • simonmar's avatar
      [project @ 2003-12-10 17:15:44 by simonmar] · 49fabae4
      simonmar authored
      fix bogosity spotted by -Wall
      49fabae4
    • simonmar's avatar
      [project @ 2003-12-10 14:21:36 by simonmar] · 76465093
      simonmar authored
      New file of miscellaneous utility functions over HsSyn.
      76465093
    • 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
      spot-on.
      
      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.
      
      Implementation:
      
      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.
      55042138
    • 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.
      60ea58ab