- 25 Oct, 2002 8 commits
-
-
simonpj authored
Import wibbles
-
simonpj authored
Import wibbles
-
simonpj authored
Reduce exports, and add comments
-
simonpj authored
------------------------ More dependency fiddling ------------------------ WARNING: Interface file format has changed (again) You need to 'make clean' in all library code * Orphan modules are now kept separately Home-package dependencies now contain only home-package dependencies! See HscTypes.Dependencies * Linker now uses the dependencies to do dynamic linking Result: Template Haskell should work even without --make (not yet tested)
-
simonmar authored
We shouldn't be using MAP_FIXED on solaris (fixes last night's crash). Unfortunately on Solaris the heuristics don't work too well. Solaris seems to ignore the addr argument to mmap when MAP_FIXED is not specified, and starts handing out memory from the top of the address space. So we allocate 2M each time and munmap() ends to leave an aligned 1M chunk. This will eventually leave the address space completely full of 1M holes. I don't have a good solution to this at the moment. MERGE TO STABLE
-
michaelw authored
* typo (dl -> dnl)
-
simonpj authored
Wibble; cures failure in stage2 build
-
simonmar authored
In eval_thunk_selector(), don't follow IND_STATICs because they might lead us into to-space. Fixes a case of "EVACUATED object entered!". Also, add an assertion to catch this bug earlier. MERGE TO STABLE
-
- 24 Oct, 2002 3 commits
-
-
simonpj authored
Uh oh; got the versioning stuff a bit wrong in the last commit
-
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 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.
-
- 23 Oct, 2002 5 commits
-
-
simonpj authored
Document implicit parameter bindings
-
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 authored
Declare loop index i.
-
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 authored
Added an import to make TH compile.
-
- 22 Oct, 2002 3 commits
-
-
simonmar authored
Fix recent FreeBSD breakage in the mangler: the "Prologue Junk" test was a little bit too strict about whitespace.
-
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 authored
Import wibbles
-
- 21 Oct, 2002 2 commits
-
-
simonmar authored
Turn an instance of 0xfff00000 into ~MBLOCK_MASK in the Win32 code.
-
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)
-
- 19 Oct, 2002 1 commit
-
-
stolz authored
Retro Police: There are hosts w/o in_addr_t (e.g. SuSE 7.0)
-
- 18 Oct, 2002 6 commits
-
-
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 authored
Add a trace
-
simonpj authored
Import wibbles
-
simonmar authored
Add the Haskell Web Server to the fptools repository so I can give it a proper license.
-
simonmar authored
Add atomicModifyIORef, as discussed on the FFI list.
-
simonmar authored
Add a note about the profiling versions of the interface files in a package.
-
- 17 Oct, 2002 2 commits
-
-
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.
-
simonmar authored
Finder overhaul. The finder had got pretty complicated; this commit is mainly a cleanup, with one new feature: - the finder has a cache (again). The cache may be flushed by calling flushFinderCache, which actually only flushes home modules from the cache, because package modules are assumed not to move. This change is apropos of some other changes which will result in the finder being called more often, so we think a cache is going to be worthwhile. Also a couple of bugs were fixed: - the field ml_hi_file in a ModLocation is now *always* the name of the .hi file. If you need a .hi-boot file, you have to make it up by changing the suffix of ml_hi_file. (DriverMkDepend and RnHiFiles do this). This was the cause of a bug, but I can't remember the details. - The -odir flag now works in a more reasonable way: hierarchical modules get put in subdirectories of the -odir directory. eg. if your module is A.B.C, and -odir D is specified, then the object will be D/A/B/C.o; previously it would have been D/C.o.
-
- 15 Oct, 2002 10 commits
-
-
simonmar authored
beginMake: separate out compilation-manager inputs from linkable objects in a way that is more consistent with the one-shot compilation mode. Specifically, we now pass anything that looks like a module name or a Haskell source filename to the compilation manager, and everything else to the linker. MERGE TO STABLE
-
simonmar authored
Remove looksLikeModuleName, it is defined in Util now.
-
simonmar authored
Move looksLikeModuleName here from InterativeUI, so we can use it elsewhere.
-
simonmar authored
wibble
-
simonmar authored
wibble
-
simonmar authored
Don't use stdPackage (it has gone)
-
simonpj authored
------------------------------------------------ Fix exports for a module with no local bindings ------------------------------------------------ Fix the export-list generation for a module with no local bindings. This one bug was breaking a bunch of modxxx tests, plus some renamer test, plus a desugarer test.
-
simonmar authored
Slight fix to the allocated memory calculation
-
simonmar authored
Don't need to export Exception.try or Exception.throwDyn here.
-
simonmar authored
Use Panic.tryMost rather than Exception.try, since we don't want to catch ^C and panic exceptions.
-