summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* EqPred pretty prints as ~ and equalities without bracketsManuel M T Chakravarty2006-12-292-6/+11
|
* Construction of EqPred dictionariesManuel M T Chakravarty2006-12-293-6/+14
|
* data family declarations are fine without any type argumentsManuel M T Chakravarty2006-12-291-2/+1
|
* Add missing case for documented types in the type desugarerdavve@dtek.chalmers.se2006-12-291-0/+3
|
* Avoid duplicate error report when renaming HsDoc stuffsimonpj@microsoft.com2006-12-291-58/+66
| | | | | | | | | | | | | | | | This patch is a bit of a hack to avoid a duplicate error when checking class C a where op :: a -> a op2 x = x (This is tcfail077) For reasons I don't understand, the decl of op2 generates an HsDeclEntity, and that gives a renamer error which duplicates the (better) one that comes from rnMethodBinds. A better fix might be to get rid of HsDeclEntities altogether.
* Add newline to end of filesimonpj@microsoft.com2006-12-291-1/+1
|
* Adding a GENERATED pragmaandy@galois.com2006-12-298-4/+47
| | | | | | | | Adding a {-# GENERATED "SourceFile" SourceSpan #-} <expr> pragma. This will be used to generate coverage for tool generated (or quoted) code. The pragma states the the expression was generated/quoted from the stated source file and source span.
* Parse and desugar equational constraintsManuel M T Chakravarty2006-12-289-60/+106
| | | | | | - 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.
* Remove a reference to GHC.Exts.Ptr in stage1Pepe Iborra2006-12-221-0/+4
| | | | | Hopefully this will help to restore ability to build HEAD on GHC 5.0x systems
* Handle LongArg's in the FFI on x86Ian Lynagh2006-12-222-1/+2
|
* Allow a word-sized argument for STKCHECKIan Lynagh2006-12-212-4/+27
|
* Add hook to fam inst consistency check to GHCi/--makeManuel M T Chakravarty2006-12-211-13/+26
|
* Fix import listsPepe Iborra2006-12-205-43/+31
|
* Deriving for indexed newtypesManuel M T Chakravarty2006-12-191-16/+47
| | | | | | | - 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.
* Fixed uninitialised FunBind fun_tick fieldManuel M T Chakravarty2006-12-191-2/+5
|
* Add HscTypes.hi-boot-6 so builds with older GHCs succeedIan Lynagh2006-12-191-0/+3
|
* Deriving for indexed data typesManuel M T Chakravarty2006-12-184-63/+185
| | | | | | | | | | | | | | | | | | | - 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.
* Replace association list in AddressEnv for a FiniteMapPepe Iborra2006-12-182-17/+14
|
* Remove uses of Data.Traversable to fix stage1 on pre ghc-6.6 systemsPepe Iborra2006-12-184-9/+11
|
* Propagate the DEBUGGER flag to the Makefile for stage 2Pepe Iborra2006-12-171-1/+7
|
* Merge DynFlags changes2006-12-17Ian Lynagh2006-12-161-3/+4
|
* Fix an overlapping of uniques in PrelNamesPepe Iborra2006-12-161-4/+4
|
* Fix the buildIan Lynagh2006-12-162-2/+5
|
* Toggle whether the RTS gets build with debugger support for ghciPepe Iborra2006-12-116-6/+22
| | | | | | 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
* Adjust code from manual mergesPepe Iborra2006-12-118-41/+56
|
* Fix an issue with lazyness in the closure viewerPepe Iborra2006-12-112-3/+8
|
* Closure inspection in GHCiPepe Iborra2006-12-104-2/+269
| | | | | | | 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.
* Dynamic breakpoints in GHCiPepe Iborra2006-12-104-98/+500
| | | | | | | | | | | | 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
* Split the GHCi monad apart from InteractiveUI, together with some related ↵Pepe Iborra2006-12-102-198/+221
| | | | | | | 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
* Add the debugger related modules to package.confPepe Iborra2006-12-101-0/+4
|
* Prevent breakpoint instrumentation of spliced codePepe Iborra2006-12-101-1/+2
|
* Capturing and keeping track of local bindins in the desugarerPepe Iborra2006-12-103-28/+59
| | | | | Used in the desugaring of the breakpoint primitive
* Handle breakpoint jumps while splicing TH functions in ghciPepe Iborra2006-12-102-0/+25
| | | | | | | | | | | | 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.
* Breakpoint code instrumentationPepe Iborra2006-12-1013-25/+166
| | | | | | | | | | | | | 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
* The breakpoint primitivePepe Iborra2006-12-105-111/+176
|
* Extend the GHC API with breakpoints and breakpoint handlersPepe Iborra2006-12-104-3/+112
| | | | | | | The entry point is: setBreakpointHandler :: Session -> BkptHandler Module -> IO ()
* Playing with closuresPepe Iborra2006-12-105-13/+685
| | | | | | | | | 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
* Retrieving the datacon of an arbitrary closurePepe Iborra2006-12-105-14/+116
| | | | | | | | | | | 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
* Two new prim ops to access the Info Table and Payload of a closure:Pepe Iborra2006-12-091-0/+10
| | | | | | | | - infoPtr# :: a -> Addr# - closurePayload# :: a -> (# Array b, ByteArr# #) These prim ops provide the magic behind the ':print' command
* Removing explicit Binary Tick Boxes; using Case instead.andy@galois.com2006-12-134-85/+9
|
* Add left-to-right impredicative instantiationsimonpj@microsoft.com2006-12-133-77/+136
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* PowerPC NCG: support conditional branches outside +-32KBwolfgang.thaller@gmx.net2006-12-134-2/+76
| | | | | | | | | | | 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
* Misc Hpc improvement to dynamic tracer outputandy@galois.com2006-12-131-1/+5
| | | | | | | - Added HPCRIX support for passing tracer filename. - Added thread tracing support. - Cleaned up use of HsFFI.h
* Adding tracing supportandy@galois.com2006-12-097-67/+59
|
* Missed a stage-2 problem in the TcSimplify refactoringsimonpj@microsoft.com2006-12-121-2/+2
|
* Comments onlysimonpj@microsoft.com2006-12-121-0/+8
|
* MERGE: Fix Windows DEP violations (bug #885)Simon Marlow2006-12-125-32/+50
| | | | Original patch by brianlsmith@gmail.com
* Fix up yesterdays commit to TcSimplify; fixes broken HEADsimonpj@microsoft.com2006-12-123-7/+4
|
* Add comments, plus fix zapFragileInfo to zap worker infosimonpj@microsoft.com2006-12-112-2/+9
| | | | | | This is a minor fix up to the patch * retain arity for let-bound vars in simplifier
* Add comments about pruning implication constraintssimonpj@microsoft.com2006-12-111-0/+15
|