| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
We want to compile the sources only once, and to produce both vanilla
and dyn object files. This means that the sources can't differ for the
two ways.
This needed a bit of a kludge to get keepCAFsForGHCi included only in
the dynamic library.
|
|
|
|
|
| |
It looks like it would fail anyway, as it 'show'ed its argument before
passing it on to printf.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This bug caused Trac #7386, because in the (rather tricky) "type
inference" (aka run time type reconstruction) done by the GHCi
debugger, we were failing to instantiate a data type family
correctly. When that code was written we didn't *have* data
families.
I wrote Note [Constructor arg types] to explain the new scheme.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Occurrences in terms are uses, in patterns they are not.
In this way we get unused-constructor warnings from modules like this
module M( f, g, T ) where
data T = T1 | T2 Bool
f x = T2 x
g T1 = True
g (T2 x) = x
Here a T1 value cannot be constructed, so we can warn. The use
in a pattern doesn't count. See Note [Patterns are not uses]
in RnPat.
Interestingly this change exposed three module in GHC itself
that had unused constructors, which I duly removed:
* ghc/Main.hs
* compiler/ghci/ByteCodeAsm
* compiler/nativeGen/PPC/RegInfo
Their changes are in this patch.
|
| |
|
|
|
|
|
| |
This fixes using TH when building profiled libraries when
dynamic-by-default is enabled.
|
|
|
|
|
| |
Except for CgUtils.fixStgRegisters that is used in the NCG and LLVM
backends, and should probably be moved somewhere else.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were being inconsistent about how we tested whether dump flags
were enabled; in particular, sometimes we also checked the verbosity,
and sometimes we didn't.
This lead to oddities such as "ghc -v4" printing an "Asm code" section
which didn't contain any code, and "-v4" enabled some parts of
"-ddump-deriv" but not others.
Now all the tests use dopt, which also takes the verbosity into account
as appropriate.
|
|
|
|
|
| |
Mostly d -> g (matching DynFlag -> GeneralFlag).
Also renamed if* to when*, matching the Haskell if/when names
|
|
|
|
|
| |
This avoids confusion due to [DynFlag] and DynFlags being completely
different types.
|
|
|
|
| |
We instead link objects into a temporary DLL and dlopen that
|
|
|
|
|
|
|
| |
We never ran into this before, because replace_osuf was almost always
False (i.e. we were almost always using the vanilla way when using
bytecode, so adjust_ul wasn't needed). Now that we can have the dynamic
way on by default many tests were failing because of it.
|
|
|
|
| |
When we have a dynamic ghc, we need to load the dynamic object files
|
|
|
|
|
| |
I've put mkSOName in HscTypes for now; I'm not sure what the best place
for it is.
|
|
|
|
|
| |
StgWord is a newtyped Word64, as it needed to be something that
has a UArray instance.
|
|\ |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
This frees wORD_SIZE up to be moved out of HaskellConstants
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
All the flags that 'ways' imply are now dynamic
|
|
|
|
|
|
|
|
|
| |
FastStrings are now always UTF8-encoded.
There's no StringTable for FastZString, but I don't think one is needed.
We only ever make a FastZString by running zEncodeFS on a FastString,
and the FastStrings are shared via the FastString StringTable, so we get
the same FastZString from the IORef.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a first step on the way to refactoring the FastString type.
FastBytes currently has no unique, mainly because there isn't currently
a nice way to produce them in Binary.
Also, we don't currently do the "Dictionary" thing with FastBytes in
Binary. I'm not sure whether this is important.
We can change both decisions later, but in the meantime this gets the
refactoring underway.
|
| |
|
|
|
|
|
|
| |
Our hand-written leAlt behaved differently when given a micture of
constructors, but I think that either it won't make a difference or
that this will be an improvement.
|
|
|
|
| |
We had effectively hand-written the instance instead
|
|
|
|
|
|
| |
Technically the behaviour of sortWith has changed, as it used
x `le` y = get_key x < get_key y
(note "<" rather than "<="), but I assume that that was just a mistake.
|
|\
| |
| |
| |
| | |
Fix conflicts in:
compiler/main/DynFlags.hs
|
| |
| |
| |
| | |
changes to unboxed tuple support
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
A side-effect is that we can no longer use the LogAction in
defaultErrorHandler, as we don't have DynFlags at that point.
But all that defaultErrorHandler did is to print Strings as
SevFatal, so now it takes a 'FatalMessager' instead.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is done by a 'unarisation' pre-pass at the STG level which
translates away all (live) binders binding something of unboxed
tuple type.
This has the following knock-on effects:
* The subkind hierarchy is vastly simplified (no UbxTupleKind or ArgKind)
* Various relaxed type checks in typechecker, 'foreign import prim' etc
* All case binders may be live at the Core level
|
| |
| |
| |
| |
| | |
By using Haskell's debugIsOn rather than CPP's "#ifdef DEBUG", we
don't need to kludge things to keep the warning checker happy etc.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
| |
We now use log_action with severity SevDump, rather than calling
printDump. This means that what happens to dumped info is now under
the control of the GHC API user, rather than always going to stdout.
|
|
|
|
| |
Fixes cgrun045(ghci) amongst others
|
| |
|