| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
This major patch implements the new OutsideIn constraint solving
algorithm in the typecheker, following our JFP paper "Modular type
inference with local assumptions".
Done with major help from Dimitrios Vytiniotis and Brent Yorgey.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Warning about useless UNPACK pragmas wasn't as easy as I thought.
I did quite a bit of refactoring, which improved the code by refining
the types somewhat. In particular notice that in DataCon, we have
dcStrictMarks :: [HsBang]
dcRepStrictness :: [StrictnessMarks]
The former relates to the *source-code* annotation, the latter to
GHC's representation choice.
|
| |
|
| |
|
| |
|
|
|
|
| |
Modules that need it import it themselves instead.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes building with -Werror (i.e. validate) and GHC < 6.6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When printing types for the user, the interactive UI often wants to
leave foralls implicit. But then (as Claus points out) we need to be
careful about name capture. For example with this source program
class C a b where
op :: forall a. a -> b
we were erroneously displaying the class in GHCi (with suppressed
foralls) thus:
class C a b where
op :: a -> b
which is utterly wrong.
This patch fixes the problem, removes GHC.dropForAlls (which is dangerous),
and instead supplies PprTyThing.pprTypeForUser, which does the right thing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the long-standing bug that prevents some code with
mutally-recursive modules from being compiled with --make and -O,
including GHC itself. See the comments for details.
There are some additional cleanups that were forced/enabled by this
patch: I removed importedSrcLoc/importedSrcSpan: it wasn't adding any
useful information, since a Name already contains its defining Module.
In fact when re-typechecking an interface file we were wrongly
replacing the interesting SrcSpans in the Names with boring
importedSrcSpans, which meant that location information could degrade
after reloading modules. Also, recreating all these Names was a waste
of space/time.
|
| |
|
|
|
|
|
|
|
| |
Older GHCs can't parse OPTIONS_GHC.
This also changes the URL referenced for the -w options from
WorkingConventions#Warnings to CodingStyle#Warnings for the compiler
modules.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes Trac #1425. The printer for types doesn't know about fixities.
(It could be educated to know, but it doesn't at the moment.) So it
treats all infix tycons as of precedence less than application and function
arrrow.
I took a slight shortcut and reused function-arrow prededence, so I think
you may get
T -> T :% T
meaning
T -> (T :% T)
If that becomes a problem we can fix it.
|
|
|
|
| |
This has been a long-standing ToDo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nominolo@gmail.com pointed out (Trac #1204) that indexed data types
aren't quite right. I investigated and found that the wrapper
functions for indexed data types, generated in MkId, are really very
confusing. In particular, we'd like these combinations to work
newtype + indexed data type
GADT + indexted data type
The wrapper situation gets a bit complicated!
I did a bit of refactoring, and improved matters, I think. I am not
certain that I have gotten it right yet, but I think it's better.
I'm committing it now becuase it's been on my non-backed-up laptop for
a month and I want to get it into the repo. I don't think I've broken
anything, but I don't regard it as 'done'.
|
|
|
|
|
| |
pprTypeApp :: SDoc -> [Type] -> SDoc
pprTypeApp pp tys = hang pp 2 (sep (map pprParendType tys))
|
|
|
|
| |
It looks like this was just commented out while FC was being developed.
|
|
|
|
|
|
|
| |
Mon Sep 18 18:50:35 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au>
* Extended TyCon and friends to represent family declarations
Tue Aug 15 16:52:31 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au>
* Extended TyCon and friends to represent family declarations
|
|
|
|
|
|
|
|
| |
Broken up massive patch -=chak
Original log message:
This is (sadly) all done in one patch to avoid Darcs bugs.
It's not complete work... more FC stuff to come. A compiler
using just this patch will fail dismally.
|
|
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.
|