| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Also renumbered the IDs and alined some things properly
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
In particular, use mkConApp when building the (S# i)
constructors in CorePrep
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
They've been deprecated since GHC 6.12.
|
| |
|
|
|
|
|
| |
to the Typeable library. We now generate an MD5 hash of the
fully-qualified TyCon name at compile time.
|
| |
|
|
|
|
| |
head-normal-form, and similarly for spark#.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\ |
|
| |\ |
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
Fixed conflicts:
compiler/typecheck/TcSMonad.lhs
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Resolved conflicts:
compiler/typecheck/TcTyClsDecls.lhs
|
| | | | |
| | | | |
| | | | |
| | | | | |
Remove a few other `0`s from names.
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixed conflicts:
compiler/prelude/PrelNames.lhs
|
| | | | | | |
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
handled, allow for standalone deriving of Representable0.
|
| | | | | | | |
|
| |\ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
plus a false ASSERT failure
|
| |\ \ \ \ \ \ \ |
|