1. 04 Jan, 2002 11 commits
    • simonpj's avatar
      [project @ 2002-01-04 11:39:00 by simonpj] · ce26c4b7
      simonpj authored
      -----------------------------
      	Fix a too-vigorous export bug
      	-----------------------------
      
      	MERGE TO STABLE
      
      	[this is the Ian Lynagh -O2 bug]
      
      
      CoreTidy didn't filter the rules that it exports, so it
      exported some that mentioned Ids on the *left* hand side
      that are not exported.  So an importing module fell over.
      
      The fix is simple: filter the exposed rules.   On the way
      I tidied up CoreFVs a little.
      ce26c4b7
    • simonpj's avatar
      [project @ 2002-01-04 11:35:47 by simonpj] · 13a428ca
      simonpj authored
      Comments only
      13a428ca
    • simonpj's avatar
      [project @ 2002-01-04 11:35:22 by simonpj] · 6346938c
      simonpj authored
      ----------------------------------------
      	Be a bit less gung ho about let-floating
      	----------------------------------------
      
      Sometimes it's a bad idea to float cheap expressions
      outwards, even if they escape a value lambda.
      
      	  -- Even if it escapes a value lambda, we only
      	  -- float if it's not cheap (unless it'll get all the
      	  -- way to the top).  I've seen cases where we
      	  -- float dozens of tiny free expressions, which cost
      	  -- more to allocate than to evaluate.
      	  -- NB: exprIsCheap is also true of bottom expressions, which
      	  --     is good; we don't want to share them
      	  --
      	  -- It's only Really Bad to float a cheap expression out of a
      	  -- strict context, because that builds a thunk that otherwise
      	  -- would never be built.  So another alternative would be to
      	  -- add
      	  -- 	|| (strict_ctxt && not (exprIsBottom expr))
      	  -- to the condition above. We should really try this out.
      
      The relevant function is lvlMFE, which has been subject to a lot
      of fiddling over the years.  Probably this isn't the last time.
      
      This all actually showed up when I was compiling IA.lhs from Ian Lynagh.
      6346938c
    • simonmar's avatar
      [project @ 2002-01-04 11:35:13 by simonmar] · 4d2d47a5
      simonmar authored
      - rename CompManager.cmLoadModule to cmLoadModules and make it take
        a DynFlags argument to be consistent with the rest of the
        CompManager interface.
      
      - split cmLoadModule into two parts: cmDepAnal which takes a list of
        filenames and returns a ModuleGraph, and cmLoadModules which takes
        the ModuleGraph and does the rest.  This lets the consumer know
        whether the dependency analysis step fails before unloading any
        existing modules - i.e. if you :reload and a module is missing, you
        don't lose the modules that are already loaded (bug reported by
        MIchael Weber some time ago).
      4d2d47a5
    • sof's avatar
      [project @ 2002-01-04 10:56:09 by sof] · 0479b0cf
      sof authored
      getDirectoryContents: use the re-entrant readdir_r() to get at directory
      entries, if available.
      0479b0cf
    • sof's avatar
      [project @ 2002-01-04 10:54:20 by sof] · 1005a187
      sof authored
      add feature test for readdir_r()
      1005a187
    • simonmar's avatar
      [project @ 2002-01-04 10:44:16 by simonmar] · edf50325
      simonmar authored
      update the rather dated usage message
      edf50325
    • simonpj's avatar
      [project @ 2002-01-04 10:25:33 by simonpj] · dad9aa43
      simonpj authored
      Warn, dont crash, when isIn gets a big list
      dad9aa43
    • simonmar's avatar
      [project @ 2002-01-04 10:18:58 by simonmar] · ec655d31
      simonmar authored
      Replace all instances of '--' with '––' since '--' gets
      interpreted by JadeTeX to mean a single dash.
      ec655d31
    • simonmar's avatar
      [project @ 2002-01-04 10:04:44 by simonmar] · b716195d
      simonmar authored
      replace -- with —
      b716195d
    • simonmar's avatar
      [project @ 2002-01-04 09:35:42 by simonmar] · 5ad7caa5
      simonmar authored
      oops, unb??rk the export list in the non-GHCI case.
      5ad7caa5
  2. 03 Jan, 2002 6 commits
    • simonmar's avatar
      [project @ 2002-01-03 17:09:13 by simonmar] · 224131a7
      simonmar authored
      - change the mi_globals field of ModIface to be (Maybe GlobalRdrEnv)
        from GlobalRdrEnv.  The idea is that modules which we have
        compiled from source will have a complete GlobalRdrEnv in this field
        containing their top-level environments, whereas modules which we
        have loaded from object files (package modules and pre-compiled home
        modules) will have Nothing and we'll create a fake GlobalRdrEnv on
        demand from the export list.
      
        Previously we used to create the fake env all the time, but this way
        highlights the fact that we don't really have a proper GlobalRdrEnv
        for these modules (something we'd like to address at some point).
      
      - rename CompManager.cmLoadModule to cmLoadModules and make it take
        a DynFlags argument to be consistent with the rest of the
        CompManager interface.
      
      - split cmLoadModule into two parts: cmDepAnal which takes a list of
        filenames and returns a ModuleGraph, and cmLoadModules which takes
        the ModuleGraph and does the rest.  This lets the consumer know
        whether the dependency analysis step fails before unloading any
        existing modules - i.e. if you :reload and a module is missing, you
        don't lose the modules that are already loaded (bug reported by
        MIchael Weber some time ago).
      224131a7
    • sewardj's avatar
      [project @ 2002-01-03 17:05:50 by sewardj] · 432c5756
      sewardj authored
      If addDLL returns an error message, actually show it to the user :)
      
      Fixes: Sourceforge [ #482594 ] dlopen() errors reported badly
      
      MERGE TO STABLE
      432c5756
    • sof's avatar
      [project @ 2002-01-03 14:43:30 by sof] · a8bb4203
      sof authored
      prel_sizeof_{termios,sigset_t}: sync up proto and impl
      a8bb4203
    • simonmar's avatar
      [project @ 2002-01-03 11:45:06 by simonmar] · 6009d77a
      simonmar authored
      Fix for previous commit: use the SRT on the top-level constructor when
      deciding whether it has any CAF references, since not all top-level
      bindings have CgInfo pinned on.
      6009d77a
    • simonmar's avatar
      [project @ 2002-01-03 11:44:17 by simonmar] · beaf0404
      simonmar authored
      Add comment.
      beaf0404
    • simonmar's avatar
      [project @ 2002-01-03 11:43:41 by simonmar] · 8ec6cc30
      simonmar authored
      Export nonEmptySRT.
      8ec6cc30
  3. 02 Jan, 2002 2 commits
    • simonmar's avatar
      [project @ 2002-01-02 12:32:18 by simonmar] · 2c71b5db
      simonmar authored
      - Implement a small GC optimisation: when a static constructor has
        been determined to have no (indirect) CAF references, we set its
        static link field to a non-zero value (currently 1).  This prevents
        the garbage collector from traversing this closure and transitively
        everything it points to, and thus should speed up GC a little.
      
      - Omit the static link field from static constructors which have no
        pointer fields (i.e. they are CONSTR_NOCAF_STATIC).
      
      - Add the padding words and the static link field for a static
        constructor at (AbsC) code generation time, rather than in the back
        ends.  This eliminates some duplication between PprAbsC and
        AbsCStixGen.
      2c71b5db
    • simonmar's avatar
      [project @ 2002-01-02 12:27:43 by simonmar] · 661a9aef
      simonmar authored
      No need for #ifdef around shift primop now.
      661a9aef
  4. 30 Dec, 2001 2 commits
  5. 29 Dec, 2001 1 commit
  6. 28 Dec, 2001 5 commits
    • sof's avatar
      [project @ 2001-12-28 22:58:17 by sof] · 44710bcb
      sof authored
      struct sigset_t -> sigset_t
      44710bcb
    • simonpj's avatar
      [project @ 2001-12-28 17:25:31 by simonpj] · ae969b47
      simonpj authored
      ---------------------
      	Dealing with deriving
      	---------------------
      
      I spent a ridiculously long time peering at a bug report whereby
      a 'deriving' clause sent GHC 5.02.1 into a loop.  It was all to
      do with allowing instances like
      
      	instance Foo a b => Baz (T a)
      
      (Notice the 'b' on the left which does not appear on the right.)
      
      I realised that it's hard for the deriving machinery to find a
      fixpoint when these sort of instance decls are around.  So I
      now constrain *derived* instance decls not to have this form;
      all the tyvars on the left must appear on the right.
      
      On the way I commoned up the previously-separate tcSimplify
      machinery for 'deriving' and 'default' decls with that for
      everything else.   As a result, quite a few files are touched.
      
      I hope I havn't broken anything.
      ae969b47
    • simonpj's avatar
      [project @ 2001-12-28 17:20:36 by simonpj] · 246dab8d
      simonpj authored
      -----------------------------
      	Buglet in rank-N polymorphism
      	-----------------------------
      
      Fix a bug in the way result type signatures are handled; they
      hadn't been brought into the rank-N polymorphism world.
      246dab8d
    • sof's avatar
      [project @ 2001-12-28 16:36:54 by sof] · 210d594c
      sof authored
      heal
      210d594c
    • sof's avatar
      [project @ 2001-12-28 00:14:33 by sof] · 9c77e2dc
      sof authored
      debugging-by-nightly-build-reports; give poke_c_flag a correct FI decl
      9c77e2dc
  7. 27 Dec, 2001 3 commits
    • sof's avatar
      [project @ 2001-12-27 11:29:58 by sof] · d6977670
      sof authored
      Get rid of uses of #const, #peek, #poke and #ptr from PrelPosix.hsc
      (this leaves just uses of #type in PrelPosix) - provide constant and
      accessor wrappers via PrelIOUtils.c instead.
      
      Who knows, we might just be able to bootstrap via .hc files again..?
      
      Only compiled & tested under Win32.
      d6977670
    • sof's avatar
      [project @ 2001-12-27 11:26:03 by sof] · 14b9c05f
      sof authored
      Added & exported low-level memcpy() wrappers - possible to offset both
      src and dest.
      14b9c05f
    • sof's avatar
      [project @ 2001-12-27 09:28:10 by sof] · 215280e9
      sof authored
      - removed PrelPosix.c_read, PrelPosix.c_write
      - added Ptr and RawBuffer versions of PrelHandle.write_off,
        and PrelHandle.read_off and exported them, i.e., PrelHandle
        now exports:
      
          read_off_ba :: FD -> Bool -> RawBuffer -> Int -> CInt -> IO CInt
          read_off :: FD -> Bool -> Ptr CChar -> Int -> CInt -> IO CInt
          write_off_ba :: CInt -> Bool -> RawBuffer -> Int -> CInt -> IO CInt
          write_off :: CInt -> Bool -> Ptr CChar -> Int -> CInt -> IO CInt
      
      - make hPutChar (win)socket friendly.
      215280e9
  8. 26 Dec, 2001 1 commit
  9. 21 Dec, 2001 6 commits
  10. 20 Dec, 2001 3 commits