summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix-up to d4d4bef2 'Improve the desugaring of RULES'Simon Peyton Jones2014-08-011-2/+8
| | | | | I'd forgotten the possiblity that desugaring could generate dead dictionary bindings; easily fixed by calling occurAnalyseExpr
* Improve the desugaring of RULES, esp those from SPECIALISE pragmasSimon Peyton Jones2014-08-011-11/+64
| | | | | | | | | | | | In the code for Trac #8331 we were not getting a complaint, but we *were* getting a terrible (and virtually useless) RULE, looking like useAbstractMonad (complicated-dictionary-expresion) = $fuseAbstractMonad where we wanted useAbstractMonad d = $fuseAbstractMonad This commit improves the desugaring algorithm. More comments explain; see Note [Drop dictionary bindings on rule LHS]
* A panic in CmmBuildInfoTables.bundle shouldn't be a panic (#9329)Simon Marlow2014-08-011-4/+8
| | | | | | | | | | | | | | | | | Summary: This code needs more comments, but I believe this is safe. By definition I can't have broken anything that was working by turning a panic into a non-panic anyway. Test Plan: validate Reviewers: hvr, simonpj, austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D105 GHC Trac Issues: #9329
* add a commentSimon Marlow2014-08-011-0/+3
|
* update commentSimon Marlow2014-08-011-4/+3
|
* Fix reference to noteSimon Marlow2014-08-011-1/+1
|
* refactor to fix 80column overflowSimon Marlow2014-08-011-16/+20
|
* Typo fixesGabor Greif2014-08-014-7/+7
|
* Small tweaks to commentGabor Greif2014-08-011-2/+2
|
* Minor wordsmithing of commentsGabor Greif2014-08-011-4/+4
|
* Typo in commentGabor Greif2014-07-311-1/+1
|
* Complete work on new OVERLAPPABLE/OVERLAPPING pragmas (Trac #9242)Simon Peyton Jones2014-07-317-137/+173
| | | | | | | | | | | | | | | | | * Deprecate -XOverlappingInstances * Update test suite. Several tests even had entirely unnecessary uses of -XOverlappingInstances * Update user manual with a careful description of the instance resolution story * Fix an outright bug in the handling of duplidate instances in GHCi, which are meant to silently overwrite the earlier duplicate. The logic was right for family instances but was both more complicated, and plain wrong, for class instances. (If you are interested, the bug was that we were eliminating the duplicate from the InstEnv, but not from the [ClsInst] held in tcg_insts.) Test is ghci044a.
* Comments onlySimon Peyton Jones2014-07-311-0/+3
|
* Add a fast-path in TcInteract.kickOutRewritableSimon Peyton Jones2014-07-311-6/+10
|
* Comments and white spaceSimon Peyton Jones2014-07-312-18/+26
|
* Comments and minor refactoringSimon Peyton Jones2014-07-312-59/+82
| | | | | | | | - Better comments about Generalised Newtype Deriving See Note [Bindings for Generalised Newtype Deriving] - Refactor the interface between TcDeriv and TcGenDeriv, to reduce the size of the interface of the latter.
* Comments and white spaceSimon Peyton Jones2014-07-311-3/+2
|
* Allow multiple entry points when allocating recursive groups (#9303)Simon Marlow2014-07-312-35/+39
| | | | | | | | | | | | | | | | | Summary: In this example we ended up with some code that was only reachable via an info table, because a branch had been optimised away by the native code generator. The register allocator then got confused because it was only considering the first block of the proc to be an entry point, when actually any of the info tables are entry points. Test Plan: validate Reviewers: simonpj, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D88
* comment updateSimon Marlow2014-07-311-4/+1
|
* Add note about renaming of pattern synonym wrappersDr. ERDI Gergo2014-07-292-0/+28
|
* Refactor PatSynBind so that we can pass around PSBs instead of several argumentsDr. ERDI Gergo2014-07-297-117/+123
|
* When computing minimal recursive sets of bindings, don't include references ↵Dr. ERDI Gergo2014-07-291-1/+1
| | | | | | in wrapper definitions for explicitly-bidirectional pattern synonyms
* Typecheck the wrapper definition of a pattern synonym,Dr. ERDI Gergo2014-07-293-59/+82
| | | | after everything in the same scope is typechecked
* tcLookupPatSyn: look up the PatSyn record for a given IdDr. ERDI Gergo2014-07-291-3/+11
|
* Add renamer support for explicitly-bidirectional pattern synonymsDr. ERDI Gergo2014-07-291-5/+9
|
* Typechecker support for explicitly-bidirectional pattern synonymsDr. ERDI Gergo2014-07-291-16/+23
|
* Add parser support for explicitly bidirectional pattern synonymsDr. ERDI Gergo2014-07-294-13/+60
|
* New parser for pattern synonym declarations:Dr. ERDI Gergo2014-07-292-7/+28
| | | | | | Like splitCon for constructor definitions, the left-hand side of a pattern declaration is parsed as a single pattern which is then split into a ConName and argument variable names
* getCoerbileInsts: Move the two NT-unwrapping instances togetherJoachim Breitner2014-07-291-14/+14
| | | | | | | and fix the numbering in the comments. Thank to SPJ for noticing. Nothing deep in here, just a insufficent copy’n’pasting in revision 7e78faf0. Incidentially, 7e78faf0 did a better job updating the comments than the code :-).
* add Solaris' linker warning messages filtering into link phaseKarel Gardas2014-07-281-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Solaris ld emits harmless warning messages about unresolved symbol in case of compiling into shared library when we do not link against all the required libs. That is the case of GHC which does not link against RTS library explicitly in order to be able to chose the library later based on binary application linking parameters. The warnings look like: Undefined first referenced symbol in file stg_ap_n_fast ./T2386_Lib.o stg_upd_frame_info ./T2386_Lib.o templatezmhaskell_LanguageziHaskellziTHziLib_litE_closure ./T2386_Lib.o templatezmhaskell_LanguageziHaskellziTHziLib_appE_closure ./T2386_Lib.o templatezmhaskell_LanguageziHaskellziTHziLib_conE_closure ./T2386_Lib.o templatezmhaskell_LanguageziHaskellziTHziSyntax_mkNameGzud_closure ./T2386_Lib.o newCAF ./T2386_Lib.o stg_bh_upd_frame_info ./T2386_Lib.o stg_ap_ppp_fast ./T2386_Lib.o templatezmhaskell_LanguageziHaskellziTHziLib_stringL_closure ./T2386_Lib.o stg_ap_p_fast ./T2386_Lib.o stg_ap_pp_fast ./T2386_Lib.o ld: warning: symbol referencing errors this is actually coming from T2386 testcase. The emitting of those warnings is also a reason why so many TH testcases fail on Solaris. The patch provides filter which filters out only linker warnings. Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D94
* do not link with -lrt on Solaris for threaded wayKarel Gardas2014-07-281-1/+0
| | | | | | | | | | | | | | | | | Summary: This patch removes linking with rt library on Solaris for threaded way. The reason is simple it casuses few ffi related tests failures and also is not needed anymore. Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D95
* Comments onlyJan Stolarek2014-07-281-2/+2
|
* Implement OVERLAPPING and OVERLAPPABLE pragmas (see #9242)Iavor S. Diatchki2014-07-277-52/+104
| | | | | | | | | | | | | | | | | | | | | | This also removes the short-lived NO_OVERLAP pragama, and renames OVERLAP to OVERLAPS. An instance may be annotated with one of 4 pragams, to control its interaction with other overlapping instances: * OVERLAPPABLE: this instance is ignored if a more specific candidate exists * OVERLAPPING: this instance is preferred over more general candidates * OVERLAPS: both OVERLAPPING and OVERLAPPABLE (i.e., the previous GHC behavior). When compiling with -XOverlappingInstances, all instance are OVERLAPS. * INCOHERENT: same as before (see manual for details). When compiling with -XIncoherentInstances, all instances are INCOHERENT.
* Fix build on OS X due to macro-like string in commentEdward Z. Yang2014-07-261-2/+2
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Module reexports, fixing #8407.Edward Z. Yang2014-07-256-44/+113
| | | | | | | | | | | | | | | | | | | | | | | | | The general approach is to add a new field to the package database, reexported-modules, which considered by the module finder as possible module declarations. Unlike declaring stub module files, multiple reexports of the same physical package at the same name do not result in an ambiguous import. Has submodule updates for Cabal and haddock. NB: When a reexport renames a module, that renaming is *not* accessible from inside the package. This is not so much a deliberate design choice as for implementation expediency (reexport resolution happens only when a package is in the package database.) TODO: Error handling when there are duplicate reexports/etc is not very well tested. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Conflicts: compiler/main/HscTypes.lhs testsuite/.gitignore utils/haddock
* Refactor FFI error messagesSimon Peyton Jones2014-07-258-251/+279
| | | | | | | | | | | | | | This patch was provoked by Trac #5610, which I finally got a moment to look at. In the end I added a new data type ErrUtils.Validity, data Validity = IsValid -- Everything is fine | NotValid MsgDoc -- A problem, and some indication of why with some suitable combinators, and used it where appropriate (which touches quite a few modules). The main payoff is that error messages improve for FFI type validation.
* Check for boxed tau types in the LHS of type family instancesSimon Peyton Jones2014-07-251-1/+8
| | | | Fixes Trac #9357
* Use the right kinds on the LHS in 'deriving' clausesSimon Peyton Jones2014-07-241-10/+26
| | | | This patch fixes Trac #9359
* Fixed issue with detection of duplicate record fieldsGintautas Miliauskas2014-07-241-12/+19
| | | | | | | | | Duplicate record fields would not be detected when given a type with multiple data constructors, and the first data constructor had a record field r1 and any consecutive data constructors had multiple fields named r1. This fixes #9156 and was reviewed in https://phabricator.haskell.org/D87
* Add missing memory fence to atomicWriteIntArray#Johan Tibell2014-07-233-1/+7
|
* X86 codegen: make LOCK a real instruction prefixJohan Tibell2014-07-233-12/+8
| | | | | | | | | | Before LOCK was a separate instruction and this led to the register allocator separating it from the instruction it was supposed to be a prefix of, leading to illegal assembly such as lock mov Fix contributed by PÁLI Gábor János.
* Always qualify on hi interface mismatch.Edward Z. Yang2014-07-211-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Rename PackageId to PackageKey, distinguishing it from Cabal's PackageId.Edward Z. Yang2014-07-2153-335/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, both Cabal and GHC defined the type PackageId, and we expected them to be roughly equivalent (but represented differently). This refactoring separates these two notions. A package ID is a user-visible identifier; it's the thing you write in a Cabal file, e.g. containers-0.9. The components of this ID are semantically meaningful, and decompose into a package name and a package vrsion. A package key is an opaque identifier used by GHC to generate linking symbols. Presently, it just consists of a package name and a package version, but pursuant to #9265 we are planning to extend it to record other information. Within a single executable, it uniquely identifies a package. It is *not* an InstalledPackageId, as the choice of a package key affects the ABI of a package (whereas an InstalledPackageId is computed after compilation.) Cabal computes a package key for the package and passes it to GHC using -package-name (now *extremely* misnamed). As an added bonus, we don't have to worry about shadowing anymore. As a follow on, we should introduce -current-package-key having the same role as -package-name, and deprecate the old flag. This commit is just renaming. The haddock submodule needed to be updated. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D79 Conflicts: compiler/main/HscTypes.lhs compiler/main/Packages.lhs utils/haddock
* Make 'ghc' a wired in package.Edward Z. Yang2014-07-213-1/+9
| | | | | | | | | | | | | | | | | | | | Summary: Previously, the GHC API was "semi" wired-in: it was installed with a version number, but that version number was hard-coded into the compiler and it wasn't really possible to install other copies of the GHC API. This patch makes the GHC API more similar to existing wired-in packages such as ghc-prim, and will be helpful when we start extending the amount of information passed to -package-name. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, simonpj, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D78
* Typos in noteGabor Greif2014-07-211-3/+3
|
* driver: use absolute paths in ld scripts (#7452)Austin Seipp2014-07-201-1/+3
| | | | | | Patch contributed by slowmo. Signed-off-by: Austin Seipp <austin@well-typed.com>
* fix inconsistency in exported functions from TcSplice.lhs/lhs-boot files ↵Karel Gardas2014-07-201-4/+4
| | | | | | | | | | | | | | | | | | | | when GHCI is not defined Summary: This patch fixes inconsistency in exported functions from TcSplice.lhs and TcSplice.lhs-boot files. It looks like only GHC HEAD is sensitive to it and complains about it while bootstraping another HEAD. At least this is what happening on Solaris/AMD64 builder machine where GHC 7.9.20140620 is used as a boostrap compiler. The failure does not happen on another builders. Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D74
* Adding more parser exports and some documentation.Andrew Gibiansky2014-07-201-3/+28
| | | | | | | | | | | | | | Summary: Add a few exports to be generated by the Happy parser module. Add documentation showing how to use the Happy parser. Test Plan: Validate Reviewers: carter, austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D71
* types: detabify/dewhitespace KindAustin Seipp2014-07-201-28/+21
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* utils: detabify/dewhitespace DigraphAustin Seipp2014-07-201-43/+36
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>