1. 29 Oct, 2002 4 commits
  2. 28 Oct, 2002 3 commits
  3. 27 Oct, 2002 3 commits
  4. 25 Oct, 2002 9 commits
  5. 24 Oct, 2002 3 commits
    • simonpj's avatar
      [project @ 2002-10-24 16:54:19 by simonpj] · 1dafd8c2
      simonpj authored
      Uh oh; got the versioning stuff a bit wrong in the last commit
    • simonpj's avatar
      [project @ 2002-10-24 14:17:46 by simonpj] · e0445ffa
      simonpj authored
      	1. New try and module and package dependencies
      	2. OrigNameCache always contains final info
      These things nearly complete sorting out the incremental
      linking problem that started us off!
      1. This commit separates two kinds of information:
        (a) HscTypes.Dependencies:
      	What (i)  home-package modules, and
      	     (ii) other packages
            this module depends on, transitively.
            That is, to link the module, it should be enough
            to link the dependent modules and packages (plus
            any C stubs etc).
            Along with this info we record whether the dependent module
            is (a) a boot interface or (b) an orphan module.  So in
            fact (i) can contain non-home-package modules, namely the
            orphan ones in other packages (sigh).
        (b) HscTypes.Usage:
            What version of imported things were used to
            actually compile the module.  This info is used for
            recompilation control only.
      2. The Finder now returns a correct Module (incl package indicator)
      first time, so we can install the absolutely final Name in the
      OrigNameCache when we first come across an occurrence of that name,
      even if it's only an occurrence in an unfolding in some other interface
      file.  This is much tidier.
      As a result Module.lhs is much cleaner
      	No DunnoYet
      	No mkVanillaModule
      ALl very joyful stuff.
    • simonmar's avatar
      [project @ 2002-10-24 13:08:35 by simonmar] · 04a63774
      simonmar authored
      In --make mode, consider everything that doesn't contain a '.' to be a
      compilation manager input.  This fixes cases like
        ghc --make test37
      where test37.hs exists.  I broke this in the previous commit, causing
      a number of tests to break.
  6. 23 Oct, 2002 5 commits
    • simonpj's avatar
      [project @ 2002-10-23 15:56:39 by simonpj] · b866a9bc
      simonpj authored
      Document implicit parameter bindings
    • simonpj's avatar
      [project @ 2002-10-23 14:30:00 by simonpj] · 203a687f
      simonpj authored
      	Allow implicit-parameter bindings anywhere that
      		a normal binding group is allowed.
      That is, you can have implicit parameters
      	* in a let binding
      	* in a where clause (but then you can't have non-implicit
      	  ones as well)
      	* in a let group in a list comprehension or monad do-notation
      The implementation is simple: just add IPBinds to the allowable forms of HsBinds,
      and remove the HsWith expression form altogether.   (It now comes in via the
      HsLet form.)
      It'a a nice generalisation really.  Needs a bit of documentation, which I'll do next.
    • mthomas's avatar
      [project @ 2002-10-23 12:26:11 by mthomas] · 9704f544
      mthomas authored
      Declare loop index i.
    • simonmar's avatar
      [project @ 2002-10-23 08:52:26 by simonmar] · d12023f5
      simonmar authored
      Add atomicModifyIORefzh_fast symbol (should have been done with the
      rest of the atomicModifyIORef# commit, thanks to Manuel Chakravarty
      for pointing out the problem).
    • chak's avatar
      [project @ 2002-10-23 02:36:37 by chak] · 6aa5e648
      chak authored
      Added an import to make TH compile.
  7. 22 Oct, 2002 3 commits
    • simonmar's avatar
      [project @ 2002-10-22 13:36:56 by simonmar] · 56acbeac
      simonmar authored
      Fix recent FreeBSD breakage in the mangler: the "Prologue Junk" test
      was a little bit too strict about whitespace.
    • simonmar's avatar
      [project @ 2002-10-22 11:01:18 by simonmar] · b7129526
      simonmar authored
      change the types of cmp_thread, rts_getThreadId, and labelThread to
      take StgPtr rather than StgTSO *, since the compiler now has no
      distinction between these two types in the back end.
      I also noticed that labelThread need not be a primitive: it could just
      as well be a normal C function called by the FFI, but I haven't made
      that change.
    • simonpj's avatar
      [project @ 2002-10-22 10:31:21 by simonpj] · e7740388
      simonpj authored
      Import wibbles
  8. 21 Oct, 2002 2 commits
    • simonmar's avatar
      [project @ 2002-10-21 12:42:31 by simonmar] · 5cc57129
      simonmar authored
      Turn an instance of 0xfff00000 into ~MBLOCK_MASK in the Win32 code.
    • simonmar's avatar
      [project @ 2002-10-21 11:38:53 by simonmar] · 2be44cb2
      simonmar authored
      Bite the bullet and generalise the central memory allocation scheme.
      Previously we tried to allocate memory starting from a fixed address,
      which was set for each architecture (0x5000000 was a common one), and
      to decide whether a particular address was in the heap or not we would
      do a simple comparison against this address.
      This doesn't work too well, because:
       - if we dynamically-load some objects above the boundary, the
         heap-allocated test becomes invalid
       - on windows we have less control, and the heap might be
         split into multiple sections
       - it turns out that on some Linux kernels we don't get memory where
         we asked for it.  This might be a bug in those kernels, but it
         exposes the fragility of our allocation scheme.
      The solution is to bite the bullet and maintain a table mapping
      addresses to a value indicating whether that address is in the heap or
      not.  Since we normally allocate heap in chunks of 1Mb, the table is
      quite small: 4k on a 32-bit machine, using one byte for each 1Mb
      block.  Testing an address for heap residency now involves a memory
      access, but the table is normally cache-resident.  I didn't manage to
      measure any slowdown after making the change.
      On a 64-bit machine, we'll need to use a 2-level table; I haven't
      implemented that yet.
      Now we can generalise the procedure used to grab memory from the OS.
      In the general case, we allocate one megablock more than we need to,
      and trim off the slop around the allocation to leave an aligned chunk.
      The next time around, however, we try to allocate memory right after
      the last chunk allocated, on the grounds that it is aligned and
      probably free: if this doesn't work, we have to back off to the
      general mechanism (it seems to work most of the time).
      This cleans up the Windows story too: is_heap_alloced() has gone, and
      we should be able to handle more than 256M of memory (or whatever the
      arbitrary limit was before).
      MERGE TO STABLE (after lots of testing)
  9. 19 Oct, 2002 1 commit
  10. 18 Oct, 2002 6 commits
    • simonpj's avatar
      [project @ 2002-10-18 13:41:50 by simonpj] · f53483a2
      simonpj authored
         Fix a serious error in the "newtype deriving" feature
      The "newtype deriving" feature lets you derive arbitrary classes for
      a newtype, not just the built-in ones (Read, Show, Ix etc).  It's very
      cool, but Hal Duame discovered that it did utterly the Wrong Thing
      for superclasses.  E.g.
      	newtype Foo = MkFoo Int deriving( Show, Num, Eq )
      You'd get a Num instance for Foo that was *identical* to the
      Num instance for Int, *including* the Show superclass. So the
      superclass in the Num dictionary would show a Foo just like an
      Int, which is wrong... it should show as "Foo n".
      This commit fixes the problem, by building a new dictionary every time,
      but using the methods from the dictionary for the representation type.
      I also fixed a bug that prevented it working altogether when the
      representation type was not the application of a type constructor.
      For example, this now works
      	newtype Foo a = MkFoo a deriving( Num, Eq, Show )
      I also made it a bit more efficient in the case where the type is
      not parameterised.  Then the "dfun" doesn't need to be a function.
    • simonpj's avatar
      [project @ 2002-10-18 13:36:17 by simonpj] · fbd11e24
      simonpj authored
      Add a trace
    • simonpj's avatar
      [project @ 2002-10-18 13:35:46 by simonpj] · 9b4d74c7
      simonpj authored
      Import wibbles
    • simonmar's avatar
      [project @ 2002-10-18 10:16:04 by simonmar] · 6f95b59e
      simonmar authored
      Add the Haskell Web Server to the fptools repository so I can give it
      a proper license.
    • simonmar's avatar
      [project @ 2002-10-18 09:51:03 by simonmar] · f05e7d3f
      simonmar authored
      Add atomicModifyIORef, as discussed on the FFI list.
    • simonmar's avatar
      [project @ 2002-10-18 09:36:21 by simonmar] · c7566eea
      simonmar authored
      Add a note about the profiling versions of the interface files in a package.
  11. 17 Oct, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-10-17 14:49:52 by simonmar] · f9449b97
      simonmar authored
      - Don't flush the finder cache after adding a new package.  We'll
        assume that packages don't overlap.
      - Add the extra command-line flags specified by a package when we
        add a package from the GHCi prompt.