- 05 Mar, 2003 1 commit
-
-
simonmar authored
Duh. hsc2hs should be in $(GhcBinDistShScripts), not $(GhcBinDistBins), otherwise it doesn't get the right directories tacked on the front at installation time. Strange that nobody complained that hsc2hs wasn't working from a binary dist *shrug*.
-
- 04 Mar, 2003 3 commits
-
-
simonmar authored
Make it compile again with 5.04.x
-
simonmar authored
Fix compilation breakage with GHC 4.08.x.
-
sof authored
win32/Ticker.c:startTicker(), win32/IOManager.c:NewIOWorkerThread(): pass in non-NULL pointer to _beginthreadex()'s outgoing thread ID arg. Needed to work with Win9x's impl of CreateThread().
-
- 03 Mar, 2003 5 commits
-
-
simonmar authored
A round of space-leak fixing. - re-instate zapping of the PersistentCompilerState at various points during the compilation cycle in HscMain. This affects one-shot compilation only, since in this mode the information collected in the PCS is not required after creating the final interface file. - Unravel the recursive dependency between MkIface and CoreTidy/CoreToStg. Previously the CafInfo for each binding was calculated by CoreToStg, and fed back into the IdInfo of the Ids generated by CoreTidy (an earlier pass). MkIface then took this IdInfo and the bindings from CoreTidy to generate the interface; but it couldn't do this until *after* CoreToStg, because the CafInfo hadn't been calculated yet. The result was that the CoreTidy output lived until after CoreToStg, and at the same time as the CorePrep and STG syntax, which is wasted space, not to mention the complexity and general ugliness in HscMain. So now we calculate CafInfo directly in CoreTidy. The downside is that we have to predict what CorePrep is going to do to the bindings so we can tell what will turn into a CAF later, but it's no worse than before (it turned out that we were doing this prediction before in CoreToStg anyhow). - The typechecker lazilly typechecks unfoldings. It turns out that this is a good idea from a performance perspective, but it also means that it must hang on to all the information it needs to do the typechecking. Previously this meant holding on to the whole of the typechecker's environment, which includes all sorts of stuff which isn't necessary to typecheck unfoldings. By paring down the environment captured by the lazy unfoldings, we can save quite a bit of space in the phases after typechecking.
-
simonmar authored
Use listArray rather than array in (un)?boxedTupleArr.
-
simonmar authored
Remove unused export.
-
simonmar authored
underscore some variables that aren't used.
-
simonmar authored
Compilation fix after recent addition of environment stuff to System.Posix.
-
- 26 Feb, 2003 1 commit
-
-
simonpj authored
---------------------------------- Improve higher-rank type inference ---------------------------------- Yanling Wang pointed out that if we have f = \ (x :: forall a. a->a). x it would be reasonable to expect that type inference would get the "right" rank-2 type for f. She also found that the plausible definition f :: (forall a. a->a) = \x -> x acutally failed to type check. This commit fixes up TcBinds.tcMonoBinds so that it does a better job. The main idea is that there are three cases to consider in a function binding: a) 'f' has a separate type signature In this case, we know f's type everywhere b) The binding is recursive, and there is no type sig In this case we must give f a monotype in its RHS c) The binding is non-recursive, and there is no type sig Then we do not need to add 'f' to the envt, and can simply infer a type for the RHS, which may be higher ranked.
-
- 24 Feb, 2003 3 commits
-
-
simonmar authored
Remove mention of man pages, which we don't have, and clarify a couple of other things while I'm here.
-
simonpj authored
*** My last commit had a bogus commit message ** *** This is the right one. I've appended the ** *** list of files changed as well. ------------------------------------- Fix up HOST/TARGET_OS ifdefs ------------------------------------- Sigbjorn and Simon helped me to understand when it's appropriate to say 'ifdef mingw32_HOST_OS' and when 'ifdef mingw32_TARGET_OS'. I've documented this in the building guide. I've fixed up the ifdefs I erroneously changed last week, in this commit. I'm not certain about all of them. For examples, in DriverPhases there's an ifdef that deals with filename suffices. Should this be the filename suffices for the system on which GHC runs (HOST), or the system on which the compiled code will run (TARGET)? Currently it's the latter. Similarly, there's some path mangling ('/' vs '\') in DriverState: should this be for the system on which GHC runs (HOST) or the system on which the compiled code will run (TARGET)? Currently the former. I think some of the darwin_TARGET_OS should be darwin_HOST_OS's. Finally, for the GHCi stuff we require that HOST_OS = TARGET_OS. Rather than make an arbitrary choice in (e.g.) Linker.lhs, it's be better to say '#ifdef mingw32_OS', and arrange that this macro is set only in stage-2. I have not done this. I think these are 'right'. But I'm not sure the filename mangling is consistent throughout. [Changes in the original commit, which had a bogus message.] Revision Changes Path 1.46 +30 -0 fptools/docs/building/building.sgml 1.148 +4 -4 fptools/ghc/compiler/ghci/InteractiveUI.hs 1.114 +2 -2 fptools/ghc/compiler/main/DriverFlags.hs 1.23 +3 -1 fptools/ghc/compiler/main/DriverPhases.hs 1.85 +11 -11 fptools/ghc/compiler/main/SysTools.lhs 1.20 +3 -3 fptools/ghc/compiler/utils/Panic.lhs
-
simonpj authored
Three Template Haskell improvements a) Add type synonyms to THSyntax (and DsMeta, Convert) b) Make Q into a newtype instead of a type synonym c) Eliminate tiresome and error prone argument to DsMeta.wrapGenSyms and similarly addTyVarBinds
-
- 22 Feb, 2003 2 commits
-
-
sof authored
bring getourtimeofday() proto into scope
-
sof authored
Clean up code&interfaces that deals with timers and asynchrony: - Timer.{c,h} now defines the platform-independent interface to the timing services needed by the RTS. Itimer.{c,h} + win32/Ticker.{c,h} defines the OS-specific services that creates/destroys a timer. - For win32 plats, drop the long-standing use of the 'multimedia' API timers and implement the ticking service ourselves. Simpler and more flexible. - Select.c is now solely for platforms that use select() to handle non-blocking I/O & thread delays. win32/AwaitEvent.c provides the same API on the Win32 side. - support threadDelay on win32 platforms via worker threads. Not yet compiled up on non-win32 platforms; will do once checked in.
-
- 21 Feb, 2003 15 commits
-
-
simonpj authored
Typos
-
simonpj authored
Fix buglets in new unused-binding story
-
simonpj authored
Use old-style foreign import for bkwd compatibility
-
simonpj authored
------------------------------------- Improve the "unused binding" warnings ------------------------------------- We've had a succession of hacks for reporting warnings for unused bindings. Consider module M( f ) where f x = x g x = g x + h x h x = x Here, g mentions itself and h, but is not itself mentioned. So really both g and h are dead code. We've been getting this wrong for ages, and every hack so far has failed on some simple programs. This commit does a much better job. The renamer applied to a bunch of bindings returns a NameSet.DefUses, which is a dependency-ordered lists of def/use pairs. It's documented in NameSet. Given this, we can work out precisely what is not used, in a nice tidy way. It's less convenient in the case of type and class declarations, because the strongly-connected-component analysis can span module boundaries. So things are pretty much as they were for these. As usual, there was a lot of chuffing around tidying things up. I havn't tested it at all thoroughly yet. Various unrelated import-decl-pruning has been done too.
-
simonpj authored
Import pruning
-
simonpj authored
Import pruning, use mingw32_TARGET not HOST, use old-style foreign import (for 4.08 compat)
-
simonpj authored
Import pruning
-
simonpj authored
More tidy up
-
simonpj authored
Small fix to a TH bug; this one concerning the constraint-gathering mechanism
-
simonpj authored
Another typo; sigh
-
simonpj authored
Typo
-
simonpj authored
Debugging hook jiggling
-
simonpj authored
Fix a type-error in desugaring TH code
-
sof authored
Asynchronous / non-blocking I/O for Win32 platforms. This commit introduces a Concurrent Haskell friendly view of I/O on Win32 platforms. Through the use of a pool of worker Win32 threads, CH threads may issue asynchronous I/O requests without blocking the progress of other CH threads. The issuing CH thread is blocked until the request has been serviced though. GHC.Conc exports the primops that take care of issuing the asynchronous I/O requests, which the IO implementation now takes advantage of. By default, all Handles are non-blocking/asynchronous, but should performance become an issue, having a per-Handle flag for turning off non-blocking could easily be imagined&introduced. [Incidentally, this thread pool-based implementation could easily be extended to also allow Haskell code to delegate the execution of arbitrary pieces of (potentially blocking) external code to another OS thread. Given how relatively gnarly the locking story has turned out to be with the 'threaded' RTS, that may not be such a bad idea.]
-
sof authored
deja vu all over again
-
- 20 Feb, 2003 10 commits
-
-
panne authored
* Nuked unused --with-glut-api and --with-glut-xlib arguments * Only check for OpenGL headers and libs when --enable-hopengl is given
-
simonpj authored
typo
-
simonpj authored
------------------------------------- Add Core Notes and the {-# CORE #-} pragma ------------------------------------- This is an idea of Hal Daume's. The key point is that Notes in Core are augmented thus: data Note = SCC CostCentre | ... | CoreNote String -- NEW These notes can be injected via a Haskell-source pragma: f x = ({-# CORE "foo" #-} show) ({-# CORE "bar" #-} x) This wraps a (Note (CoreNote "foo")) around the 'show' variable, and a similar note around the argument to 'show'. These notes are basically ignored by GHC, but are emitted into External Core, where they may convey useful information. Exactly how code involving these notes is munged by the simplifier isn't very well defined. We'll see how it pans out. Meanwhile the impact on the rest of the compiler is minimal.
-
simonpj authored
Document {-# CORE #-} pragma (thanks to Hal Daume)
-
simonpj authored
Import pruning
-
simonpj authored
Add comments
-
simonpj authored
Comments and imports only
-
simonmar authored
closureSatisfiesConstraints: check whether the retainer set is valid before attempting to match it against a constraint. It might not be valid if the object is an ex-weak-pointer which was finalized after the last GC. MERGE TO STABLE
-
simonpj authored
------------------------------------- Complete an earlier TH commit ------------------------------------- In this earlier commit: 3. Ensure that a declaration quotation [d| ... |] does not have a permanent effect on the instance environment. (A TH fix.) I had forgotten to do a stage2 compile. This commit just completes the earlier work. I moved some code from TcExpr (long) to TcSplice (shorter) which had the happy effect of bringing related code together.
-
simonpj authored
------------------------------------- Generate correct dependencies when reading External Core ------------------------------------- We have to be more careful than I realised when doing strongly-connected component analysis of type/class decls when reading External Core. Here's the relevant new comment: -- Building edges for SCC analysis -- -- When building the edges, we treat the 'main name' of the declaration as the -- key for the node, but when dealing with External Core we may come across -- references to one of the implicit names for the declaration. For example: -- class Eq a where .... -- data :TSig a = :TSig (:TEq a) .... -- The first decl is sucked in from an interface file; the second -- is in an External Core file, generated from a class decl for Sig. -- We have to recognise that the reference to :TEq represents a -- dependency on the class Eq declaration, else the SCC stuff won't work right. -- -- This complication can only happen when consuming an External Core file -- -- Solution: keep an "EdgeMap" (bad name) that maps :TEq -> Eq. -- Don't worry about data constructors, because we're only building -- SCCs for type and class declarations here. So the tiresome mapping -- is need only to map [class tycon -> class]
-