summaryrefslogtreecommitdiff
path: root/compiler/prelude
Commit message (Collapse)AuthorAgeFilesLines
* Add some more Integer rulesIan Lynagh2011-09-242-71/+100
| | | | Also renumbered the IDs and alined some things properly
* fix warningsSimon Marlow2011-09-211-1/+0
|
* move AvailInfo and related things into its own moduleSimon Marlow2011-09-211-14/+13
|
* Add support for all top-level declarations to GHCiSimon Marlow2011-09-211-8/+4
| | | | | | | | | | | | | | | | 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.
* Improve the handling of Integer literalsIan Lynagh2011-09-173-87/+27
| | | | | | | | | LitInteger now carries around the id of mkInteger, which it uses to construct the core to build Integer literals. This way we don't have to build in info about lots of Ids. We also no longer have any special-casing for integer-simple, so there is less code involved.
* Fix integer stuff (fixes Trac #5485)Simon Peyton Jones2011-09-141-1/+3
| | | | | In particular, use mkConApp when building the (S# i) constructors in CorePrep
* change how Integer's are handled in CoreIan Lynagh2011-09-133-48/+126
| | | | | | We now treat them as literals until CorePrep, when we finally convert them into the real Core representation. This makes it a lot simpler to implement built-in rules on them.
* Comments, and rename FactTuple to ConstraintTupleSimon Peyton Jones2011-09-092-8/+26
|
* Add Constraint as a legitmiate tycon in KindsSimon Peyton Jones2011-09-071-1/+2
|
* Implement -XConstraintKindMax Bolingbroke2011-09-066-83/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Remove bogus isCoercionKind function and its sole useMax Bolingbroke2011-09-061-1/+1
|
* Follow ghc-prim changesIan Lynagh2011-08-261-11/+8
|
* fix 32-bit build breakageSimon Marlow2011-08-191-6/+1
|
* Add popCnt# primopJohan Tibell2011-08-161-3/+16
|
* Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2011-08-021-26/+25
|\
| * Follow things moving in the integer librariesIan Lynagh2011-07-301-26/+25
| |
* | Change the representation of export lists in .hi filesSimon Peyton Jones2011-08-021-12/+11
|/ | | | | | | | | | | | | | | | | | | | | | | Currently export list in .hi files are partitioned by module export M T(C1,C2) N f,g In each list we only have OccNames, all assumed to come from the parent module M or N resp. This patch changes the representatation so that export lists have full Names: export M.T(M.C1,M.C2), N.f, N.g Numerous advatages * AvailInfo no longer needs to be parameterised; it always contains Names * Fixes Trac #5306. This was the main provocation * Less to-and-fro conversion when reading interface files It's all generally simpler. Interface files should not get bigger, becuase they have a nice compact representation for Names.
* Add rules for Integer constant foldingIan Lynagh2011-07-233-120/+352
|
* Fix buildIan Lynagh2011-07-231-2/+6
|
* Whitespace only in prelude/PrelNames.lhsIan Lynagh2011-07-231-525/+525
|
* Remove some more dead codeIan Lynagh2011-07-231-23/+2
|
* Remove some unused IdKeysIan Lynagh2011-07-231-20/+6
|
* Remove dead codeIan Lynagh2011-07-221-7/+0
|
* Follow the move of GHC.Classes from base to ghc-primIan Lynagh2011-07-221-1/+1
|
* Remove 'threadsafe' FFI importsIan Lynagh2011-07-131-12/+5
| | | | They've been deprecated since GHC 6.12.
* Had to move some Typeable things around to avoid orphan instances.Simon Marlow2011-07-121-10/+10
|
* Change the code generated for deriving Typeable, to match the changesSimon Marlow2011-07-121-5/+6
| | | | | to the Typeable library. We now generate an MD5 hash of the fully-qualified TyCon name at compile time.
* New functionality required for the supercompiler pluginMax Bolingbroke2011-06-291-0/+7
|
* Add a builtin rule for seq# when its argument is a manifestSimon Marlow2011-06-281-3/+27
| | | | head-normal-form, and similarly for spark#.
* Add two new primops:Simon Marlow2011-06-281-0/+15
| | | | | | | | | | | | | seq# :: a -> State# s -> (# State# s, a #) spark# :: a -> State# s -> (# State# s, a #) seq# is a version of seq that can be used in a State#-passing context. We will use it to implement Control.Exception.evaluate and thus fix #5129. Also we have plans to use it to fix #5262. spark# is to seq# as par is to pseq. That is, it creates a spark in a State#-passing context. We will use spark# and seq# to implement rpar and rseq respectively in an improved implementation of the Eval monad.
* SafeHaskell: Make base GHC.* modules untrustedDavid Terei2011-06-171-4/+4
|
* SafeHaskell: More fixing to work with safe baseDavid Terei2011-06-171-2/+2
|
* SafeHaskell: Update to work with safe baseDavid Terei2011-06-171-2/+2
|
* Track changes in the DPH package and GHC.PArr.Manuel M T Chakravarty2011-06-171-17/+17
|
* Add byte array copy primopsJohan Tibell2011-06-161-0/+17
| | | | Signed-off-by: David Terei <davidterei@gmail.com>
* Add dynamically-linked plugins (see Trac #3843)Simon Peyton Jones2011-06-161-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch was originally developed by Max Bolingbroke, and worked on further by Austin Seipp. It allows you to write a Core-to-Core pass and have it dynamically linked into an otherwise-unmodified GHC, and run at a place you specify in the Core optimisation pipeline. Main components: - CoreMonad: new types Plugin, PluginPass plus a new constructor CoreDoPluginPass in CoreToDo - SimplCore: stuff to dynamically load any plugins, splice them into the core-to-core pipeline, and invoke them - Move "getCoreToDo :: DynFlags -> [CoreToDo]" which constructs the main core-to-core pipeline from CoreMonad to SimplCore SimplCore is the driver for the optimisation pipeline, and it makes more sense to have the pipeline construction in the driver not in the infrastructure module. - New module DynamicLoading: invoked by SimplCore to load any plugins Some consequential changes in Linker. - New module GhcPlugins: this should be imported by plugin modules; it it not used by GHC itself.
* Remove some old unused prelnamesDavid Terei2011-05-311-4/+2
|
* Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2011-05-262-23/+156
|\
| * Merge remote branch 'origin/master' into ghc-genericsSimon Peyton Jones2011-05-263-58/+94
| |\
| * \ Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-genericsJose Pedro Magalhaes2011-05-201-0/+43
| |\ \ | | | | | | | | | | | | | | | | Fixed conflicts: compiler/typecheck/TcSMonad.lhs
| * \ \ Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-genericsJose Pedro Magalhaes2011-05-124-129/+229
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Resolved conflicts: compiler/typecheck/TcTyClsDecls.lhs
| * | | | Rename `Representable0` to `Generic`.Jose Pedro Magalhaes2011-05-091-33/+17
| | | | | | | | | | | | | | | | | | | | Remove a few other `0`s from names.
| * | | | Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-genericsJose Pedro Magalhaes2011-05-041-4/+32
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fixed conflicts: compiler/prelude/PrelNames.lhs
| * | | | | Update location of the CString stuff (from GHC.Base to GHC.CString).Jose Pedro Magalhaes2011-05-031-5/+6
| | | | | |
| * | | | | Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-genericsJose Pedro Magalhaes2011-05-021-2/+12
| |\ \ \ \ \
| * | | | | | Remove the hasGenerics field of TyCon, improve the way the Generics flags is ↵Jose Pedro Magalhaes2011-05-021-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | handled, allow for standalone deriving of Representable0.
| * | | | | | More code cleanup and removing old generics stuff.Jose Pedro Magalhaes2011-04-281-2/+1
| | | | | | |
| * | | | | | Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-genericsJose Pedro Magalhaes2011-04-271-1/+1
| |\ \ \ \ \ \
| * | | | | | | Small fixes to the generics branch to get rid of warnings,unknown2011-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plus a false ASSERT failure
| * | | | | | | Merge branch 'master' of c:/code/HEAD-git/. into ghc-genericsunknown2011-04-131-0/+6
| |\ \ \ \ \ \ \