| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Annotating a type with NoSpecConstr will prevent SpecConstr from specialising
on arguments of that type. The syntax is
import SpecConstr
{-# ANN type T NoSpecConstr #-}
|
| |
|
|
|
|
|
| |
With -fstrictness-before=n, GHC runs an additional strictness analysis pass
before simplifier phase n.
|
| |
|
| |
|
| |
|
|
|
|
| |
While I was dealing with 'rec' statements I did this tidy-up
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change is this (see Trac #2798). Instead of writing
mdo { a <- getChar
; b <- f c
; c <- g b
; putChar c
; return b }
you would write
do { a <- getChar
; rec { b <- f c
; c <- g b }
; putChar c
; return b }
That is,
* 'mdo' is eliminated
* 'rec' is added, which groups a bunch of statements
into a single recursive statement
This 'rec' thing is already present for the arrow notation, so it
makes the two more uniform. Moreover, 'rec' lets you say more
precisely where the recursion is (if you want to), whereas 'mdo' just
says "there's recursion here somewhere". Lastly, all this works with
rebindable syntax (which mdo does not).
Currently 'mdo' is enabled by -XRecursiveDo. So we now deprecate this
flag, with another flag -XDoRec to enable the 'rec' keyword.
Implementation notes:
* Some changes in Lexer.x
* All uses of RecStmt now use record syntax
I'm still not really happy with the "rec_ids" and "later_ids" in the
RecStmt constructor, but I don't dare change it without consulting Ross
about the consequences for arrow syntax.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coercion terms can get big (see Trac #2859 for example), so this
patch puts the infrastructure in place to optimise them:
* Adds Coercion.optCoercion :: Coercion -> Coercion
* Calls optCoercion in Simplify.lhs
The optimiser doesn't work right at the moment, so it is
commented out, but Tom is going to work on it.
|
| |
|
|
|
|
|
| |
I needed it, and then didn't need it, so it's not currently
called, but its generally useful kind of thing.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There was a subtle bug in the interation of specialisation and floating,
described in Note [Specialisation of dictionary functions].
The net effect was to create a loop where none existed before; plain wrong.
In fixing it, I did quite a bit of house-cleaning in the specialiser, and
added a lot more comments. It's tricky, alas.
|
|
|
|
|
|
|
|
|
|
| |
The bug related to the fact that boxyUnify (now) returns a coercion,
which was simply being ignored. (TcExpr is clearly not warning-free
wrt the unused-monadic-bind thing!)
Anyway, it's fine now. I added a test case to the test suite.
MERGE to 6.12 please.
|
|
|
|
|
|
|
|
|
|
| |
The two used to be incompatible, but they aren't any longer.
In fact, -ticky should not be a 'way' any more, and doing that
is on Simon M's todo list, but this patch takes us a little
step closer.
I'm not sure this is worth merging to the 6.12 branch.
|
| |
|
|
|
|
|
|
|
| |
I wanted to see the TH syntax produced by a splice, before its conversion
back into HsSyn. Doing so involved some refactoring. This only affects
deubbging code (-ddump-tc-trace).
|
|
|
|
|
|
| |
It turned out that we lacked flags to switch off these two passes,
so I added them.
|
|
|
|
|
|
|
|
|
| |
This bug was introduced when I added an optimisation, described in
Note [Converting strings] in Convert.lhs. It was treating *all*
empty lists as strings, not just string-typed ones!
The fix is easy. Pls MERGE to stable branch.
|
|
|
|
|
|
| |
GHC's recompilation checker doesn't take into account #included files,
which is really a bug. We work around it here by adding dependencies
and using -fforce-recomp in a couple of places.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variables
DO NOT MERGE TO GHC 6.12 branch
(Reason: interface file format change.)
The typechecker needs to instantiate otherwise-unconstraint type variables to
an appropriately-kinded constant type, but we didn't have a supply of
arbitrarily-kinded tycons for this purpose. Now we do.
The details are described in Note [Any types] in TysPrim. The
fundamental change is that there is a new sort of TyCon, namely
AnyTyCon, defined in TyCon.
Ter's a small change to interface-file binary format, because the new
AnyTyCons have to be serialised.
I tided up the handling of uniques a bit too, so that mkUnique is not
exported, so that we can see all the different name spaces in one module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These missing dependencies led to:
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 6.13 for x86_64-unknown-linux):
urk! lookup local fingerprint ghc-6.13:CgBindery.CgBindings{tc r4Z}
Simon and I don't quite understand why I've encountered these while
no one else has, but they are certainly bugs, and this patch certainly
fixes them.
Merge to 6.12 branch
|
| |
|
|
|
|
|
|
|
|
| |
In general, when pretty-printing HsSyn, we omit the extra info added by GHC
(type appplications and abstractions, etc) when printing stuff for the user.
But we weren't applying that guideline to the HsTick stuff for Hpc. This
patch adds the necessary tests.
|
| |
|
|
|
|
|
| |
Instead, we simply find all available PA and PR instances and get our dfuns
from those.
|
|
|
|
|
| |
This is a fairly big change to the vectoriser in preparation to Simon's inline
patch.
|
|
|
|
|
| |
For GHCi, foreign labels should be allowed, but foreign export should
be disallowed; both were previously wrong.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch eliminates a couple of places where we were assuming that
the host word size is the same as the target word size.
Also a little refactoring: Constants now exports the types TargetInt
and TargetWord corresponding to the Int/Word type on the target
platform, and I moved the definitions of tARGET_INT_MAX and friends
from Literal to Constants.
Thanks to Barney Stratford <barney_stratford@fastmail.fm> for helping
track down the problem and fix it. We now know that GHC can
successfully cross-compile from 32-bit to 64-bit.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This function was barfing on a type family tycon; which in turn
crashed the compiler (when -ticky is in use) because of the use in
CmmTicky.hs. There's no need for it to reject such tycons, so I just
made it return Nothing rather than falling over.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the Haskell Prime proposal
http://hackage.haskell.org/trac/haskell-prime/wiki/ExplicitForall
Flag is -XExplicitForAll
Implied by Opt_RankNTypes, Opt_Rank2Types, Opt_ScopedTypeVariables,
Opt_LiberalTypeSynonyms, Opt_ExistentialQuantification,
Opt_PolymorphicComponents
|
|
|
|
|
| |
If the two InstalledPackageIds are the same, then the packages are
interchangeable and we don't need to explicitly remove one of them.
|
|
|
|
| |
rather than our own copies
|
| |
|
|
|
|
| |
There are now 104 calls to mkdirhier, down from 1201, when validating.
|
|
|
|
| |
This one complains sometimes, but there's no good way to improve it.
|
| |
|
| |
|