summaryrefslogtreecommitdiff
path: root/compiler/utils
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Merge branch 'master' into type-natsIavor S. Diatchki2011-12-292-56/+44
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/typecheck/TcCanonical.lhs compiler/typecheck/TcSMonad.lhs
| * | | | | Remove tabs, again.Iavor S. Diatchki2011-12-181-1/+1
| | | | | |
| * | | | | Remove tabs, so that I can push.Iavor S. Diatchki2011-12-181-9/+3
| | | | | |
* | | | | | Merge remote-tracking branch 'origin/master' into newcgSimon Marlow2012-02-135-82/+109
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/cmm/CmmLint.hs compiler/cmm/OldCmm.hs compiler/codeGen/CgMonad.lhs compiler/main/CodeOutput.lhs
| * | | | | Add dragonfly support; based on a patch from Goetz IsenmannIan Lynagh2012-02-111-9/+11
| | |_|_|/ | |/| | |
| * | | | Fix validateIan Lynagh2012-01-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch defines a flag -fno-warn-pointless-pragmas, and uses it to disable some warnings in the containers package. Along the way, also made a ContainsDynFlags class, and added a HasDynFlags instance for IOEnv (and thus TcRnIf and DsM).
| * | | | Switch to using the time package, rather than old-timeIan Lynagh2012-01-142-3/+39
| | | | |
| * | | | Add extra Num constraints since the Num superclass of Bits is removedBas van Dijk2012-01-141-3/+3
| | |_|/ | |/| |
| * | | KFreeBSD is also an ELF binaryJoachim Breitner2012-01-041-0/+2
| | | | | | | | | | | | | | | | Fixes: #5733
| * | | osElfTarget should default to False (#5733)Simon Marlow2012-01-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another portabilty regression: before Platform we used to use elf_OBJ_FORMAT: #if linux_TARGET_OS || freebsd_TARGET_OS || openbsd_TARGET_OS || solaris2_TARGET_OS #define elf_OBJ_FORMAT 1 #endif which defaults to undefined on unknown platforms. Defaulting to non-ELF is correct, it just means that we won't rely on ELF-specific functionality. I've added a comment to explain that.
| * | | Store the word size as determined by configure, in the settings file (#5735)Simon Marlow2012-01-041-9/+2
| | |/ | |/| | | | | | | | | | Now target32bit works for all targets without any manual intervention, as it should do. #5735 was a portability regression.
| * | Print more informative sizes in -dshow-passes,Simon Peyton Jones2011-12-291-1/+10
| | | | | | | | | | | | | | | and add intWithCommas to Outputable for printing large Int/Integers
| * | Tabs -> SpacesDavid Terei2011-12-191-33/+28
| | |
| * | Merge branch 'master' of http://darcs.haskell.org//ghcSimon Peyton Jones2011-12-191-8/+0
| |\ \ | | |/
| * | Tidy up pretty-printing for variablesSimon Peyton Jones2011-12-191-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | We already have a class OutputableBndr; this patch adds methods pprInfixOcc and pprPrefixOcc, so that we can get rid of the hideous hack (the old) Outputable.pprHsVar. The hack was exposed by Trac #5657, which is thereby fixed.
* | | Run the complete backend (Stg -> .S) incrementally on each StgBindingSimon Marlow2012-01-261-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is so that we can process the Stg code in constant space. Before we were generating all the C-- up front, leading to a large space leak. I haven't converted the LLVM or C back ends to the incremental scheme, but it's not hard to do.
* | | optimise OrdListSimon Marlow2012-01-251-19/+28
| | |
* | | Use Set instead of Map for CAFSetSimon Marlow2012-01-251-0/+2
| |/ |/|
* | Remove some dead codeIan Lynagh2011-12-151-8/+0
|/
* Remove unused Interval module.David Terei2011-12-111-116/+0
| | | | Patch from Michal Terepeta <michal.terepeta@gmail.com>
* Detect cases where as(1) doesn't recognise .ident directive (#5408)PHO2011-12-081-0/+1
| | | | .ident directives are usually ignored by as(1), and in some cases (like Darwin/PPC) they even raise an error.
* Include a stack trace in the panic message, when GHC is compiled profiled.Simon Marlow2011-11-301-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I tried this out on the panic we're currently getting for #3103: ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.3.20111128 for x86_64-unknown-linux): tcIfaceGlobal (local): not found: base:GHC.Word.W#{d 6w} [(32R, Type constructor `base:GHC.Word.Word{tc 32R}'), (r6O, Identifier `base:GHC.Word.$fNumWord{v r6O}'), (r6P, Identifier `base:GHC.Word.$fEqWord{v r6P}'), (r6Q, Identifier `base:GHC.Word.$fNumWord1{v r6Q}'), (r6R, Identifier `base:GHC.Word.$fNumWord2{v r6R}'), (r6S, Data constructor `base:GHC.Word.W#{d r6S}'), (r6U, Identifier `base:GHC.Word.W#{v r6U}'), (r75, Identifier `base:GHC.Word.$fNumWord_$csignum{v r75}'), (r76, Identifier `base:GHC.Word.$fEqWord_$c/={v r76}'), (r77, Identifier `base:GHC.Word.$fEqWord_$c=={v r77}')] { Main.main GHC.defaultErrorHandler GHC.runGhc GhcMonad.>>= GhcMonad.>>=.\ Main.main' Main.doMake GhcMake.load GhcMake.load2 GhcMake.upsweep GhcMake.upsweep.upsweep' GhcMake.reTypecheckLoop GhcMake.typecheckLoop GhcMake.typecheckLoop.\ TcRnMonad.initIfaceCheck TcRnMonad.initTcRnIf IOEnv.runIOEnv IOEnv.thenM IOEnv.thenM.\ TcIface.typecheckIface TcIface.typecheckIface.\ LoadIface.loadDecls LoadIface.loadDecl TcIface.tcIfaceDecl TcIface.tc_iface_decl TcIface.tcIdInfo MonadUtils.foldlM TcIface.tcIdInfo.tcPrag TcIface.tcUnfolding TcIface.tcPragExpr TcIface.tcIfaceExpr TcIface.tcIfaceAlt TcIface.tcIfaceDataCon }
* This patch includes:Dimitrios Vytiniotis2011-11-281-2/+11
| | | | | | | | | | | | | 0) Typo in panic message. 1) prioritization of equalities over family equalities in the worklists. 2) rewriting of inert substitutions and solveds on-the-spot instead of kicking them out in the inerts. This required a monadic map over substitutions hence the modifications in UniqFM. 3) Just comments and removing stale commented code. 4) Useful SCC for simplifyInfer. 5) Making CoreStats outputable.
* Fixes for NetBSDIan Lynagh2011-11-251-0/+2
| | | | | Based on a patch from Arnaud Degroote <degroote@NetBSD.org> in trac #5480.
* Remove registerised code for dead architectures: mips, ia64, alpha,David Terei2011-11-221-6/+0
| | | | hppa1, m68k
* Tabs -> Spaces + formatting fixesDavid Terei2011-11-162-166/+163
|
* New kind-polymorphic coreJose Pedro Magalhaes2011-11-112-6/+8
| | | | | | | | | This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds
* Fix #437: recompilation check includes flagsDavid Terei2011-11-091-11/+21
|
* Some code cleaningDavid Terei2011-11-081-1/+1
|
* Fix bitrotted NCG_DEBUG code, and switch to using a Haskell conditionalIan Lynagh2011-11-051-1/+9
|
* Use -fwarn-tabs when validatingIan Lynagh2011-11-0416-0/+112
| | | | | We only use it for "compiler" sources, i.e. not for libraries. Many modules have a -fno-warn-tabs kludge for now.
* Add some documentation to IOEnv.David Terei2011-10-251-0/+4
|
* Finish fixing #5529: Require that constructors are imported from all typesIan Lynagh2011-10-211-0/+5
| | | | | | We used to have a hack for Foreign.C.Types and System.Posix.Types, but I've removed that now. We also mark any constructors that we look through as "used", so that we don't get warnings about unused imports.
* A little more CPP removalIan Lynagh2011-10-191-0/+6
|
* Convert the HAVE_GNU_NONEXEC_STACK conditional into HaskellIan Lynagh2011-10-191-0/+1
|
* Add "have subsections via symbols" to the Platform typeIan Lynagh2011-10-191-3/+5
|
* Put the target platform in the settings fileIan Lynagh2011-10-192-78/+11
|
* Revert "Remove OSUnknown"Ian Lynagh2011-10-191-3/+6
| | | | | | | This reverts commit f75f26cc4eed3c3cfc256ebfb9e77b8e82a766fc. On second thoughts, this does make sense, for unregisterised via-C OSes at least.
* Revert "Remove ArchUnknown"Ian Lynagh2011-10-191-2/+4
| | | | | | | This reverts commit 2dea11a442e1d14d86fa661804de06a721943bf0. On second thoughts, this does make sense, for unregisterised via-C arches at least.
* Remove ArchUnknownIan Lynagh2011-10-181-4/+2
| | | | | | | It doesn't make sense. If platformArch is ArchUnknown then we don't know the answer to any questions about the arch. So now if we don't recognise the arch we just fail, and the new arch will need to be added to the datatype.
* Remove OSUnknownIan Lynagh2011-10-181-6/+3
| | | | | | It doesn't make sense. If platformOS is OSUnknown then we don't know the answer to any questions about the OS. So now if we don't recognise the OS we just fail, and the new OS will need to be added to the datatype.
* More CPP removal: pprDynamicLinkerAsmLabel in CLabelIan Lynagh2011-10-022-0/+6
| | | | And some knock-on changes
* Make Outputable.quotes do what the comments saySimon Peyton Jones2011-09-291-4/+5
| | | | | | | | Outputable.quotes claimed to drop the quotes if the enclosed thing has a trailing single quote; but its implementation checked for a *leading* quote. Fixes Trac #5509
* Change the way IfExtName is serialized so (most) wired-in names get special ↵Max Bolingbroke2011-09-271-22/+24
| | | | | | | | representation This lets IfaceType be dumber, with fewer special cases, because deserialization for more wired-in names will work. Once we have polymorphic kinds we will be able to replace IfaceTyCon with a simple IfExtName.
* Comments and functions renaming onlySimon Peyton Jones2011-09-231-9/+9
|
* Add support for all top-level declarations to GHCiSimon Marlow2011-09-211-6/+6
| | | | | | | | | | | | | | | | This is work mostly done by Daniel Winograd-Cort during his internship at MSR Cambridge, with some further refactoring by me. This commit adds support to GHCi for most top-level declarations that can be used in Haskell source files. Class, data, newtype, type, instance are all supported, as are Type Family-related declarations. The current set of declarations are shown by :show bindings. As with variable bindings, entities bound by newer declarations shadow earlier ones. Tests are in testsuite/tests/ghci/scripts/ghci039--ghci054. Documentation to follow.
* Fix typoIan Lynagh2011-09-171-1/+1
|
* Merge branch 'no-pred-ty'Max Bolingbroke2011-09-091-1/+10
|\ | | | | | | | | | | | | | | | | | | Conflicts: compiler/iface/BuildTyCl.lhs compiler/iface/MkIface.lhs compiler/iface/TcIface.lhs compiler/typecheck/TcTyClsDecls.lhs compiler/types/Class.lhs compiler/utils/Util.lhs
| * Implement -XConstraintKindMax Bolingbroke2011-09-061-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically as documented in http://hackage.haskell.org/trac/ghc/wiki/KindFact, this patch adds a new kind Constraint such that: Show :: * -> Constraint (?x::Int) :: Constraint (Int ~ a) :: Constraint And you can write *any* type with kind Constraint to the left of (=>): even if that type is a type synonym, type variable, indexed type or so on. The following (somewhat related) changes are also made: 1. We now box equality evidence. This is required because we want to give (Int ~ a) the *lifted* kind Constraint 2. For similar reasons, implicit parameters can now only be of a lifted kind. (?x::Int#) => ty is now ruled out 3. Implicit parameter constraints are now allowed in superclasses and instance contexts (this just falls out as OK with the new constraint solver) Internally the following major changes were made: 1. There is now no PredTy in the Type data type. Instead GHC checks the kind of a type to figure out if it is a predicate 2. There is now no AClass TyThing: we represent classes as TyThings just as a ATyCon (classes had TyCons anyway) 3. What used to be (~) is now pretty-printed as (~#). The box constructor EqBox :: (a ~# b) -> (a ~ b) 4. The type LCoercion is used internally in the constraint solver and type checker to represent coercions with free variables of type (a ~ b) rather than (a ~# b)
* | Implement associated type defaultsMax Bolingbroke2011-09-091-1/+10
|/ | | | | | | | | | | | | | | | | | | Basically, now you can write: class Cls a where type Typ a type Typ a = Just a And now if an instance does not specify an explicit associated type instance, one will be generated afresh based on that default. So for example this instance: instance Cls Int where Will be equivalent to this one: instance Cls Int where type Typ Int = Just Int