summaryrefslogtreecommitdiff
path: root/ghc
Commit message (Collapse)AuthorAgeFilesLines
...
* Formatting wibbles.David Terei2011-10-171-16/+16
|
* Remove cruft code from old Safe Haskell implementation methodDavid Terei2011-10-172-26/+26
|
* Allow foreign import declarations to the entered interactively in GHCi.Simon Marlow2011-10-061-1/+2
|
* Follow changes to HValue/Any handlingIan Lynagh2011-10-031-1/+1
| | | | | Also removed the type argument to Any in primops.txt.pp. I don't see why we need it, and it now breaks haddocking GHC.Prim.
* Implement GHCi command :kind! which normalises its typeSimon Peyton Jones2011-09-231-6/+9
| | | | | | | | | | | | | | | | type family F a type instance F Int = Bool type instance F Bool = Char In GHCi *TF> :kind (F Int, F Bool) (F Int, F Bool) :: * *TF> :kind! F Int (F Int, F Bool) :: * = (Bool, Char) We could call it ":normalise" but it seemed quite nice to have an eager version of :kind
* show bindings in the order they were definedSimon Marlow2011-09-211-3/+2
|
* Add support for all top-level declarations to GHCiSimon Marlow2011-09-212-30/+67
| | | | | | | | | | | | | | | | This is work mostly done by Daniel Winograd-Cort during his internship at MSR Cambridge, with some further refactoring by me. This commit adds support to GHCi for most top-level declarations that can be used in Haskell source files. Class, data, newtype, type, instance are all supported, as are Type Family-related declarations. The current set of declarations are shown by :show bindings. As with variable bindings, entities bound by newer declarations shadow earlier ones. Tests are in testsuite/tests/ghci/scripts/ghci039--ghci054. Documentation to follow.
* In :load, call GHC.guessTarget on the new targets before unloadingSimon Marlow2011-09-211-6/+6
| | | | | | | | Fixes this problem: Prelude> :l foo target `foo' is not a module name or a source file >
* Fix etags output; trac #4256Ian Lynagh2011-09-171-1/+1
| | | | | We had an off-by-one bug in column numbers, causing first characters of identifiers to be duplicated.
* Remove an old "ToDo" commentIan Lynagh2011-09-131-1/+0
|
* Implement -XConstraintKindMax Bolingbroke2011-09-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically as documented in http://hackage.haskell.org/trac/ghc/wiki/KindFact, this patch adds a new kind Constraint such that: Show :: * -> Constraint (?x::Int) :: Constraint (Int ~ a) :: Constraint And you can write *any* type with kind Constraint to the left of (=>): even if that type is a type synonym, type variable, indexed type or so on. The following (somewhat related) changes are also made: 1. We now box equality evidence. This is required because we want to give (Int ~ a) the *lifted* kind Constraint 2. For similar reasons, implicit parameters can now only be of a lifted kind. (?x::Int#) => ty is now ruled out 3. Implicit parameter constraints are now allowed in superclasses and instance contexts (this just falls out as OK with the new constraint solver) Internally the following major changes were made: 1. There is now no PredTy in the Type data type. Instead GHC checks the kind of a type to figure out if it is a predicate 2. There is now no AClass TyThing: we represent classes as TyThings just as a ATyCon (classes had TyCons anyway) 3. What used to be (~) is now pretty-printed as (~#). The box constructor EqBox :: (a ~# b) -> (a ~ b) 4. The type LCoercion is used internally in the constraint solver and type checker to represent coercions with free variables of type (a ~ b) rather than (a ~# b)
* Add a flag -fno-ghci-historyIan Lynagh2011-09-011-2/+5
| | | | | Allows you to turn off loading/storing the GHCi command history from/to the ~/.ghc/ghci_history file.
* fix warningSimon Marlow2011-08-261-1/+1
|
* Clean up the handling of the import and :module commands in GHCiSimon Marlow2011-08-262-329/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we remembered the whole history of commands and replayed them on every :load/:reload, which lead to some non-linear performance characteristics (#5317). The handling of the implicit Prelude import and the implicit imports of recently loaded modules was also complicated and wrong in various obscure ways. The Prelude import works just like the implicit Prelude import in a Haskell module: it can be overriden with an explicit Prelude import. I have added a new ":show imports" command to show which imports are currently in force. Prelude> :show imports import Prelude -- implicit Prelude> import Prelude () Prelude> :show imports import Prelude () Prelude> map <interactive>:0:1: Not in scope: `map' Prelude> Full documentation in the User's Guide. There are various other little tweaks and improvements, such as when a module is imported with 'as', we now show the 'as' name in the prompt rather than the original name.
* In :browse, always print output in the *current* contextSimon Peyton Jones2011-08-221-19/+11
| | | | | | | | | | | | Previously :browse M (without !) printed output relative to a context that was neither the current one, nor the top-level context of M, but rather that established by import Prelude import M This was pretty confusing, so Simon and I agreed to use a simple, uniform rule: output in GHC is always relative to the current context.
* Formatting fixesDavid Terei2011-08-191-152/+138
|
* Change use of if to whenDavid Terei2011-08-191-5/+4
|
* More info from :issafe ghci commandDavid Terei2011-08-191-24/+41
|
* Teach GHC to compile objective-c++ files as well (trac #5150)Peter Wortmann2011-08-061-1/+1
|
* sanitise naming of package listsSimon Marlow2011-08-051-1/+1
| | | | | | | | | | | | | | | The *predicates* all start with "PKGS_THAT_...", e.g.: PKGS_THAT_BUILD_WITH_STAGE0 (previously "PACKAGES_STAGE0") PKGS_THAT_BUILD_WITH_STAGE2 (previously "STAGE2_PACKAGES") PKGS_THAT_USE_TH (previously "TH_PACKAGES) etc. (there are a few more) the lists of packages to build are now consistently named: PACKAGES_STAGE0 PACKAGES_STAGE1 (previously just "PACKAGES") PACKAGES_STAGE2
* Wibble to main "Refactor the imports of InteractiveContext" patchSimon Peyton Jones2011-08-021-9/+17
|
* Refactor the imports of InteractiveContextSimon Peyton Jones2011-08-021-94/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of two fields ic_toplev_scope :: [Module] ic_imports :: [ImportDecl RdrName] we now just have one ic_imports :: [InteractiveImport] with the auxiliary data type data InteractiveImport = IIDecl (ImportDecl RdrName) -- Bring the exports of a particular module -- (filtered by an import decl) into scope | IIModule Module -- Bring into scope the entire top-level envt of -- of this module, including the things imported -- into it. This makes lots of code less confusing. No change in behaviour. It's preparatory to fixing Trac #5147. While I was at I also * Cleaned up the handling of the "implicit" Prelude import by adding a ideclImplicit field to ImportDecl. This significantly reduces plumbing in the handling of the implicit Prelude import * Used record notation consistently for ImportDecl
* show warning flags in :set (lost in the recent dopt->wopt change,Simon Marlow2011-07-211-6/+18
| | | | noticed by test ghci024)
* Factor the GHC version into the hash generated by --abi-hash (#5328)Simon Marlow2011-07-201-0/+3
|
* Debugger commands do not work with -fno-ghci-sandbox, so emit usefulSimon Marlow2011-07-121-31/+46
| | | | error messages.
* Relax some dependenciesIan Lynagh2011-07-081-1/+1
|
* defaultErrorHandler now only takes LogActionIan Lynagh2011-07-031-2/+1
| | | | | | | | | It used to take a whole DynFlags, but that meant we had to create a DynFlags with (panic "No settings") for settings, as we didn't have any real settings. Now we just pass the LogAction, which is all that it actually needed. The default is exported from DynFlags as defaultLogAction.
* SafeHaskell: Try to be consistent in naming.David Terei2011-06-291-1/+1
|
* trac #5265 (support for additional .ghci files)Sam Anklesaria2011-06-261-1/+2
|
* Follow Cabal reorganisation, and improve build system a littleIan Lynagh2011-06-231-0/+1
|
* SafeHaskell: Change SafeHaskellMode to use Outputable vs ShowDavid Terei2011-06-171-1/+1
|
* SafeHaskell: Fix validation errors when unsafe base usedDavid Terei2011-06-171-2/+5
|
* SafeHaskell: Even more fixing to work with safe baseDavid Terei2011-06-171-0/+1
|
* SafeHaskell: Add ':issafe' cmd to GHCi that displays module safety infoDavid Terei2011-06-171-1/+48
|
* SafeHaskell: Fix a warning stopping validationDavid Terei2011-06-171-3/+5
|
* SafeHaskell: Disable certain ghc extensions in Safe.David Terei2011-06-172-25/+26
| | | | | | | | | | This patch disables the use of some GHC extensions in Safe mode and also the use of certain flags. Some are disabled completely while others are only allowed on the command line and not in source PRAGMAS. We also check that Safe imports are indeed importing a Safe or Trustworthy module.
* Follow Src{Loc,Span} changes in other parts of the treeIan Lynagh2011-06-091-1/+0
|
* Refactor SrcLoc and SrcSpanIan Lynagh2011-06-092-34/+51
| | | | | | | | | | | | | | | The "Unhelpful" cases are now in a separate type. This allows us to improve various things, e.g.: * Most of the panic's in SrcLoc are now gone * The Lexer now works with RealSrcSpans rather than SrcSpans, i.e. it knows that it has real locations and thus can assume that the line number etc really exists * Some of the more suspicious cases are no longer necessary, e.g. we no longer need this case in advanceSrcLoc: advanceSrcLoc loc _ = loc -- Better than nothing More improvements can probably be made, e.g. tick locations can probably use RealSrcSpans too.
* Tidy up the ic_exports field of the InteractiveContext. PreviouslySimon Marlow2011-06-042-52/+83
| | | | | | was [(Module, Maybe ImportDecl)], now it is just [ImportDecl]. So now ":m +A" and "import A" do exactly the same thing in GHCi, and use the same code paths.
* Merge ghc-new-co into master branchSimon Peyton Jones2011-05-091-3/+4
|\
| * Merge remote branch 'origin/master' into ghc-new-coSimon Peyton Jones2011-04-304-29/+45
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/typecheck/TcErrors.lhs compiler/typecheck/TcSMonad.lhs compiler/typecheck/TcType.lhs compiler/types/TypeRep.lhs
| * | This BIG PATCH contains most of the work for the New Coercion RepresentationSimon Peyton Jones2011-04-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the paper "Practical aspects of evidence based compilation in System FC" * Coercion becomes a data type, distinct from Type * Coercions become value-level things, rather than type-level things, (although the value is zero bits wide, like the State token) A consequence is that a coerion abstraction increases the arity by 1 (just like a dictionary abstraction) * There is a new constructor in CoreExpr, namely Coercion, to inject coercions into terms
* | | Merge branch 'coloured-core' of https://github.com/nominolo/ghc into ↵coloured-coreIan Lynagh2011-05-081-1/+1
|\ \ \ | |_|/ |/| | | | | coloured-core
| * | Start support for coloured SDoc output.Thomas Schilling2011-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | The SDoc type now passes around an abstract SDocContext rather than just a PprStyle which required touching a few more files. This should also make it easier to integrate DynFlags passing, so that we can get rid of global variables.
* | | We no longer need to pass pgmc etc in the ghc.wrapper scriptIan Lynagh2011-04-291-1/+1
| | | | | | | | | | | | They can now be set in the settings file instead
* | | Initialise Settings before DynFlagsIan Lynagh2011-04-221-1/+2
| | | | | | | | | | | | | | | | | | Stops us having to temporarily have a panic in the DynFlags. We still need a panic in the DynFlags used for the top-level error handler, though.
* | | Rename "extra-gcc-opts" to "settings", and start generalising itIan Lynagh2011-04-213-19/+32
| | |
* | | Make the compiler depend on unlit existingIan Lynagh2011-04-201-11/+13
| |/ |/| | | | | | | Fixes an unreg build failure. I've also now made these sorts of dependencies order-only.
* | Cleanup sweep and fix a bug in RTS flag processing.Simon Marlow2011-04-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This code has accumulated a great deal of cruft over the years, this pass cleans up a lot of the surrounding cruft but leaves the actual argument processing alone - so there's still more that could be done. Bug fixed: - ghc_rts_opts should not be subject to the --rtsopts setting. If the programmer explicitly declares options with ghc_rts_opts, they shouldn't also have to accept command-line RTS options to make them work.
* | Merge branch 'trac_5025' of https://github.com/thoughtpolice/ghcSimon Marlow2011-04-061-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | * 'trac_5025' of https://github.com/thoughtpolice/ghc: Teach GHC to compile objective-c files; trac #5025 Conflicts: compiler/main/DriverPipeline.hs