| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
It is now a separately maintained package, available from hackage:
http://hackage.haskell.org/package/extcore
|
| |
|
|
|
|
|
| |
With the exception of GHC's main Parser.y(.pp), which has 2
reduce/reduce conflicts
|
| |
|
|
|
|
|
|
|
|
|
| |
- Factor out code for applying newtypes from Check into CoreUtils
- Use this code in Prep, which allowed for some simplification
- Change Merge and ElimDeadCode to not flatten top-level binds
- Add a flag for elimDeadCode to tell it whether to keep
exported bindings or not.
- Other things.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
In the ext-core parser I guess I never tested:
* existential type variable bindings in case alts
* empty data declarations
That'll learn me!
|
|
|
|
| |
Added code for dead code elimination to the ext-core library. This can be used in concert with Language.Core.Merge to produce a single self-contained module without unnecessary cruft.
|
| |
|
|
|
|
| |
Changed the ext-core syntax to include primitive coercions (left, right, sym, trans, etc.) as syntax rather than referring them to their names as in GHC. (I hope I updated the docs to reflect this...)
|
|
|
|
| |
See comments for details.
|
|
|
|
| |
See comments for details.
|
| |
|
|
|
|
| |
isUtupleTy was implemented inefficiently (and is called a lot by the typechecker). Replaced with uglier but faster code.
|
| |
|
|
|
|
|
|
|
|
| |
module
I added a new module, Merge, to the ext-core library that combines a list of ext-core modules into a new, uniquely renamed module.
See comments in Merge.hs for more details.
|
|
|
|
| |
The Core preprocessor was rebuilding the type and data constructor environments every time it called the typechecker, which was horribly inefficient. Fixed.
|
|
|
|
|
|
| |
We were inconsistent about whether to use the name "MutArr#" or
"MutableArray#". Likewise ByteArr#/ByteArray# and
MutByteArr#/MutableByteArray#.
|
|
|
|
|
|
|
| |
* Allow -ffoo flags to be deprecated
* Mark some -ffoo flags as deprecated
* Avoid using deprecated flags in error messages, in the build system, etc
* Add a flag to en/disable the deprecated flag warning
|
|
|
|
| |
Add a LICENSE file that just points to the GHC license.
|
|
|
|
| |
This helps if, for example, you want to build the Core tools on a machine that doesn't have a GHC build tree, and have a pre-existing copy of PrimEnv.hs.
|
|
|
|
|
|
|
|
| |
I cabalized the ext-core tools, so now they can be built as
a library. The driver program has to be built separately.
Also updated genprimopcode to reflect the new module hierarchy
for the Core tools.
|
| |
|
|
|
|
|
|
|
| |
Update External Core tools to reflect new syntax for
newtypes. (Notice that the typechecker is 90 lines shorter!)
Also: improve dependency-finding, miscellaneous refactoring.
|
|
|
|
|
|
| |
Add new syntax in External Core for primitive coercions (trans,
sym, etc.) rather than wiring their names into the ext-core
parser.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The External Core interpreter works (in a limited sense).
For details, see the README.
This means we now have a marginally functioning set of
External Core tools.
The other exciting change is that the test driver (Driver.hs)
now computes module dependencies automatically instead of
having a wired-in list of library modules.
|
|
|
|
|
| |
I was confused by the newtype eta-contraction trick before.
Newtype declarations are much less redundant now.
|
|
|
|
|
|
|
|
| |
Reorganized coercion-related code in the typechecker (this was
brought about by typechecking the Core versions of the optimized GHC
libraries.) A few miscellaneous changes (fixed a bug in Prep involving
eta-expanding partial applications that had additional type
arguments.)
|
|
|
|
|
|
|
|
|
|
| |
Got rid of the silly '^' characters before qualified names (plus:
reverts to the original syntax; minus: makes the parser a little
hairier.)
Also, added warning in the typechecker for coercion kind mismatches
rather than considering that a type error. (see the added comment in
Check.hs for details.)
|
|
|
|
|
|
| |
The typechecker works again! Yay!
Details upon request.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Huzzah, the External Core parser will now parse External Core generated by
the HEAD.
Most notably, I rewrote the parser in Parsec, but the old Happy version
remains in the repository.
I checked all the nofib benchmarks and most of the ghc-prim, base and integer
libraries to make sure they parsed; one known bug:
- Strings like "\x0aE", in which a hex escape code is followed by a
letter that could be a hex digit, aren't handled properly. I'm
investigating whether this is a bug in Parsec or expected behavior.
The checker and interpreter still don't work, but should compile.
Please mess around with the parser, report bugs, improve my code, etc.,
if you're so inclined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I updated the parser to handle hierarchical module names (with package names)
the way GHC is currently printing them out in External Core.
Beware kludgy use of z-encoding and gratutious copy-pasta from GHC.
You can now use the stand-alone Core parser to parse a very simple
GHC-generated .hcr file (progress!) but not to typecheck or interpret it
(the typechecker/interpreter don't snarf in the right libraries yet, among
other things.) And, the parser is still incomplete in that it doesn't handle
programs with newtypes/GADTs/etc. whose syntax has changed since 2003. In
other words: probably don't try to use this yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I updated the External Core AST to be somewhat closer to reality (where reality is defined by the HEAD), and got all the code to compile under GHC 6.8.1. (That means it works, right?)
Major changes:
- Added a Makefile.
- Core AST:
- Represented package names and qualified module names.
- Added type annotation on Case exps.
- Changed Coerce to Cast.
- Cleaned up representation of qualified/unqualified names.
- Fixed up wired-in module names (no more "PrelGHC", etc.)
- Updated parser/interpreter/typechecker/prep for the new AST.
- Typechecker:
- Used a Reader monad to pass around the global environment and top module name.
- Added an entry point to check a single expression.
- Prep:
- Got rid of typeofExp; it's now defined in terms of the typechecker.
|
|
Most of the other users of the fptools build system have migrated to
Cabal, and with the move to darcs we can now flatten the source tree
without losing history, so here goes.
The main change is that the ghc/ subdir is gone, and most of what it
contained is now at the top level. The build system now makes no
pretense at being multi-project, it is just the GHC build system.
No doubt this will break many things, and there will be a period of
instability while we fix the dependencies. A straightforward build
should work, but I haven't yet fixed binary/source distributions.
Changes to the Building Guide will follow, too.
|