- 10 Mar, 2003 1 commit
-
-
umuta authored
Fix compilation problem on mingw32
-
- 04 Mar, 2003 1 commit
-
-
simonmar authored
Fix compilation breakage with GHC 4.08.x.
-
- 24 Feb, 2003 1 commit
-
-
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
-
- 21 Feb, 2003 2 commits
- 18 Feb, 2003 1 commit
-
-
simonmar authored
Fix build on GHC < 5.00
-
- 17 Feb, 2003 1 commit
-
-
simonmar authored
Restore interrupt/quit signal handlers after every evaluation in GHCi, just in case the program set its own.
-
- 13 Feb, 2003 1 commit
-
-
sof authored
Be sensitive to filenames containing spaces when processing :load & :add commands. Ditto when interpreting filenames given on GHCi's cmd-line. Merge to STABLE.
-
- 09 Jan, 2003 1 commit
-
-
simonmar authored
Further refine the criteria for deciding whether command line arguments should be passed to the compilation manager or the linker. See comments in the file. MERGE TO STABLE
-
- 17 Dec, 2002 3 commits
-
-
simonmar authored
On second thoughts, use memcmp instead.
-
simonmar authored
Oops, cmpFS uses strcmp() to compare strings, so it has a '\0' terminator requirement. Fix it to use strncmp() instead.
-
simonmar authored
Fix recent breakage on the HEAD. This was caused by the fix to Lex.lhs to treat primitive strings as "narrow" FastStrings in all cases, rather than Unicode ("wide") FastStrings if the string contained a '\0'. The problem is that narrow FastStrings aren't set up to handle strings containing '\0'. They used to be, but it got broken somewhere along the line. This commit: - remove the '\0' test from unpackCStringBA (it takes a length argument anyway), and rename it to unpackNBytesBA. This fixes the bug. - remove the '\0' terminator from all strings generated by the functions in PrimPacked. The terminators aren't required, as far as I can tell. This should have a tiny but positive effect on compile times. MERGE TO STABLE
-
- 12 Dec, 2002 2 commits
- 11 Nov, 2002 1 commit
-
-
simonpj authored
------------------ Fix a newtype-deriving bug ------------------ The new newtype-deriving mechanism was erroneously using the *representation type* of the newtype. The rep type looks through all ihtermediate newtypes, so that is wrong. See Note [newtype representation] in TcDeriv.lhs deriving/should_run/drvrun013 now tests for this.
-
- 15 Oct, 2002 2 commits
- 14 Oct, 2002 1 commit
-
-
sof authored
make it compile again with 4.08.x
-
- 11 Oct, 2002 1 commit
-
-
simonpj authored
Compatibility fixes for Exception.try
-
- 27 Sep, 2002 1 commit
-
-
simonpj authored
-------------------------------- Implement recursive do-notation -------------------------------- This commit adds recursive do-notation, which Hugs has had for some time. mdo { x <- foo y ; y <- baz x ; return (y,x) } turns into do { (x,y) <- mfix (\~(x,y) -> do { x <- foo y; y <- baz x }) ; return (y,x) } This is all based on work by Levent Erkok and John Lanuchbury. The really tricky bit is in the renamer (RnExpr.rnMDoStmts) where we break things up into minimal segments. The rest is easy, including the type checker. Levent laid the groundwork, and Simon finished it off. Needless to say, I couldn't resist tidying up other stuff, so there's no guaranteed I have not broken something.
-
- 18 Sep, 2002 1 commit
-
-
simonmar authored
Fix up exception handling when reading an interface file, and make it compile with 4.08.x again. GhcExceptions weren't being caught by readIface, so an error when reading an interface could be unintentionally fatal (errors should be soft when reading the old interface file for the current module). Also, the Interrupted exception should not be caught by readIface, because we want ^C to behave as normal when reading interface files (currently it causes an interface-file read error rather than interrupting the whole compiler). Some exception-related compatibility functions have been moved from Util to Panic.
-
- 13 Sep, 2002 1 commit
-
-
simonpj authored
-------------------------------------- Make Template Haskell into the HEAD -------------------------------------- This massive commit transfers to the HEAD all the stuff that Simon and Tim have been doing on Template Haskell. The meta-haskell-branch is no more! WARNING: make sure that you * Update your links if you are using link trees. Some modules have been added, some have gone away. * Do 'make clean' in all library trees. The interface file format has changed, and you can get strange panics (sadly) if GHC tries to read old interface files: e.g. ghc-5.05: panic! (the `impossible' happened, GHC version 5.05): Binary.get(TyClDecl): ForeignType * You need to recompile the rts too; Linker.c has changed However the libraries are almost unaltered; just a tiny change in Base, and to the exports in Prelude. NOTE: so far as TH itself is concerned, expression splices work fine, but declaration splices are not complete. --------------- The main change --------------- The main structural change: renaming and typechecking have to be interleaved, because we can't rename stuff after a declaration splice until after we've typechecked the stuff before (and the splice itself). * Combine the renamer and typecheker monads into one (TcRnMonad, TcRnTypes) These two replace TcMonad and RnMonad * Give them a single 'driver' (TcRnDriver). This driver replaces TcModule.lhs and Rename.lhs * The haskell-src library package has a module Language/Haskell/THSyntax which defines the Haskell data type seen by the TH programmer. * New modules: hsSyn/Convert.hs converts THSyntax -> HsSyn deSugar/DsMeta.hs converts HsSyn -> THSyntax * New module typecheck/TcSplice type-checks Template Haskell splices. ------------- Linking stuff ------------- * ByteCodeLink has been split into ByteCodeLink (which links) ByteCodeAsm (which assembles) * New module ghci/ObjLink is the object-code linker. * compMan/CmLink is removed entirely (was out of place) Ditto CmTypes (which was tiny) * Linker.c initialises the linker when it is first used (no need to call initLinker any more). Template Haskell makes it harder to know when and whether to initialise the linker. ------------------------------------- Gathering the LIE in the type checker ------------------------------------- * Instead of explicitly gathering constraints in the LIE tcExpr :: RenamedExpr -> TcM (TypecheckedExpr, LIE) we now dump the constraints into a mutable varabiable carried by the monad, so we get tcExpr :: RenamedExpr -> TcM TypecheckedExpr Much less clutter in the code, and more efficient too. (Originally suggested by Mark Shields.) ----------------- Remove "SysNames" ----------------- Because the renamer and the type checker were entirely separate, we had to carry some rather tiresome implicit binders (or "SysNames") along inside some of the HsDecl data structures. They were both tiresome and fragile. Now that the typechecker and renamer are more intimately coupled, we can eliminate SysNames (well, mostly... default methods still carry something similar). ------------- Clean up HsPat ------------- One big clean up is this: instead of having two HsPat types (InPat and OutPat), they are now combined into one. This is more consistent with the way that HsExpr etc is handled; there are some 'Out' constructors for the type checker output. So: HsPat.InPat --> HsPat.Pat HsPat.OutPat --> HsPat.Pat No 'pat' type parameter in HsExpr, HsBinds, etc Constructor patterns are nicer now: they use HsPat.HsConDetails for the three cases of constructor patterns: prefix, infix, and record-bindings The *same* data type HsConDetails is used in the type declaration of the data type (HsDecls.TyData) Lots of associated clean-up operations here and there. Less code. Everything is wonderful.
-
- 10 Sep, 2002 1 commit
-
-
simonmar authored
Put debugging output in #ifdef DEBUG MERGE TO STABLE
-
- 06 Sep, 2002 1 commit
-
-
simonmar authored
Finally separate the compiler from hslibs. Mainly import wibbles, and use the new POSIX library when bootstrapping.
-
- 30 Aug, 2002 1 commit
-
-
simonmar authored
Remove unused import of PrelPack (should fix the build again)
-
- 29 Aug, 2002 1 commit
-
-
simonmar authored
Housekeeping: - The main goal is to remove dependencies on hslibs for a bootstrapped compiler, leaving only a requirement that the packages base, haskell98 and readline are built in stage 1 in order to bootstrap. We're almost there: Posix is still required for signal handling, but all other dependencies on hslibs are now gone. Uses of Addr and ByteArray/MutableByteArray array are all gone from the compiler. PrimPacked defines the Ptr type for GHC 4.08 (which didn't have it), and it defines simple BA and MBA types to replace uses of ByteArray and MutableByteArray respectively. - Clean up import lists. HsVersions.h now defines macros for some modules which have moved between GHC versions. eg. one now imports 'GLAEXTS' to get at unboxed types and primops in the compiler. Many import lists have been sorted as per the recommendations in the new style guidelines in the commentary. I've built the compiler with GHC 4.08.2, 5.00.2, 5.02.3, 5.04 and itself, and everything still works here. Doubtless I've got something wrong, though.
-
- 10 Jul, 2002 1 commit
-
-
sof authored
printDump,printErrs,printSDoc: flush stdout and stderr
-
- 04 Jul, 2002 1 commit
-
-
simonmar authored
In hPutLitString, catch the empty string case before calling hPutBuf. Some older versions of hPutBufFull choke on a zero-length buffer. Fixes occasional problems with the Sparc native code generator, which uses SLIT("") in a couple of places.
-
- 27 May, 2002 1 commit
-
-
simonmar authored
Use Unique.getKey instead of Unique.u2i (they are the same function).
-
- 24 May, 2002 1 commit
-
-
simonpj authored
speakNth works for 11,12,13
-
- 11 May, 2002 1 commit
-
-
panne authored
Include hschooks.h via a global option to get ghc_strlen's prototype. It's too omnipresent for per-file OPTIONS.
-
- 10 May, 2002 1 commit
-
-
panne authored
Re-enable bootstrapping: More Ptr trouble, now that it's (almost) abstract...
-
- 03 May, 2002 1 commit
-
-
simonmar authored
In the get method for FastString, do the dictionary lookup strictly (speeds things up and reduces the residency by a few k).
-
- 01 May, 2002 1 commit
-
-
simonmar authored
- When converting ModuleNames to Modules for use in the the module initialisation code, look them up in the IfaceTable(s) instead of calling findModule again. They are guaranteed to be in either the HomeIfaceTable or the PackageIfaceTable after the renamer, so this saves some trips to the filesystem. Also, move this code earlier in the compilation cycle to avoid holding on to the renamed syntax for too long (not sure if this makes a difference or not, but it definitely looked space-leakish before). - remove Util.unJust, it is a duplicate of Maybes.expectJust
-
- 29 Apr, 2002 2 commits
-
-
simonmar authored
- Fix bootstrapped compilation, - Add the following RULE: text "abc" ==> ptext SLIT("abc") so most of the time there shouldn't be any need to use SLIT(). I'll go around and apply the opposite of the above RULE once I've convinced myself that the RULE does what it should.
-
simonmar authored
FastString cleanup, stage 1. The FastString type is no longer a mixture of hashed strings and literal strings, it contains hashed strings only with O(1) comparison (except for UnicodeStr, but that will also go away in due course). To create a literal instance of FastString, use FSLIT(".."). By far the most common use of the old literal version of FastString was in the pattern ptext SLIT("...") this combination still works, although it doesn't go via FastString any more. The next stage will be to remove the need to use this special combination at all, using a RULE. To convert a FastString into an SDoc, now use 'ftext' instead of 'ptext'. I've also removed all the FAST_STRING related macros from HsVersions.h except for SLIT and FSLIT, just use the relevant functions from FastString instead.
-
- 22 Apr, 2002 2 commits
- 11 Apr, 2002 1 commit
-
-
simonpj authored
------------------- Mainly derived Read ------------------- This commit is a tangle of several things that somehow got wound up together, I'm afraid. The main course ~~~~~~~~~~~~~~~ Replace the derived-Read machinery with Koen's cunning new parser combinator library. The result should be * much smaller code sizes from derived Read * faster execution of derived Read WARNING: I have not thoroughly tested this stuff; I'd be glad if you did! All the hard work is done, but there may be a few nits. The Read class gets two new methods, not exposed in the H98 inteface of course: class Read a where readsPrec :: Int -> ReadS a readList :: ReadS [a] readPrec :: ReadPrec a -- NEW readListPrec :: ReadPrec [a] -- NEW There are the following new libraries: Text.ParserCombinators.ReadP Koens combinator parser Text.ParserCombinators.ReadPrec Ditto, but with precedences Text.Read.Lex An emasculated lexical analyser that provides the functionality of H98 'lex' TcGenDeriv is changed to generate code that uses the new libraries. The built-in instances of Read (List, Maybe, tuples, etc) use the new libraries. Other stuff ~~~~~~~~~~~ 1. Some fixes the the plumbing of external-core generation. Sigbjorn did most of the work earlier, but this commit completes the renaming and typechecking plumbing. 2. Runtime error-generation functions, such as GHC.Err.recSelErr, GHC.Err.recUpdErr, etc, now take an Addr#, pointing to a UTF8-encoded C string, instead of a Haskell string. This makes the *calls* to these functions easier to generate, and smaller too, which is a good thing. In particular, it means that MkId.mkRecordSelectorId doesn't need to be passed "unpackCStringId", which was GRUESOME; and that in turn means that tcTypeAndClassDecls doesn't need to be passed unf_env, which is a very worthwhile cleanup. Win/win situation. 3. GHC now faithfully translates do-notation using ">>" for statements with no binding, just as the report says. While I was there I tidied up HsDo to take a list of Ids instead of 3 (but now 4) separate Ids. Saves a bit of code here and there. Also introduced Inst.newMethodFromName to package a common idiom.
-
- 05 Apr, 2002 1 commit
-
-
sof authored
Friday afternoon pet peeve removal: define (Util.notNull :: [a] -> Bool) and use it
-