Manuel M T Chakravarty [Thu, 28 Dec 2006 01:03:48 +0000 (01:03 +0000)]
Parse and desugar equational constraints
- With -findexed-types, equational constraints can appear in contexts
wherever class predicates are allowed.
- The two argument types need to be boxed and rank 0.
Pepe Iborra [Fri, 22 Dec 2006 16:55:41 +0000 (16:55 +0000)]
Remove a reference to GHC.Exts.Ptr in stage1
Hopefully this will help to restore ability to build HEAD on GHC 5.0x systems
Ian Lynagh [Fri, 22 Dec 2006 14:15:54 +0000 (14:15 +0000)]
Handle LongArg's in the FFI on x86
simonpj@microsoft.com [Fri, 22 Dec 2006 14:15:51 +0000 (14:15 +0000)]
Improve documentation about packages
Ian Lynagh [Fri, 22 Dec 2006 13:39:40 +0000 (13:39 +0000)]
Remove ' in cpp error
simonpj@microsoft.com [Fri, 22 Dec 2006 09:34:31 +0000 (09:34 +0000)]
Documentation for class contexts in data-constructor declarations
Ian Lynagh [Thu, 21 Dec 2006 02:38:25 +0000 (02:38 +0000)]
Allow a word-sized argument for STKCHECK
Ian Lynagh [Wed, 20 Dec 2006 22:07:15 +0000 (22:07 +0000)]
Parse and use ghci nofib output
Manuel M T Chakravarty [Thu, 21 Dec 2006 00:40:58 +0000 (00:40 +0000)]
Add hook to fam inst consistency check to GHCi/--make
Pepe Iborra [Wed, 20 Dec 2006 04:24:17 +0000 (04:24 +0000)]
Fix import lists
Manuel M T Chakravarty [Tue, 19 Dec 2006 21:30:17 +0000 (21:30 +0000)]
Deriving for indexed newtypes
- The isomorphism-based newtype-deriving isn't very useful for indexed types
right now as it rejects all recursive declarations, and we have to mark
all indexed type instances as recurrsive as we can't guarantee that future
instances aren't going to make them part of a recursive group.
Manuel M T Chakravarty [Tue, 19 Dec 2006 19:25:06 +0000 (19:25 +0000)]
Fixed uninitialised FunBind fun_tick field
Ian Lynagh [Tue, 19 Dec 2006 15:59:54 +0000 (15:59 +0000)]
Add HscTypes.hi-boot-6 so builds with older GHCs succeed
Manuel M T Chakravarty [Mon, 18 Dec 2006 21:12:05 +0000 (21:12 +0000)]
Deriving for indexed data types
- This patch implements deriving clauses for data instance declarations
(toplevel and associated)
- Doesn't support standalone deriving. This could be easily supported,
but requires an extension of the syntax of standalone deriving clauses.
Björn, fancy adding this?
- We cannot derive Typeable. This seems a problem of notation, more than
anything else. Why? For a binary vanilla data type "T a b", we would
generate an instance Typeable2 T; ie, the instance is for the constructor
alone. In the case of a family instance, such as (S [a] (Maybe b)), we
simply have no means to denote the associated constuctor. It appears to
require type level lambda - something like (/\a b. S [a] (Maybe b).
- Derivings are for *individual* family *instances*, not for entire families.
Currently, I know of no simple translation of class instances for entire
families to System F_C. This actually seems to be similar to implementing
open data types à la Löh & Hinze.
- This patch only covers data types, not newtypes.
Ian Lynagh [Mon, 18 Dec 2006 15:24:23 +0000 (15:24 +0000)]
Don't overwrite old memory with 0xaa when doing a realloc
Pepe Iborra [Mon, 18 Dec 2006 14:17:15 +0000 (14:17 +0000)]
Replace association list in AddressEnv for a FiniteMap
Pepe Iborra [Mon, 18 Dec 2006 09:53:43 +0000 (09:53 +0000)]
Remove uses of Data.Traversable to fix stage1 on pre ghc-6.6 systems
Pepe Iborra [Sun, 17 Dec 2006 00:11:50 +0000 (00:11 +0000)]
Propagate the DEBUGGER flag to the Makefile for stage 2
Ian Lynagh [Sat, 16 Dec 2006 17:39:57 +0000 (17:39 +0000)]
Merge DynFlags changes
Pepe Iborra [Sat, 16 Dec 2006 11:46:24 +0000 (11:46 +0000)]
Fix an overlapping of uniques in PrelNames
Ian Lynagh [Sat, 16 Dec 2006 02:25:35 +0000 (02:25 +0000)]
Fix the build
Pepe Iborra [Mon, 11 Dec 2006 18:13:07 +0000 (18:13 +0000)]
Toggle whether the RTS gets build with debugger support for ghci
Specifically, this disables the special support in the RTS for looking up the datacon name corresponding to an address.
Correspondingly, the debugging commads in GHCi will not be available, and neither will the '-fdebugging' flag
Pepe Iborra [Mon, 11 Dec 2006 16:20:27 +0000 (16:20 +0000)]
Adjust code from manual merges
Pepe Iborra [Mon, 11 Dec 2006 15:34:53 +0000 (15:34 +0000)]
Fix an issue with lazyness in the closure viewer
Pepe Iborra [Sun, 10 Dec 2006 23:20:18 +0000 (23:20 +0000)]
Closure inspection in GHCi
The :print, :sprint and :force commands for GHCi.
This set of commands allows inspection of heap structures of the bindings in the interactive environment.
This is useful to observe lazyness and specially to inspect things with undespecified polymorphic types, as happens often in breakpoints.
Pepe Iborra [Sun, 10 Dec 2006 23:15:51 +0000 (23:15 +0000)]
Dynamic breakpoints in GHCi
This patch adds dynamic breakpoints to GHCi
There is a new ':breakpoint' command to manage breakpoints.
GHCi simply uses the breakpoint api functions in ghc-api to install itself as a client.
The mechanism used by GHCi to keep track of enabled breakpoints is a simple table.
When a breakpoint is hit, a new interactive session is launched and the bindings in the breakpoint are injected. Some commands are disabled in this sub session
Pepe Iborra [Sun, 10 Dec 2006 23:05:53 +0000 (23:05 +0000)]
Split the GHCi monad apart from InteractiveUI, together with some related functions
I found this convenient while I was extending ghci with the debugger. I wanted to put all the debugger stuff in a separate module, but I would need a huge hs-boot file to break the circular dependencies. This option seemed better
Pepe Iborra [Sun, 10 Dec 2006 22:32:17 +0000 (22:32 +0000)]
Add the debugger related modules to package.conf
Pepe Iborra [Sun, 10 Dec 2006 22:31:02 +0000 (22:31 +0000)]
Prevent breakpoint instrumentation of spliced code
Pepe Iborra [Sun, 10 Dec 2006 22:25:40 +0000 (22:25 +0000)]
Capturing and keeping track of local bindins in the desugarer
Used in the desugaring of the breakpoint primitive
Pepe Iborra [Sun, 10 Dec 2006 22:24:24 +0000 (22:24 +0000)]
Handle breakpoint jumps while splicing TH functions in ghci
The dynamic linker has been modified so that it won't panic if one of the breakpointJump functions fails to resolve.
Now, if the dynamic linker fails to find a HValue for a Name, before looking for a static symbol it will ask to
Breakpoints.lookupBogusBreakpointVal :: Name -> Maybe HValue
which returns an identity function for the Jump names or Nothing else.
A TH function might contain a call to a breakpoint function. So if it is compiled to bytecodes, the breakpoints will be desugared to 'jumps'. Whenever this code is spliced, the linker will fail to find the jumpfunctions unless there is a default.
Pepe Iborra [Sun, 10 Dec 2006 20:49:34 +0000 (20:49 +0000)]
Breakpoint code instrumentation
Instrumentation gets activated by the '-fdebugging' dynflag.
All the instrumentation occurrs in the desugarer; it consists of inserting 'breakpoint' combinators at a number of places in the AST, namely:
- Binding sites
- Do-notation statements
These 'breakpoint' combinators will later be further desugared (at DsExpr) into ___Jump functions.
For more info about this and all the ghci.debugger see the page at the GHC wiki:
http://hackage.haskell.org/trac/ghc/wiki/GhciDebugger
Pepe Iborra [Sun, 10 Dec 2006 20:37:29 +0000 (20:37 +0000)]
The breakpoint primitive
Pepe Iborra [Sun, 10 Dec 2006 18:41:23 +0000 (18:41 +0000)]
GHCi debugger documentation
Pepe Iborra [Sun, 10 Dec 2006 18:40:27 +0000 (18:40 +0000)]
Extend the GHC API with breakpoints and breakpoint handlers
The entry point is:
setBreakpointHandler :: Session -> BkptHandler Module -> IO ()
Pepe Iborra [Sun, 10 Dec 2006 17:30:05 +0000 (17:30 +0000)]
Playing with closures
RtClosureInspect includes a bunch of stuff for playing with closures:
- the datatype Closure is the low level representation type
- the datatype Term is the high level representation type
- cvObtainTerm is the main entry point, providing the Term representation of an arbitrary closure
Pepe Iborra [Sun, 10 Dec 2006 11:29:44 +0000 (11:29 +0000)]
Retrieving the datacon of an arbitrary closure
This patch extends the RTS linker and the dynamic linker so that it is possible to find out the datacon of a closure in heap at runtime:
- The RTS linker now carries a hashtable 'Address->Symbol' for data constructors
- The Persistent Linker State in the dynamic linker is extended in a similar way.
Finally, these two sources of information are consulted by:
> Linker.recoverDataCon :: a -> TcM Name
Pepe Iborra [Sat, 9 Dec 2006 17:38:23 +0000 (17:38 +0000)]
Two new prim ops to access the Info Table and Payload of a closure:
- infoPtr# :: a -> Addr#
- closurePayload# :: a -> (# Array b, ByteArr# #)
These prim ops provide the magic behind the ':print' command
Ian Lynagh [Fri, 15 Dec 2006 21:44:30 +0000 (21:44 +0000)]
Free more things that we allocate
Ian Lynagh [Fri, 15 Dec 2006 17:26:17 +0000 (17:26 +0000)]
Free all tasks on exit, not just those on the task_free_list
Ian Lynagh [Fri, 15 Dec 2006 17:25:58 +0000 (17:25 +0000)]
Give cap its correct type, rather than void
Ian Lynagh [Fri, 15 Dec 2006 16:42:10 +0000 (16:42 +0000)]
Put the task on the free list in workerTaskStop
Ian Lynagh [Fri, 15 Dec 2006 13:45:07 +0000 (13:45 +0000)]
Free various things we allocate
andy@galois.com [Thu, 14 Dec 2006 23:52:10 +0000 (23:52 +0000)]
Updating rix output to new standard.
Simon Marlow [Thu, 14 Dec 2006 11:09:47 +0000 (11:09 +0000)]
update, and add some more build flavours (inc. dons's fast build)
Simon Marlow [Thu, 14 Dec 2006 11:09:01 +0000 (11:09 +0000)]
Rework the block allocator
The main goal here is to reduce fragmentation, which turns out to be
the case of #743. While I was here I found some opportunities to
improve performance too. The code is rather more complex, but it also
contains a long comment describing the strategy, so please take a look
at that for the details.
Simon Marlow [Thu, 14 Dec 2006 10:11:02 +0000 (10:11 +0000)]
fix wibble in memory leak error dump
andy@galois.com [Wed, 13 Dec 2006 18:45:02 +0000 (18:45 +0000)]
Removing explicit Binary Tick Boxes; using Case instead.
simonpj@microsoft.com [Wed, 13 Dec 2006 16:29:15 +0000 (16:29 +0000)]
Add left-to-right impredicative instantiation
People keep complaining, with some justification, that
runST $ foo
doesn't work. So I've finally caved in. The difficulty with the above
is that we need to decide how to instantiate ($)'s type arguments based
on the first argument (runST), and then use that info to check the second
argumnent. There is a left-to-right flow of information.
It's not hard to implement this, and it's clearly useful. The main
change is in TcExpr.tcArgs, with some knock-on effects elsewhere.
I was finally provoked into this by Trac #981, which turned out, after some
head-scratching, to be another instance of the same problem.
(There was some bug-fixing too; a type like ((?x::Int) => ...) is a polytype
even though it has no leading for-alls, but the new TcUnify code was not
treating it right.)
Test for this is tc222
andy@galois.com [Wed, 13 Dec 2006 16:06:51 +0000 (16:06 +0000)]
Removing unused argument to a printf.
andy@galois.com [Wed, 13 Dec 2006 16:06:01 +0000 (16:06 +0000)]
fixing obvious typo in darwin_HOST_OS code (currently does not compile).
wolfgang.thaller@gmx.net [Wed, 13 Dec 2006 13:38:08 +0000 (13:38 +0000)]
PowerPC NCG: support conditional branches outside +-32KB
Work around the PowerPC architecture's +-32KB limitation for conditional
branches by conditionally skipping an unconditional branch instead
(unconditional branches have a +-32MB range).
This requires an extra pass over the basic blocks for each CmmTop after
block sequencing, to determine which branches are "far".
Fixes ticket #709, "Fixup too large" error with -fasm on PowerPC
Ian Lynagh [Wed, 13 Dec 2006 13:35:18 +0000 (13:35 +0000)]
Fix allocation debugger to handle allocations in con/destructors
conc021 is an example of a program that broke.
It doesn't handle them particularly well still, but it doesn't crash at
least.
Simon Marlow [Tue, 12 Dec 2006 15:33:53 +0000 (15:33 +0000)]
Don't free sched_mutex until freeTaskManager has finished with it
Also move closeMutex() etc. into freeTaskManager, this is a free-ish thing
Ian Lynagh [Wed, 13 Dec 2006 12:26:02 +0000 (12:26 +0000)]
Give a better panic if the allocation debugger is used uninitialised
andy@galois.com [Wed, 13 Dec 2006 00:19:17 +0000 (00:19 +0000)]
Misc Hpc improvement to dynamic tracer output
- Added HPCRIX support for passing tracer filename.
- Added thread tracing support.
- Cleaned up use of HsFFI.h
andy@galois.com [Sat, 9 Dec 2006 05:03:34 +0000 (05:03 +0000)]
Adding tracing support
andy@galois.com [Thu, 30 Nov 2006 00:30:24 +0000 (00:30 +0000)]
Misc unsigned printing issues; adding magicTixNumber.
Ian Lynagh [Tue, 12 Dec 2006 20:11:27 +0000 (20:11 +0000)]
Turn -Wall on
Ian Lynagh [Tue, 12 Dec 2006 20:04:22 +0000 (20:04 +0000)]
Fix more warnings
Ian Lynagh [Tue, 12 Dec 2006 18:22:15 +0000 (18:22 +0000)]
Fix whitespace
Ian Lynagh [Tue, 12 Dec 2006 18:20:44 +0000 (18:20 +0000)]
Silence some warnings
Ian Lynagh [Tue, 12 Dec 2006 17:43:10 +0000 (17:43 +0000)]
Fix more warnings
Ian Lynagh [Tue, 12 Dec 2006 17:37:05 +0000 (17:37 +0000)]
Remove trailing white space
Ian Lynagh [Tue, 12 Dec 2006 17:36:25 +0000 (17:36 +0000)]
Detab
Ian Lynagh [Tue, 12 Dec 2006 17:34:27 +0000 (17:34 +0000)]
Fix thd3
Ian Lynagh [Tue, 12 Dec 2006 17:34:04 +0000 (17:34 +0000)]
Silence some warnings
Ian Lynagh [Tue, 12 Dec 2006 17:27:56 +0000 (17:27 +0000)]
Silence more warnings
Ian Lynagh [Tue, 12 Dec 2006 16:46:51 +0000 (16:46 +0000)]
More warning fixes
Ian Lynagh [Tue, 12 Dec 2006 16:26:24 +0000 (16:26 +0000)]
Fix more warnings
Ian Lynagh [Tue, 12 Dec 2006 16:17:54 +0000 (16:17 +0000)]
More warning fixes and some code rejigging
Ian Lynagh [Tue, 12 Dec 2006 16:10:26 +0000 (16:10 +0000)]
Fix more warnings
Ian Lynagh [Tue, 12 Dec 2006 16:00:20 +0000 (16:00 +0000)]
Fix some warnings
Ian Lynagh [Tue, 12 Dec 2006 15:48:01 +0000 (15:48 +0000)]
Beautify a bit
Ian Lynagh [Tue, 12 Dec 2006 15:43:07 +0000 (15:43 +0000)]
Remove trailing spaces
Ian Lynagh [Tue, 12 Dec 2006 15:42:11 +0000 (15:42 +0000)]
Detab
simonpj@microsoft.com [Tue, 12 Dec 2006 13:28:13 +0000 (13:28 +0000)]
Missed a stage-2 problem in the TcSimplify refactoring
simonpj@microsoft.com [Tue, 12 Dec 2006 13:28:02 +0000 (13:28 +0000)]
Comments only
Simon Marlow [Tue, 12 Dec 2006 10:36:23 +0000 (10:36 +0000)]
MERGE: Fix Windows DEP violations (bug #885)
Original patch by brianlsmith@gmail.com
Simon Marlow [Tue, 12 Dec 2006 10:32:37 +0000 (10:32 +0000)]
Fix the pattern for _hpc symbols: it incorrectly matched the _hp suffix too
This has the undesitrable effect that stg_gc_gen_hp in the RTS was
caught as an HPC symbol and put in the data segment.
simonpj@microsoft.com [Tue, 12 Dec 2006 09:25:56 +0000 (09:25 +0000)]
Fix up yesterdays commit to TcSimplify; fixes broken HEAD
simonpj@microsoft.com [Mon, 11 Dec 2006 16:51:41 +0000 (16:51 +0000)]
Add comments, plus fix zapFragileInfo to zap worker info
This is a minor fix up to the patch
* retain arity for let-bound vars in simplifier
simonpj@microsoft.com [Mon, 11 Dec 2006 16:43:33 +0000 (16:43 +0000)]
Add comments about pruning implication constraints
wolfgang.thaller@gmx.net [Mon, 11 Dec 2006 22:26:35 +0000 (22:26 +0000)]
Unbreak x86_64 PIC patch, part 3
This time, the PowerPC NCG suffered from a typo.
(I've really grown to hate all those #if foo_TARGET_ARCH
lines. I need to build GHC for at least four different
platforms just to make sure that there are no typos...)
wolfgang.thaller@gmx.net [Mon, 11 Dec 2006 22:25:34 +0000 (22:25 +0000)]
Support MO_WriteBarrier in PowerPC NCG (lwsync instruction)
Ian Lynagh [Mon, 11 Dec 2006 19:21:03 +0000 (19:21 +0000)]
Fix allocate name clash in the HEAD
Ian Lynagh [Mon, 11 Dec 2006 13:10:04 +0000 (13:10 +0000)]
Add freeScheduler/freeTaskManager and call it later than exitScheduler
We were freeing the tasks in exitScheduler (stopTaskManager) before
exitStorage (stat_exit), but the latter needs to walk down the list
printing stats. Resulted in segfaults with commands like
ghc -v0 -e main q.hs -H32m -H32m +RTS -Sstderr
(where q.hs is trivial), but very sensitive to exact commandline and
libc version or something.
Ian Lynagh [Mon, 11 Dec 2006 12:49:50 +0000 (12:49 +0000)]
When debugging, have the allocator help us a bit
We now check for freeing memory that isn't allocated, and overwrite memory
we are about to free with 0xaa.
It might be nice to also have a flag to control whether the memory
actually gets free'd.
simonpj@microsoft.com [Mon, 11 Dec 2006 16:07:32 +0000 (16:07 +0000)]
More refactoring of constraint simplification
This patch fixes several bugs in the handling of impliciation
constraints, thereby fixing several regression-suite failures.
On the way I managed to further simplify the code in TcSimplify;
the extra lines are comments.
simonpj@microsoft.com [Mon, 11 Dec 2006 16:05:57 +0000 (16:05 +0000)]
Improve origin of constraints in subsumption checking
simonpj@microsoft.com [Mon, 11 Dec 2006 16:05:17 +0000 (16:05 +0000)]
Suggests -fglasgow-exts for contexts-differ-in-length error
simonpj@microsoft.com [Mon, 11 Dec 2006 16:04:09 +0000 (16:04 +0000)]
Comments and layout only
simonpj@microsoft.com [Mon, 11 Dec 2006 15:50:35 +0000 (15:50 +0000)]
Remove strange extra print (a temporary debug?)
simonpj@microsoft.com [Fri, 8 Dec 2006 13:48:07 +0000 (13:48 +0000)]
Fix typo
simonpj@microsoft.com [Fri, 8 Dec 2006 13:46:29 +0000 (13:46 +0000)]
Improve parsing for bang patterns (fixes Trac #1041)
wolfgang.thaller@gmx.net [Sun, 10 Dec 2006 13:27:12 +0000 (13:27 +0000)]
Unbreak x86_64 PIC patch, part 2
Continue repairing breakage from patch
"x86_64: support PIC and therefore, Mac OS X in the NCG",
this time something affecting (linux && !i386)
Ian Lynagh [Sat, 9 Dec 2006 18:51:52 +0000 (18:51 +0000)]
Use System.IO.stderr rather than IO.stderr in GHCi. Fixes trac #1001.
GHCi evaluates a command to flush the stdout/stderr buffers, but this
command can only use names that are in scope. It used to need IO.stderr
from the haskell98 package, but this patch means it only needs things
from the base package.
Ian Lynagh [Sat, 9 Dec 2006 17:42:03 +0000 (17:42 +0000)]
Add PowerPC to the list of SMP arches
sven.panne@aedion.de [Sat, 9 Dec 2006 12:51:54 +0000 (12:51 +0000)]
Make './darcs-all get --complete' work
Simon Marlow [Thu, 7 Dec 2006 15:16:44 +0000 (15:16 +0000)]
fix for #1013.
We weren't getting the bitmap right for the continuation BCO in a case-of-case.