| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Improve error msg in tcPolyExpr; Simon pls merge into release
|
|
|
|
| |
Sigh, another go at getting #line directives right.
|
|
|
|
| |
Allow unboxed tuple components to have polymorphic types.
|
|
|
|
| |
Sigh, didn't work in the cpp, !literate case.
|
|
|
|
| |
oops, debugging code committed by mistake.
|
|
|
|
|
| |
Fix filenames in {-# LINE #-} directives when using both unlit and
hscpp (I think).
|
|
|
|
| |
fix typo in hppa1.1 support.
|
|
|
|
| |
remove spurious ^M's
|
|
|
|
|
|
|
|
|
|
| |
add unofficial/undocumented function:
mkWeakIORef :: IORef a -> IO () -> IO (Weak (IORef a))
for weak pointers to IORefs. This avoids some of the problems with
inlining disturbing the semantics of mkWeak by making the weak key
point to the primitive MutVar instead of the box.
|
|
|
|
|
|
|
| |
Allow mkWeak# to take an unlifted type as the key argument. The
intention is that boxed-but-unlifted types can be used as keys, not
unlifted types in general but there's no way to enforce this at the
moment.
|
|
|
|
|
|
|
| |
+RTS -s<blah> ==> +RTS -S<blah>
for -Rghc-timing. The former now gives only summary statistics, as
advertised.
|
|
|
|
|
|
| |
If calling a 'foreign export'ed Haskell function resulted in an error,
localise the error by supplying the module name as well as the name
of the function.
|
|
|
|
|
| |
Improve the UI a little for modules contain 'foreign export' declarations -
no longer demand that module name == (basename filename)
|
|
|
|
|
|
|
| |
Back out yesterday's change to Parser.y, and throw out illegal do
expressions in the renamer instead. It turned out to be hard to get
the optional semicolons right in the grammar at the same time as
checking that the last statement is an expression.
|
|
|
|
| |
Add a bit more info about hi-boot files
|
|
|
|
| |
Do a more correct job of explicit for-alls in types
|
|
|
|
| |
Add rnfail018
|
|
|
|
|
|
|
|
| |
Adopt the following syntax for stmts:
stmts -> stmt1 ; ... stmtn ; exp [;]
That is, a do-notation thing must finish with an expression.
|
|
|
|
| |
Add read009, do-notation
|
|
|
|
|
|
|
|
|
|
|
| |
Make Type.isUnLiftedType return True for forall'd unlifted types:
e.g. x :: forall a. Int#
I found bindings like these were getting floated to the top level.
They are pretty bogus types, mind you. It would be better never to
construct them.
(George Russell tripped over this one.)
|
|
|
|
|
|
|
|
| |
* Fix a bug in the unifier that made the typechecker
loop on a 5-line program from Sigbjorn. The bug is
documented near the fix, in
TcUnify.uUnboundVar
|
|
|
|
| |
Add rnfail017
|
|
|
|
| |
Fix type in tcMatch discovered by Keith
|
|
|
|
| |
Add tc102
|
|
|
|
| |
Remove dead token IThash added yesterday by mistake.
|
|
|
|
| |
Fix use of _unused var for ghc-3.XX.
|
|
|
|
| |
cpp-ify some H98isms with PSEQ and SAPPLY to placate ghc-3.0X
|
|
|
|
|
|
|
|
| |
* Fix a bug in the unifier that made the typechecker
loop on a 5-line program from Sigbjorn. The bug is
documented near the fix, in
TcUnify.uUnboundVar
|
|
|
|
| |
Add tc101
|
|
|
|
| |
Fix trivial parse errors.
|
|
|
|
|
| |
More 64bit fun: Fixed an ill-placed #ifdef and added a cast to a
numeric literal (for explanation see yesterday's fix).
|
|
|
|
|
| |
Layout fix to uses of ASSERT in do expressions; thanks Kevin for
pointing out the problem.
|
|
|
|
|
| |
More 64bit fun: Fixed an ill-placed #ifdef and added a cast to a
numeric literal (for explanation see yesterday's fix).
|
|
|
|
|
|
|
| |
* Fix long-standing bug in TcIfaceSig which meant it occasionally complained
about a lint error in an unfolding, with a locally-defined name not
being in scope. This only happened when hi-boot loops were being
tied, so an unfolding might mention a locally-defined name.
|
|
|
|
|
| |
* Fix trivial bug in WwLib.mkWWfixup,
which showed up when booting the compiler.
|
|
|
|
|
|
| |
More small portability changes:
* For older GHCs use IOBase instead of PrelIOBase
* Never use commas in SLIT. cpp IS a hack for Haskell...
|
|
|
|
|
|
|
|
|
| |
We have to be very careful with numeric literals in the C part, in
this case 0xff (of type int = 4 bytes on Alpha) was shifted left 56
times => always zero :-{ Using an L or UL suffix is not always
practical, because the needed size depends on conditional typedefs
somewhere else. Solution: Cast! :-P ghc/includes contains some more
suspicious literals, but I did not have a look at them yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes a start at implementing polymorphic usage
annotations.
* The module Type has now been split into TypeRep, containing the
representation Type(..) and other information for `friends' only,
and Type, providing the public interface to Type. Due to a bug in
the interface-file slurping prior to ghc-4.04, {-# SOURCE #-}
dependencies must unfortunately still refer to TypeRep even though
they are not friends.
* Unfoldings in interface files now print as __U instead of __u.
UpdateInfo now prints as __UA instead of __U.
* A new sort of variables, UVar, in their own namespace, uvName, has
been introduced for usage variables.
* Usage binders __fuall uv have been introduced. Usage annotations
are now __u - ty (used once), __u ! ty (used possibly many times),
__u uv ty (used uv times), where uv is a UVar. __o and __m have
gone. All this still lives only in a TyNote, *for now* (but not for
much longer).
* Variance calculation for TyCons has moved from
typecheck/TcTyClsDecls to types/Variance.
* Usage annotation and inference are now done together in a single
pass. Provision has been made for inferring polymorphic usage
annotations (with __fuall) but this has not yet been implemented.
Watch this space!
|
|
|
|
|
|
|
| |
A prime example of how an inconsistent .hi-boot file can really ruin
your day: the definition of CoreRules in CoreSyn.hi-boot was out of
sync with the real one, which meant that the compiler generated the
wrong code for a `seq` on something of type CoreRules.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Simon: this should fix that -funfolding-use-threshold0 lint bug]
[Kevin: have a look at WwLib.mkWwBodies. Isn't it a thing of beauty?
Could you think about whether the CPR stuff could be cleaned
up a bit? The strictness stuff is much shorter.]
This commit tidies up WwLib.mkWwBodies, fixing a couple of bugs.
* One bug showed up when CPR made a worker return an unboxed tuple,
but the worker didn't have any other arguments. The "add a void arg"
hack needed to be generalised a bit.
* The other bug showed up when booting the compiler. There's a long
comment near splitProductType in WwLib.lhs that explains the problem.
|
|
|
|
| |
Enlarged heap for 2.10-compiled Happy on Alphas
|
|
|
|
| |
pre-4.03 didn't have __HASKELL98__, use something else.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Main things:
* Add splitProductType_maybe to DataCon.lhs, with type
splitProductType_maybe
:: Type -- A product type, perhaps
-> Maybe (TyCon, -- The type constructor
[Type], -- Type args of the tycon
DataCon, -- The data constructor
[Type]) -- Its *representation* arg types
Then use it in many places (e.g. worker-wrapper places) instead
of a pile of junk
* Clean up various uses of dataConArgTys, which were plain wrong because
they weren't passed the existential type arguments. Most of these calls
are eliminated by using splitProductType_maybe above. I hope I correctly
squashed the others. This fixes a bug that Meurig's programs showed up.
module FailGHC (killSustainer) where
import Weak
import IOExts
data Sustainer = forall a . Sustainer (IORef (Maybe a)) (IO ())
killSustainer :: Sustainer -> IO ()
killSustainer (Sustainer _ act) = act
The above program used to kill the compiler.
* A fairly concerted attack on the Dreaded Space Leak.
- Add Type.seqType, CoreSyn.seqExpr, CoreSyn.seqRules
- Add some seq'ing when building Ids and IdInfos
These reduce the space usage a lot
- Add CoreSyn.coreBindsSize, which is pretty strict in the program,
and call it when we have -dshow-passes.
- Do not put the inlining in an Id that is being plugged into
the result-expression of the simplifier. This cures
a the 'wedge' in the space profile for reasons I don't understand fully
Together, these things reduce the max space usage when compiling PrelNum from
17M to about 7Mbytes.
I think there are now *too many* seqs, and they waste work, but I don't have
time to find which ones.
Furthermore, we aren't done. For some reason, some of the stuff allocated by
the simplifier makes it through all during code generation and I don't see why.
There's a should-be-unnecessary call to coreBindsSize in Main.main which
zaps some, but not all of this space.
-dshow-passes reduces space usage a bit, but I don't think it should really.
All the measurements were made on a compiler compiled with profiling by
GHC 3.03. I hope they carry over to other builds!
* One trivial thing: changed all variables 'label' to 'lbl', becuase the
former is a keyword with -fglagow-exts in GHC 3.03 (which I was compiling with).
Something similar in StringBuffer.
|
|
|
|
|
| |
- Add findPtr() - searches through the heap for an occurrence of a
given value. Useful when debugging.
|
|
|
|
|
| |
Workaround bug in Linux's glibc 2.1: don't fflush(stdout) before
writing to stderr.
|
|
|
|
| |
use shutdownHaskellAndExit().
|
|
|
|
|
|
| |
- add USE_REPORT_PRELUDE
- Directory and Time don't need -monly-3-regs any more
- remove a -fno-prune-tydecls
|
|
|
|
|
| |
Changed vars of the form _unused to zz_unused, since 3.02 doesn't understand
this convention.
|
|
|
|
|
|
| |
Don't attempt to discover the exact location of cpp, instead use 'gcc
-E'. With the right combination of flags, it seems we can get the
same behaviour as calling cpp directly.
|
|
|
|
| |
Update to match CgUsages.hi-boot-5
|