1. 14 Sep, 2003 3 commits
  2. 13 Sep, 2003 1 commit
  3. 12 Sep, 2003 5 commits
  4. 11 Sep, 2003 14 commits
    • simonpj's avatar
      [project @ 2003-09-11 16:46:15 by simonpj] · 424d45ae
      simonpj authored
      Make sure that exprIsTrivial responds "False" to
      	(scc "foo" x)
      
      We do not treat (_scc_ "foo" x) as trivial, because
        a) it really generates code, (and a heap object when it's
           a function arg) to capture the cost centre
        b) see the note [SCC-and-exprIsTrivial] in Simplify.simplLazyBind
      424d45ae
    • wolfgang's avatar
      [project @ 2003-09-11 15:36:37 by wolfgang] · e4ef00a8
      wolfgang authored
      The FP_CHECK_CONSTS test for the errno constants requires stdio.h to be
      included, at least on Mac OS X.
      
      MERGE TO STABLE.
      e4ef00a8
    • wolfgang's avatar
      [project @ 2003-09-11 15:12:25 by wolfgang] · d8144db0
      wolfgang authored
      Mac OS X:
      
      Bypass the dlfcn compatibility layer in lookupSymbol, use Apple's
      NSModule functions directly instead. This protects us from differences
      between different implementations of the dlcompat library (regarding
      treatment of prefixed underscores).
      Note that the compatibility layer is still used in addDLL (it's needed by
      the POSIX library anyway).
      
      Also, add a little more sanity checking (checkProddableBlock) to the Mach-O
      linker itself.
      
      MERGE TO STABLE
      d8144db0
    • simonmar's avatar
      [project @ 2003-09-11 14:34:24 by simonmar] · a7e3ac4e
      simonmar authored
      Document -fth and -fimplicit-params
      a7e3ac4e
    • simonpj's avatar
      [project @ 2003-09-11 14:20:40 by simonpj] · 25aeb246
      simonpj authored
      --------------------------
      	    Allow recursive dictionaries
      	   --------------------------
      
      In response to various bleatings, here's a lovely fix that involved simply
      inverting two lines of code, to allow recursive dictionaries.  Here's
      the comment.  (typecheck/should_run/tc030 tests it)
      
      Note [RECURSIVE DICTIONARIES]
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Consider
          data D r = ZeroD | SuccD (r (D r));
      
          instance (Eq (r (D r))) => Eq (D r) where
              ZeroD     == ZeroD     = True
              (SuccD a) == (SuccD b) = a == b
              _         == _         = False;
      
          equalDC :: D [] -> D [] -> Bool;
          equalDC = (==);
      
      We need to prove (Eq (D [])).  Here's how we go:
      
      	d1 : Eq (D [])
      
      by instance decl, holds if
      	d2 : Eq [D []]
      	where 	d1 = dfEqD d2
      
      by instance decl of Eq, holds if
      	d3 : D []
      	where	d2 = dfEqList d2
      		d1 = dfEqD d2
      
      But now we can "tie the knot" to give
      
      	d3 = d1
      	d2 = dfEqList d2
      	d1 = dfEqD d2
      
      and it'll even run!  The trick is to put the thing we are trying to prove
      (in this case Eq (D []) into the database before trying to prove its
      contributing clauses.
      25aeb246
    • simonpj's avatar
      [project @ 2003-09-11 14:18:38 by simonpj] · b434cbc6
      simonpj authored
      Add comments, change a WARN to an ASSERT
      b434cbc6
    • simonpj's avatar
      [project @ 2003-09-11 13:41:38 by simonpj] · 380ec6be
      simonpj authored
      Undo bogus claim that
      	_scc_ "foo" x  ==  x
      
      This just isn't right in general, for example when x is a
      top-level function.
      380ec6be
    • simonmar's avatar
      [project @ 2003-09-11 10:36:56 by simonmar] · 52d7dd31
      simonmar authored
      HEAD is now 6.3
      52d7dd31
    • simonmar's avatar
      [project @ 2003-09-11 10:35:28 by simonmar] · 29558566
      simonmar authored
      When setting TARGETPLATFORM, we should also set foo_TARGET_ARCH,
      bar_TARGET_OS, etc.
      29558566
    • simonmar's avatar
      [project @ 2003-09-11 10:26:31 by simonmar] · dbe5cd5d
      simonmar authored
      Add missing 'cd T' to the porting instructions.
      dbe5cd5d
    • simonmar's avatar
      [project @ 2003-09-11 09:29:22 by simonmar] · d854ef58
      simonmar authored
      The reify keywords should be valid when template haskell is turned on.
      d854ef58
    • sof's avatar
      [project @ 2003-09-11 05:05:34 by sof] · b960cef5
      sof authored
      hGetStringBuffer: open file in binary mode
      b960cef5
    • sof's avatar
      [project @ 2003-09-11 00:58:02 by sof] · 384a584a
      sof authored
      Fix race condition re: WorkItems and SubmitWork().
      
      It is unsafe to access a WorkItem after it has been queued, since
      a worker thread may have already serviced (and freed) it.
      Hence, return request IDs without looking at the WorkItem.
      
      If desired, this one could be merged to STABLE.
      384a584a
    • sof's avatar
      [project @ 2003-09-11 00:39:04 by sof] · 3565204c
      sof authored
      awaitRequests(): canonicalize removal of thread from blocked_queue
      3565204c
  5. 10 Sep, 2003 2 commits
    • simonmar's avatar
      [project @ 2003-09-10 16:44:03 by simonmar] · 7cbba64b
      simonmar authored
      New flags for individual syntax extensions:
      
        -fth                enables template haskell
        -fimplicit-params   enables implicit parameters
      
      These extensions are still implied by -fglasgow-exts, but they can now
      be switched off individually with -fno-th and -fno-implicit-params
      respectively.  Also, -fno-ffi now works as expected.
      
      I cleaned up the interface to the lexer a bit while I was here.
      7cbba64b
    • simonmar's avatar
      [project @ 2003-09-10 14:45:24 by simonmar] · 868973ac
      simonmar authored
      Quick hack to work around the dynamic exception crashes in GHCi.  The
      problem is this: the Data.Typeable library (Data.Dymamic in previous
      versions of GHC) maintains an internal cache mapping type names to
      unique numbers, and this cache is used for fast comparisons on
      TypeReps.  In GHCi, there are actually two versions of the
      Data.Typeable library loaded: one linked to GHCi itself, and the other
      dynamically loaded, so there are two copies of the hash tables.
      
      The problem is that if we have a Dynamic value generated using one set
      of hash tables, it will erroneously appear to be of a different type
      when the other hash tables are used.
      
      The hack I've instigated is to use the central RTS genSym (which
      already exists) to generate the unique Ids, so that the two copies of
      the dynamic library will be using distinct Ids, and Dynamics from one
      will never be recognisable to the other.
      868973ac
  6. 09 Sep, 2003 6 commits
  7. 08 Sep, 2003 9 commits
    • sof's avatar
      [project @ 2003-09-08 17:55:40 by sof] · 39ea6a04
      sof authored
      New option, -DNAME=VAL, for adding to the set of
      variables substituted for when processing a package
      description.
      
      (Needed to support Windows installers for GHC packages.)
      39ea6a04
    • panne's avatar
      [project @ 2003-09-08 14:46:37 by panne] · f6af3fa0
      panne authored
      *sigh* Handle lines like (note the blank!):
      
      {-# LINE 1 "<command line>" #-}
      f6af3fa0
    • simonmar's avatar
      [project @ 2003-09-08 14:23:11 by simonmar] · a629ff5c
      simonmar authored
      The POSIX library has more or less completed moving over to the
      hierarchical libraries, so remove the statement that says it hasn't
      moved.
      
      We should really aim to have everything moved from hslibs to libraries
      before 6.2, then we can finally remove hslibs altogether for 6.4.
      a629ff5c
    • simonmar's avatar
      [project @ 2003-09-08 13:33:29 by simonmar] · 4fbd1954
      simonmar authored
      Two more tokens that herald layout contexts: 'rec' and '[d|'.
      4fbd1954
    • panne's avatar
      [project @ 2003-09-08 13:31:35 by panne] · 5cbc33c2
      panne authored
      Handle lines like (note the blank!):
      
      # 1 "<command line>"
      5cbc33c2
    • simonmar's avatar
      [project @ 2003-09-08 13:20:29 by simonmar] · 500c76a8
      simonmar authored
      Add Alex as a pre-supposed tool, and mention it in a few places.
      500c76a8
    • simonmar's avatar
      [project @ 2003-09-08 13:01:16 by simonmar] · 90656575
      simonmar authored
      mdo needs layout treatment too.
      90656575
    • simonmar's avatar
      [project @ 2003-09-08 11:53:14 by simonmar] · 05aa4a18
      simonmar authored
      Remove old lexer; replaced by Lexer.x.
      05aa4a18
    • simonmar's avatar
      [project @ 2003-09-08 11:52:24 by simonmar] · 9541ef34
      simonmar authored
      Replace the handwritten lexer with one generated by Alex.
      
      YOU NOW NEED ALEX (v 2.0 or later) TO COMPILE GHC FROM CVS.
      
      Highlights:
      
        - Faster than the previous lexer (about 10% of total parse time,
          depending on the token mix).
      
        - More correct than the previous lexer: a couple of minor wibbles
          in the syntax were fixed.
      
        - Completely accurate source spans for each token are now collected.
          This information isn't used yet, but it will be used to give much
          more accurate error messages in the future.
      
        - SrcLoc now contains a column field as well as a line number,
          although this is currently ignored when printing out SrcLocs.
      
        - StringBuffer is now based on a ByteArray# rather than a Ptr, which
          means that StringBuffers are now garbage collected.  Previously
          StringBuffers were hardly ever released, so a GHCi session would
          leak space as more source files were loaded in.
      
        - Code size reduction: Lexer.x is about the same size as the old
          Lex.lhs, but StringBuffer.lhs is significantly shorter and
          simpler.  Sadly I wasn't able to get rid of parser/Ctypes.hs
          (yet).
      9541ef34