- 09 Jan, 2006 4 commits
-
-
simonmar authored
-
simonmar authored
Avoid desugaring bug in HEAD (see test ds057).
-
simonmar authored
Fix up to compile with GHC 5.04.x again. Also includes a fix for a memory error I discovered along the way: should fix the "scavenge_one" crash in the stage2 build of recent HEADs.
-
simonmar authored
ord# and chr# should be no-ops, not conversions between wordRep and I32.
-
- 06 Jan, 2006 2 commits
-
-
simonmar authored
Add support for UTF-8 source files GHC finally has support for full Unicode in source files. Source files are now assumed to be UTF-8 encoded, and the full range of Unicode characters can be used, with classifications recognised using the implementation from Data.Char. This incedentally means that only the stage2 compiler will recognise Unicode in source files, because I was too lazy to port the unicode classifier code into libcompat. Additionally, the following synonyms for keywords are now recognised: forall symbol (U+2200) forall right arrow (U+2192) -> left arrow (U+2190) <- horizontal ellipsis (U+22EF) .. there are probably more things we could add here. This will break some source files if Latin-1 characters are being used. In most cases this should result in a UTF-8 decoding error. Later on if we want to support more encodings (perhaps with a pragma to specify the encoding), I plan to do it by recoding into UTF-8 before parsing. Internally, there were some pretty big changes: - FastStrings are now stored in UTF-8 - Z-encoding has been moved right to the back end. Previously we used to Z-encode every identifier on the way in for simplicity, and only decode when we needed to show something to the user. Instead, we now keep every string in its UTF-8 encoding, and Z-encode right before printing it out. To avoid Z-encoding the same string multiple times, the Z-encoding is cached inside the FastString the first time it is requested. This speeds up the compiler - I've measured some definite improvement in parsing at least, and I expect compilations overall to be faster too. It also cleans up a lot of cruft from the OccName interface. Z-encoding is nicely hidden inside the Outputable instance for Names & OccNames now. - StringBuffers are UTF-8 too, and are now represented as ForeignPtrs. - I've put together some test cases, not by any means exhaustive, but there are some interesting UTF-8 decoding error cases that aren't obvious. Also, take a look at unicode001.hs for a demo.
-
simonmar authored
Document -Rghc-timing
-
- 05 Jan, 2006 3 commits
-
-
simonpj authored
MERGE TO STABLE This commit fixes a nasty problem discovered by Volker Stolz. The problem is described in Note [Multiple instantiation] in TcExpr, which is reproduced below. (Core Lint identifies the problem, incidentally.) tc200 is a test case. Note [Multiple instantiation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We are careful never to make a MethodInst that has, as its meth_id, another MethodInst. For example, consider f :: forall a. Eq a => forall b. Ord b => a -> b At a call to f, at say [Int, Bool], it's tempting to translate the call to f_m1 where f_m1 :: forall b. Ord b => Int -> b f_m1 = f Int dEqInt f_m2 :: Int -> Bool f_m2 = f_m1 Bool dOrdBool But notice that f_m2 has f_m1 as its meth_id. Now the danger is that if we do a tcSimplCheck with a Given f_mx :: f Int dEqInt, we may make a binding f_m1 = f_mx But it's entirely possible that f_m2 will continue to float out, because it mentions no type variables. Result, f_m1 isn't in scope. Here's a concrete example that does this (test tc200): class C a where f :: Eq b => b -> a -> Int baz :: Eq a => Int -> a -> Int instance C Int where baz = f Current solution: only do the "method sharing" thing for the first type/dict application, not for the iterated ones. A horribly subtle point.
-
simonpj authored
'newtype' declarations are now parsed exactly like data type declarations, so that you can declare newtypes using GADT syntax. But that means we must check all the newtype restrictions separately, and I mised one. This commit checks that there is no existential context on the newtype. Test is tcfail156
-
simonmar authored
This file is not quite POSIX compliant; hopefully fix build on MacOS X (Tiger)
-
- 04 Jan, 2006 3 commits
- 03 Jan, 2006 8 commits
-
-
simonmar authored
setContextAfterLoad: try to load a target if possible, otherwise load the topmost module in the graph. Previously we were loading the first module in the list, which happened to be right a lot of the time, but not always. Fixes ticket #642
-
simonmar authored
export ModLocation(..)
-
simonmar authored
sanity bugfix: use TSO_OFFSET_stack instead of OFFSET_stack
-
simonmar authored
two fixes for the case when a (synchronous) exception is propagated to the top of a thread's stack, i.e. it is unhandled. 1. store the exception in the right place (we were using the OFFSET_StgTSO_stack macro and not accounting for the TSO's header size) 2. put an stg_enter_info on the stack so that the GC can understand this thread's stack.
-
simonmar authored
for TSO fields, define a Cmm macro TSO_OFFSET_xxx to get the actual offset including the header and variable parts (we were misusing the headerless OFFSET_xxx macros in a couple of places).
-
simonmar authored
wibble in panic message
-
simonmar authored
emit an error message if GNU make 3.7x is found (3.80 is required).
-
simonmar authored
mention that GNU make 3.80 is required.
-
- 29 Dec, 2005 2 commits
- 21 Dec, 2005 1 commit
-
-
simonpj authored
Missing Show instance for FreeRegs on PowerPC
-
- 19 Dec, 2005 5 commits
-
-
simonpj authored
Wibble to printing FunTyCon in GHCi that makes :b GHC.Base work
-
simonpj authored
Marginally improve the error message on a failure in DsMeta
-
simonpj authored
Tiny fix to patterns with type sigs
-
simonpj authored
Allow trailing parens in GADT signatures
-
simonpj authored
** Wibble to Friday's commit (fixes HEAD build) ** ----------------------------------------- Make deriving work for infix constructors ----------------------------------------- Merge to stable branch Back quotes were not being done correctly in deriving Read and Show. Now they are. I think. Test is drvrun018
-
- 16 Dec, 2005 5 commits
-
-
simonpj authored
----------------------------------------- Make deriving work for infix constructors ----------------------------------------- Merge to stable branch Back quotes were not being done correctly in deriving Read and Show. Now they are. I think. Test is drvrun018
-
simonpj authored
Document that type variables in instance context must be distinct; merge to stable
-
simonpj authored
----------------------------------------- Test for repated type variables in an instance decl context; this should require -fallow-undecidable-instances' ----------------------------------------- Merge to stable branch
-
simonmar authored
Avoid building the GHCi version of this lib
-
simonmar authored
Use standard calloc rather than rolling our own. As a small bonus, the standard libc version is more effecient about zeroing the memory. From: Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
-
- 15 Dec, 2005 3 commits
-
-
desrt authored
(( PLEASE MERGE TO STABLE )) Linker.c: linux/ppc: We call mmap() to allocate additional pages to create jump islands. In the case where no additional memory was needed the mmap call was being made with a size of 0 which would fail. The call is now conditionalised and documentation has been added to the code. Closes trac #439.
-
simonmar authored
ignore _darcs
-
simonmar authored
fix missing symbol
-
- 13 Dec, 2005 4 commits
-
-
simonmar authored
Raise the (new) exception NestedAtomically when atomically is nested (using unsafePerformIO). This is a small improvement over crashing.
-
simonmar authored
fix FAQ links
-
simonmar authored
the FAQ is now in the Wiki
-
simonmar authored
while I'm here, bring various other bits of this page up to date
-