summaryrefslogtreecommitdiff
path: root/compiler/ghci
Commit message (Collapse)AuthorAgeFilesLines
* account for the new BLACKHOLEs in the GHCi debuggerSimon Marlow2010-04-061-3/+6
|
* Remove LazyUniqFM; fixes trac #3880Ian Lynagh2010-03-201-1/+1
|
* Refactor PackageTarget back into StaticTargetBen.Lippmeier@anu.edu.au2010-01-041-14/+1
|
* Follow PackageTarget change in byte code generatorBen.Lippmeier@anu.edu.au2010-01-021-0/+14
|
* locateOneObj: don't look for dynamic libs in static modeSimon Marlow2010-01-031-10/+7
| | | | | also replace picIsOn with isDynamicGhcLib, as __PIC__ is not the correct test for whether the GHC library is dynamically linked.
* #3604: treat TH with -dynamic in the same way as -profSimon Marlow2009-11-041-1/+10
| | | | | | | | That is, you have to build the library/program without -dynamic first, to get plain object files, and then build it again with -dynamic. I still need to check whether any changes to Cabal are required to make this work.
* implement case-on-Word in the byte code generator/interpreter (#2881)Simon Marlow2009-09-183-0/+27
|
* Allow TH/annotations to be used with -dynamicSimon Marlow2009-09-081-1/+1
|
* Fix #3461: protect the use of keepCAFs with #ifdef DYNAMICSimon Marlow2009-08-281-0/+2
|
* Follow changes in Cabal: package -> sourcePackageIdSimon Marlow2009-08-241-2/+2
|
* Add unique package identifiers (InstalledPackageId) in the package DBSimon Marlow2009-08-201-9/+12
| | | | | See commentary at http://hackage.haskell.org/trac/ghc/wiki/Commentary/Packages
* trim Data.Sequence import, in preparation for expanding its APIRoss Paterson2009-08-241-1/+1
|
* Make -dynamic a proper way, so we read the .dyn_hi filesSimon Marlow2009-08-201-1/+1
| | | | | | | | Also, I cleaned up some of the way-related infrastructure, removing two global variables. There's more that could be done here, but it's a start. The way flags probably don't need to be static any more.
* Make the dynamic linker thread-safe.Thomas Schilling2009-08-171-144/+146
| | | | | | | | | | | | The current implementation is rather pessimistic. The persistent linker state is now an MVar and all exported Linker functions are wrapped in modifyMVar calls. This is serves as a big lock around all linker functions. There might be a chance for more concurrency in a few places. E.g., extending the closure environment and loading packages might be independent in some cases. But for now it's better to be on the safe side.
* #include fixSimon Marlow2009-08-051-1/+0
|
* remove unnecessary -#include optionsSimon Marlow2009-08-022-4/+0
|
* RTS tidyup sweep, first phaseSimon Marlow2009-08-023-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first phase of this tidyup is focussed on the header files, and in particular making sure we are exposinng publicly exactly what we need to, and no more. - Rts.h now includes everything that the RTS exposes publicly, rather than a random subset of it. - Most of the public header files have moved into subdirectories, and many of them have been renamed. But clients should not need to include any of the other headers directly, just #include the main public headers: Rts.h, HsFFI.h, RtsAPI.h. - All the headers needed for via-C compilation have moved into the stg subdirectory, which is self-contained. Most of the headers for the rest of the RTS APIs have moved into the rts subdirectory. - I left MachDeps.h where it is, because it is so widely used in Haskell code. - I left a deprecated stub for RtsFlags.h in place. The flag structures are now exposed by Rts.h. - Various internal APIs are no longer exposed by public header files. - Various bits of dead code and declarations have been removed - More gcc warnings are turned on, and the RTS code is more warning-clean. - More source files #include "PosixSource.h", and hence only use standard POSIX (1003.1c-1995) interfaces. There is a lot more tidying up still to do, this is just the first pass. I also intend to standardise the names for external RTS APIs (e.g use the rts_ prefix consistently), and declare the internal APIs as hidden for shared libraries.
* Windows build fixSimon Marlow2009-08-031-1/+1
|
* Allow more than 64k instructions in a BCO; fixes #789Ian Lynagh2009-08-011-26/+37
|
* If ghci runs out of labels, panicIan Lynagh2009-08-011-1/+4
|
* Fix the 64k insns overflow check in ghci, and add more checksIan Lynagh2009-08-012-15/+22
|
* Remove some redundant fromIntegral'sIan Lynagh2009-07-302-3/+3
|
* Fix space problems in ghciIan Lynagh2009-07-301-2/+5
| | | | | We were making arrays with range (0, n-1) which is bad if n == 0 now that we are using Word types.
* Make the types we use when creating GHCi bytecode better match realityIan Lynagh2009-07-294-151/+162
| | | | | We were keeping things as Int, and then converting them to Word16 at the last minute, when really they ought to have been Word16 all along.
* Fix whitespace in ByteCodeAsm.lhsIan Lynagh2009-07-281-107/+107
|
* Make the Integer library used directly configurable in GHC and baseIan Lynagh2009-07-221-4/+7
| | | | Rather than indirecting through an integer package
* Remove unused importsIan Lynagh2009-07-072-12/+0
|
* Trim unused imports detected by new unused-import codesimonpj@microsoft.com2009-07-065-12/+11
|
* Support for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263Max Bolingbroke2009-07-013-4/+4
|
* Fix the GHCi debugger so that it can recognise Integers againIan Lynagh2009-06-231-8/+5
|
* Changes for the new IO library, mainly base-package modules moving aroundSimon Marlow2009-05-292-2/+12
|
* Remove type-ambiguous (fromIntegral 0)::Int, replacing it with just 0simonpj@microsoft.com2009-05-281-1/+1
| | | | | | This unnecessary ambiguity has been there for ages, and is now rejected by -Werror, after fixing #3261
* Use haskeline, rather than editline, for line editing in ghciIan Lynagh2009-04-293-2886/+0
|
* Require a bang pattern when unlifted types are where/let bound; #3182Ian Lynagh2009-04-242-5/+5
| | | | | For now we only get a warning, rather than an error, because the alex and happy templates don't follow the new rules yet.
* FIX #2682: banish silly cases of the "module Foo is not loaded" errorSimon Marlow2009-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | In GHCi if you say 'import Foo' meaning to load a package module Foo, and Foo.hs is found on the search path, then GHCi replies "module Foo is not loaded", because it knows Foo refers to the source file rather than the package module, and you haven't loaded that module with :load. This is consistent with the usual module-finding semantics. However, it isn't particularly useful. And it leads to silly problems like not being able to start GHCi when you happen to be sitting in libraries/base, because GHCi thinks the Prelude hasn't been loaded. So now I've made a slight change to the way that 'import M' works: if M is loaded, then it refers to the loaded module, otherwise it looks for a package module M. This does what the reporter of #2682 wanted, and since it turns an error condition into meaningful behaviour it can't break anything. The only undesirable consequence is that 'import M' might refer to a different M than ':load M'. Hopefully that won't lead to confusion.
* FIX #2845: Allow breakpoints on expressions with unlifted typeSimon Marlow2009-04-201-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | It turns out we can easily support breakpoints on expressions with unlifted types, by translating case tick# of _ -> e into let f = \s . case tick# of _ -> e in f realWorld# instead of just a plain let-binding. This is the same trick that GHC uses for abstracting join points of unlifted type. In #2845, GHC has eta-expanded the tick expression, changing the result type from IO a to (# State#, a #), which was the reason the tick was suddenly being ignored. By supporting ticks on unlifted expressions we can make it work again, although some confusion might arise because _result will no longer be available (it now has unboxed-tuple type, so we can't bind it in the environment). The underlying problem here is that GHC does transformations like eta-expanding the tick expressions, and there's nothing we can do to prevent that.
* Really fix Trac #2611 this timepepe iborra2009-04-191-10/+22
| | | | | My previous patch didn't completely solve the problem. I believe I got it right this time.
* Fix Trac #2611pepe iborra2009-04-181-15/+26
| | | | | Fix a bug in :print affecting data types with unboxed components
* tidy up "missing symbol" error messageSimon Marlow2009-03-131-1/+1
|
* FIX #2816 (correct unicode output for :type/:kind)Simon Marlow2009-03-111-2/+8
| | | | | | This is just a hack, since we don't have correct unicode output for Handles in general, I just fixed a couple of places where we were not converting to UTF-8 for output.
* add final newlinesSimon Marlow2009-03-051-1/+1
| | | | | My Windows build has started complaining about lacking final newlines, I'm not entirely sure why.
* Fix #3067: GHCi panics with 'initTc:LIE' while :stepping on code with funny ↵pepe iborra2009-03-031-2/+2
| | | | | | | | | | | types The problem is that calls to boxyUnify would panic if the types involved contained type functions. It looks like one should wrap these calls with getLIE, although I don't really know what I am doing here
* :steplocal and :stepmodule should not polute trace historyPeter Hercek2009-02-222-4/+4
|
* Do not print anything to stdout when stopping at a breakpoint with custom ↵Peter Hercek2009-02-221-19/+24
| | | | code attached
* When generating C, don't pretend functions are dataIan Lynagh2009-02-062-3/+3
| | | | | | | | | | | | | | | We used to generated things like: extern StgWordArray (newCAF) __attribute__((aligned (8))); ((void (*)(void *))(W_)&newCAF)((void *)R1.w); (which is to say, pretend that newCAF is some data, then cast it to a function and call it). This goes wrong on at least IA64, where: A function pointer on the ia64 does not point to the first byte of code. Intsead, it points to a structure that describes the function. The first quadword in the structure is the address of the first byte of code so we end up dereferencing function pointers one time too many, and segfaulting.
* Force the result of user-defined commandsSimon Marlow2009-01-301-0/+3
| | | | so that exceptions are reported with "*** Exception" instead of as a panic.
* #2973: we should virtualise the CWD inside the GHC API, not in the clientSimon Marlow2009-01-272-20/+2
| | | | | | | The problem is that we install the client's CWD before calling runStmt, but runStmt has to load modules before running the code. We need to install the CWD just before running the code instead, which means it has to be done inside runStmt (and resume).
* Fix buildIan Lynagh2009-01-041-5/+5
|
* Add GHCi completions to :set and :showOri Avtalion2008-12-091-8/+15
|
* Make record selectors into ordinary functionssimonpj@microsoft.com2009-01-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This biggish patch addresses Trac #2670. The main effect is to make record selectors into ordinary functions, whose unfoldings appear in interface files, in contrast to their previous existence as magic "implicit Ids". This means that the usual machinery of optimisation, analysis, and inlining applies to them, which was failing before when the selector was somewhat complicated. (Which it can be when strictness annotations, unboxing annotations, and GADTs are involved.) The change involves the following points * Changes in Var.lhs to the representation of Var. Now a LocalId can have an IdDetails as well as a GlobalId. In particular, the information that an Id is a record selector is kept in the IdDetails. While compiling the current module, the record selector *must* be a LocalId, so that it participates properly in compilation (free variables etc). This led me to change the (hidden) representation of Var, so that there is now only one constructor for Id, not two. * The IdDetails is persisted into interface files, so that an importing module can see which Ids are records selectors. * In TcTyClDecls, we generate the record-selector bindings in renamed, but not typechecked form. In this way, we can get the typechecker to add all the types and so on, which is jolly helpful especially when GADTs or type families are involved. Just like derived instance declarations. This is the big new chunk of 180 lines of code (much of which is commentary). A call to the same function, mkAuxBinds, is needed in TcInstDcls for associated types. * The typechecker therefore has to pin the correct IdDetails on to the record selector, when it typechecks it. There was a neat way to do this, by adding a new sort of signature to HsBinds.Sig, namely IdSig. This contains an Id (with the correct Name, Type, and IdDetails); the type checker uses it as the binder for the final binding. This worked out rather easily. * Record selectors are no longer "implicit ids", which entails changes to IfaceSyn.ifaceDeclSubBndrs HscTypes.implicitTyThings TidyPgm.getImplicitBinds (These three functions must agree.) * MkId.mkRecordSelectorId is deleted entirely, some 300+ lines (incl comments) of very error prone code. Happy days. * A TyCon no longer contains the list of record selectors: algTcSelIds is gone The renamer is unaffected, including the way that import and export of record selectors is handled. Other small things * IfaceSyn.ifaceDeclSubBndrs had a fragile test for whether a data constructor had a wrapper. I've replaced that with an explicit flag in the interface file. More robust I hope. * I renamed isIdVar to isId, which touched a few otherwise-unrelated files.