summaryrefslogtreecommitdiff
path: root/compiler/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* rewrite branchChainElim; other refactoring in CmmContFlowOptSimon Marlow2011-08-251-1/+7
|
* Snapshot of codegen refactoring to share with simonpjSimon Marlow2011-08-251-0/+1
|
* enhance ArchARM with ISA and ISA extensionsKarel Gardas2011-08-211-2/+41
| | | | | | | This patch enhances ArchARM with ARM ISA and ISA extensions details as is suggested in the comment in Platform.hs file. The patch is needed by future patch which will use ARM ISA information in order to pass appropriate command-line option to the LLVM llc tool.
* Add a case for kfreebsdgnu in Platforms.hsIan Lynagh2011-08-071-0/+2
|
* Add ListSetOps.removeRedundantSimon Peyton Jones2011-08-021-1/+20
| | | | It's needed in ghc/InteractiveUI, although not in the compiler itself
* Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2011-07-291-7/+3
|\
| * Add CoreMonad.reinitializeGlobals so plugins can work around linker issuesMax Bolingbroke2011-07-291-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a plugin is loaded, it currently gets linked against a *newly loaded* copy of the GHC package. This would not be a problem, except that the new copy has its own mutable state that is not shared with that state that has already been initialized by the original GHC package. This leads to loaded plugins calling GHC code which pokes the static flags, and then dying with a panic because the static flags *it* sees are uninitialized. There are two possible solutions: 1. Export the symbols from the GHC executable from the GHC library and link against this existing copy rather than a new copy of the GHC library 2. Carefully ensure that the global state in the two copies of the GHC library matches I tried 1. and it *almost* works (and speeds up plugin load times!) except on Windows. On Windows the GHC library tends to export more than 65536 symbols (see #5292) which overflows the limit of what we can export from the EXE and causes breakage. (Note that if the GHC exeecutable was dynamically linked this wouldn't be a problem, because we could share the GHC library it links to.) We are going to try 2. instead. Unfortunately, this means that every plugin will have to say `reinitializeGlobals` before it does anything, but never mind. I've threaded the cr_globals through CoreM rather than giving them as an argument to the plugin function so that we can turn this function into (return ()) without breaking any plugins when we eventually get 1. working.
* | Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2011-07-281-1/+4
|\ \ | |/
| * Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2011-07-279-35/+179
| |\ | | | | | | | | | | | | | | | Conflicts: compiler/coreSyn/CoreSubst.lhs compiler/rename/RnNames.lhs
| * | White space and commentsSimon Peyton Jones2011-07-271-1/+4
| | |
* | | Add "alter" functions to UniqFM, VarEnv, NameEnvSimon Peyton Jones2011-07-281-2/+9
| |/ |/| | | | | I need these for a trie data structure I'm working on
* | Sync the typeable fingerprinting with baseIan Lynagh2011-07-221-2/+18
| |
* | Comments onlySimon Peyton Jones2011-07-221-0/+1
| |
* | Implement a findCycle function in Digraph,Simon Peyton Jones2011-07-222-9/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and use it to report module loops nicely This fixes Trac #5307. Now we get Module imports form a cycle: module `M8' (.\M8.hs) imports `M1' (M1.hs) which imports `M9' (.\M9.hs-boot) which imports `M8' (.\M8.hs) And the algorithm is linear time.
* | More work towards cross-compilationIan Lynagh2011-07-152-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | There's now a variant of the Outputable class that knows what platform we're targetting: class PlatformOutputable a where pprPlatform :: Platform -> a -> SDoc pprPlatformPrec :: Platform -> Rational -> a -> SDoc and various instances have had to be converted to use that class, and we pass Platform around accordingly.
* | omit the local MD5 implementation if we can get it fromSimon Marlow2011-07-122-15/+27
| | | | | | | | GHC.Fingerprint in base instead.
* | derive Typeable (eliminate deprecation warnings for mkTyCon)Simon Marlow2011-07-122-9/+4
| |
* | fix Binary instance for TyCon following Typeable implementationSimon Marlow2011-07-121-0/+12
| | | | | | | | changes
* | move computeFingerprint from MkIface to BinarySimon Marlow2011-07-121-0/+14
|/
* New functionality required for the supercompiler pluginMax Bolingbroke2011-06-292-1/+34
|
* Fix to use %note instead of @note as an ELF section note on ARM architectureKarel Gardas2011-06-271-0/+4
| | | | | | | | It looks like where x86 assembly is using '@' character, ARM assembly requires '%' character. This makes a problem in the patch 814edf44433801e37318ce79082ac6991dbc87dd 'Force re-linking if the options have changed (#4451)' which makes linking assembly file uncompilable on ARM. This patch fixes this.
* SafeHaskell: Make base GHC.* modules untrustedDavid Terei2011-06-177-44/+6
|
* SafeHaskell: Fix imports of base when base unsafeDavid Terei2011-06-172-4/+9
|
* SafeHaskell: Fix validation errors when unsafe base usedDavid Terei2011-06-172-2/+4
|
* SafeHaskell: Fix validation errors when Safe base used.David Terei2011-06-173-4/+16
|
* SafeHaskell: Even more fixing to work with safe baseDavid Terei2011-06-172-1/+2
|
* SafeHaskell: More fixing to work with safe baseDavid Terei2011-06-172-7/+8
|
* SafeHaskell: Update to work with safe baseDavid Terei2011-06-176-4/+30
|
* SafeHaskell: Fix recompilation avoidance to take Safe into account.David Terei2011-06-171-0/+9
|
* Fill out the osElfTarget definitionIan Lynagh2011-06-081-4/+7
| | | | | For now we panic in the OSUnknown case. It would probably be better to make the enumerations complete instead, though.
* Add a target32Bit function to PlatformIan Lynagh2011-06-081-0/+13
|
* Remove out-of-date commentIan Lynagh2011-06-081-1/+0
|
* Whitespace only in utils/Platform.hsIan Lynagh2011-06-081-46/+46
|