summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Make the on-the-fly unifier defer forall/forall unificationSimon Peyton Jones2014-11-211-25/+1
| | | | | | This has to be done by the full constraint solver anyway, and it's rare, so there's really no point in doing it twice. This change just deletes some (tricky) code.
* Put the decision of when a unification variable can unify with a polytypeSimon Peyton Jones2014-11-212-33/+33
| | | | | This was being doing independently in two places. Now it's done in one place, TcType.canUnifyWithPolyType
* Implement full co/contra-variant subsumption checking (fixes Trac #9569)Simon Peyton Jones2014-11-2115-150/+312
| | | | | | | | | | | | | | | | | | | | | | | | This is a pretty big patch, but which substantially iproves the subsumption check. Trac #9569 was the presenting example, showing how type inference could depend rather delicately on eta expansion. But there are other less exotic examples; see Note [Co/contra-variance of subsumption checking] in TcUnify. The driving change is to TcUnify.tcSubType. But also * HsWrapper gets a new constructor WpFun, which behaves very like CoFun: if wrap1 :: exp_arg <= act_arg wrap2 :: act_res <= exp_res then WpFun wrap1 wrap2 : (act_arg -> arg_res) <= (exp_arg -> exp_res) * I generalised TcExp.tcApp to call tcSubType on the result, rather than tcUnifyType. I think this just makes it consistent with everything else, notably tcWrapResult. As usual I ended up doing some follow-on refactoring * AmbigOrigin is gone (in favour of TypeEqOrigin) * Combined BindPatSigCtxt and PatSigCxt into one * Improved a bit of error message generation
* Move all the zonk/tidy stuff together into TcMType (refactoring only)Simon Peyton Jones2014-11-213-85/+88
|
* Rejig builders for pattern synonyms, especially unlifted onesSimon Peyton Jones2014-11-2112-417/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a pattern synonym is for an unlifted pattern, its "builder" would naturally be a top-level unlifted binding, which isn't allowed. So we give it an extra Void# argument. Our Plan A involved then making *two* Ids for these builders, with some consequential fuss in the desugarer. This was more pain than I liked, so I've re-jigged it. * There is just one builder for a pattern synonym. * It may have an extra Void# arg, but this decision is signalled by the Bool in the psBuilder field. I did the same for the psMatcher field. Both Bools are serialised into interface files, so there is absolutely no doubt whether that extra Void# argument is required. * I renamed "wrapper" to "builder". We have too may "wrappers" * In order to deal with typecchecking occurrences of P in expressions, I refactored the tcInferId code in TcExpr. All of this allowed me to revert 5fe872 "Apply compulsory unfoldings during desugaring, except for `seq` which is special." which turned out to be a rather messy hack in DsBinds
* Comments onlySimon Peyton Jones2014-11-213-3/+2
|
* Rewrite Note [Deriving any class]Joachim Breitner2014-11-211-14/+18
| | | | | | Phrases like “Currently, you can...” are going to sound strange in a few years; I rephrased the note to sound less like a proposal and more like an explanation.
* Revert change to alias handling in ppLlvmGlobal introduced in d87fa34, which ↵Luke Iannini2014-11-211-1/+1
| | | | | | requires LLVM 3.6. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Unbreak build (fallout from 067f1e4f20e)Austin Seipp2014-11-211-3/+3
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Implement #5462 (deriving clause for arbitrary classes)Jose Pedro Magalhaes2014-11-2017-67/+398
| | | | | | | | | | | | | | Summary: (this has been submitted on behalf on @dreixel) Reviewers: simonpj, hvr, austin Reviewed By: simonpj, austin Subscribers: goldfire, thomie, carter, dreixel Differential Revision: https://phabricator.haskell.org/D476 GHC Trac Issues: #5462
* Add flag `-fwarn-missing-exported-sigs`Eric Seidel2014-11-209-10/+77
| | | | | | | | | | | | | | | | | | | Summary: add `-fwarn-missing-exported-sigs` to only warn about missing signatures if the name is exported Test Plan: validate, see testsuite/tests/warnings/should_compile/T2526.hs Reviewers: ezyang, austin, thomie Reviewed By: austin, thomie Subscribers: ezyang, thomie, carter Differential Revision: https://phabricator.haskell.org/D482 GHC Trac Issues: #2526 Conflicts: docs/users_guide/7.10.1-notes.xml
* Export scanl' from Data.OldList and Data.ListDavid Feuer2014-11-203-0/+5
| | | | | | | | | | | | | | Summary: Fixes #9368 Reviewers: nomeata, hvr, ekmett, austin Reviewed By: ekmett, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D498 GHC Trac Issues: #9368
* Hide `Data.OldList` moduleHerbert Valerio Riedel2014-11-2012-18/+14
| | | | | | | | | | | | | | | | | | | | | Summary: The `Data.OldList` module was originally created in 3daf0023d2dcf7caf85d61f2dc177f8e9421b2fd to provide a way to access the original list-specialised functions from `Data.List`. It was also made an exposed module in order to facilitate adapting the `haskell2010`/`haskell98` packages. However, since the `haskell2010`/`haskell98` packages were dropped, we no longer need to expose `Data.OldList`. Depends on D511 Reviewers: ekmett, austin Reviewed By: ekmett, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D513
* Delete old-{time,locale} and haskell{98,2010}Austin Seipp2014-11-205-16/+0
| | | | | | | | | | | | | | | | | | Summary: Depends on D510. This is the final blow and removes them from the tree completely. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: I looked really hard but didn't see them. Reviewers: hvr, ekmett Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D511 GHC Trac Issues: #9590
* Don't build old-{time,locale} and haskell{98,2010}Austin Seipp2014-11-202-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed on ghc-devs@haskell.org and the trac ticket, we're removing these packages from the 7.10 release as they no longer work correctly, and can't easily be made to properly follow the standard as `base` changes over time. This does not remove the packages from the tree, only the build system. https://www.haskell.org/pipermail/ghc-devs/2014-November/007357.html Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: iiam Reviewers: hvr, ekmett Reviewed By: hvr, ekmett Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D510 GHC Trac Issues: #9590
* Test #9109 in typecheck/should_fail/T9109Richard Eisenberg2014-11-203-0/+24
|
* Update manual to get rid of bogus `coerce` example (#9788)Richard Eisenberg2014-11-201-4/+5
|
* Test #9201 in typecheck/should_fail/T9201Richard Eisenberg2014-11-203-0/+13
|
* Test #9318 in typecheck/should_fail/T9318Richard Eisenberg2014-11-203-0/+20
|
* Add release notes for #8100, #9527, and #9064.Richard Eisenberg2014-11-201-0/+13
|
* Test #9151 in typecheck/should_compile/T9151.Richard Eisenberg2014-11-202-0/+12
| | | | | This test case should pass right now -- the bug is fixed, presumably by #9200.
* Fix #9220 by adding role annotations.Richard Eisenberg2014-11-207-3/+110
| | | | | This includes a submodule update for `array`. There is also an added test in libraries/array/tests/T9220.
* Fix #9209, by reporting an error instead of panicking on bad splices.Richard Eisenberg2014-11-203-32/+42
|
* Test #9209 in th/T9209Richard Eisenberg2014-11-203-0/+10
|
* Kill trailing whitespaceJan Stolarek2014-11-203-27/+27
|
* Split SynTyCon to SynonymTyCon and FamilyTyConJan Stolarek2014-11-2029-342/+489
| | | | | | | | | | | | | | This patch refactors internal representation of type synonyms and type families by splitting them into two separate data constructors of TyCon data type. The main motivation is is that some fields make sense only for type synonyms and some make sense only for type families. This will be even more true with the upcoming injective type families. There is also some refactoring of names to keep the naming constistent. And thus tc_kind field has become tyConKind and tc_roles has become tcRoles. Both changes are not visible from the outside of TyCon module. Updates haddock submodule Reviewers: simonpj Differential Revision: https://phabricator.haskell.org/D508 GHC Trac Issues: #9812
* Implement typechecker pluginsAdam Gundry2014-11-2017-113/+613
| | | | | | | | | | | | | | | | | | | | Summary: See https://ghc.haskell.org/trac/ghc/wiki/Plugins/TypeChecker This is based on work by Iavor Diatchki and Eric Seidel. Test Plan: validate Reviewers: simonpj, austin Reviewed By: austin Subscribers: gridaphobe, yav, thomie, carter Differential Revision: https://phabricator.haskell.org/D489 Conflicts: docs/users_guide/7.10.1-notes.xml
* Add support for pattern synonym type signatures.Dr. ERDI Gergo2014-11-2022-262/+483
| | | | | | | | | | | | Syntax is of the form pattern P :: (Prov b) => (Req a) => a -> b -> Int -> T a which declares a pattern synonym called `P`, with argument types `a`, `b`, and `Int`, and result type `T a`, with provided context `(Prov b)` and required context `(Req a)`. The Haddock submodule is also updated to use this new syntax in generated docs.
* Update shift/reduce conflict number in parserDr. ERDI Gergo2014-11-201-0/+12
|
* Make Data.Functor.Identity trustworthy againHerbert Valerio Riedel2014-11-201-0/+1
| | | | | | | | | | | | | | Alas `{-# LANGUAGE Safe #-}` can't be used since `Data.Coerce` isn't "safe". However, we use `coerce` just as an optimisation (see also 4ba884bdd3a9521ea92fcda8f601a7d0f3537bc1 which broke the safe-inferred status of `Data.Functor.Identity`), so this module at least deserves `{-# LANGUAGE Trustworthy #-}`. NOTE: `Data.Functor.Identity` was added to `base` in the context of #9664 Reviewed By: luite Differential Revision: https://phabricator.haskell.org/D507
* Make calling conventions in template haskell Syntax.hs consistent with those ↵Luite Stegeman2014-11-199-31/+106
| | | | | | | | | | | | | | | | | | in ghc ForeignCall.hs this impliments #9703 from ghc trac Test Plan: still needs tests Reviewers: cmsaperstein, ekmett, goldfire, austin Reviewed By: goldfire, austin Subscribers: goldfire, thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D353 GHC Trac Issues: #9703
* ghc generates more user-friendly error messagesMike Izbicki2014-11-1913-10/+83
| | | | | | | | | | Test Plan: Compiled ghc fine. Opened ghci and fed it invalid code. It gave the improved error messages in response. Reviewers: austin Subscribers: thomie, simonpj, spacekitteh, rwbarton, simonmar, carter Differential Revision: https://phabricator.haskell.org/D201
* arm64: 64bit iOS and SMP support (#7942)Luke Iannini2014-11-1917-19/+166
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* compiler/main: fixes #9776Carlos Tomé2014-11-194-1/+8
| | | | | | | | | | | | | | Test Plan: test T9776 under tests/driver Reviewers: jstolarek, austin Reviewed By: jstolarek, austin Subscribers: jstolarek, thomie, carter Differential Revision: https://phabricator.haskell.org/D503 GHC Trac Issues: #9776
* use correct word size for shiftRightLogical and removeOp32Luite Stegeman2014-11-191-16/+26
| | | | | | | | | | | | | | | | | | | | | | Summary: shiftRightLogical used a host sized Word for the intermediate value, which would produce the wrong result when cross compiling to a target with a different word size than the host. removeOp32 used the preprocessor to bake in word size assumptions, rather than getting the target word size from DynFlags Test Plan: validate Reviewers: hvr, rwbarton, carter, austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D502 GHC Trac Issues: #9736
* make TcRnMonad.lhs respect -ddump-to-fileGreg Weber2014-11-196-41/+79
| | | | | | | | | | | | | | | | | | | | | Summary: allows things such as: -ddump-to-file -ddump-splices Test Plan: compile with flags -ddump-to-file -ddump-splices verify that it does output an extra file Try out other flags. I noticed that with -ddump-tc there is some output going to file and some to stdout. Reviewers: hvr, austin Reviewed By: austin Subscribers: simonpj, thomie, carter Differential Revision: https://phabricator.haskell.org/D460 GHC Trac Issues: #9126
* Allow -dead_strip linking on platforms with .subsections_via_symbolsMoritz Angermann2014-11-1913-19/+79
| | | | | | | | | | | | | | | | | Summary: This allows to link objects produced with the llvm code generator to be linked with -dead_strip. This applies to at least the iOS cross compiler and OS X compiler. Signed-off-by: Moritz Angermann <moritz@lichtzwerge.de> Test Plan: Create a ffi library and link it with -dead_strip. If the resulting binary does not crash, the patch works as advertised. Reviewers: rwbarton, simonmar, hvr, dterei, mzero, ezyang, austin Reviewed By: dterei, ezyang, austin Subscribers: thomie, mzero, simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D206
* Only test for bug #9439 when llvm is installedThomas Miedema2014-11-191-50/+53
| | | | | | | | | | | | Reviewers: bgamari, austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D500 GHC Trac Issues: #9807
* add missing instances for Loc and a few missing Eq instancesLuite Stegeman2014-11-191-2/+3
| | | | | | | | | | | | Summary: This adds a few missing instances that can be automatically derived Reviewers: hvr, goldfire, austin Reviewed By: goldfire, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D495
* template-haskell: Missing instances for Rational and ().Mathieu Boespflug2014-11-192-2/+14
| | | | | | | | | | | | Test Plan: ./validate Reviewers: austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D492
* Filter input to abiHash earlyMateusz Kowalczyk2014-11-191-3/+9
| | | | | | | | | | | | | | | | Summary: This is already done near the only call site so why not. It is ugly to see it at 'abiHash' itself. Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D491
* Add remaining <unknown>s and comments to .mailmapThomas Miedema2014-11-191-1/+58
| | | | | | | | | | | | | | | | | Summary: All done, except for these 2 empty commits: $ git log --author=unknown --use-mailmap --oneline 7e5c2b2 [project @ 2001-12-06 10:17:35 by mbs] Established under cvs. 6456598 [project @ 2000-12-01 10:33:41 by cryder] Initial revision Reviewers: hvr, austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D477
* Turn CoreWriter into a newtype; fix commentDavid Feuer2014-11-191-8/+11
| | | | | | | | | | | | | | | Summary: Turn CoreWriter into a newtype. A comment claimed something is forced before returning, but it's actually not. Change comment to match reality. Reviewers: xich, simonpj, ezyang, austin Reviewed By: ezyang, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D453
* Implement new Foldable methods for HsPatSynDetailsDavid Feuer2014-11-191-1/+20
| | | | | | | | | | | | Summary: Also explicitly define foldl1 and foldr1, which should generally work better with list-specific versions. Reviewers: austin Reviewed By: austin Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D430
* Update documentation for "Batch compiler mode"Thomas Miedema2014-11-192-7/+20
| | | | | | | | | | | | | | | | | | Summary: Since commit 7828bf3ea2ea34e7a3a8662f5f621ef706ffee5c * --make is the default * -c is a mode flag, except when used in combination with --make Also: * -C (generate C code) is only available in unregisterised mode. Reviewers: austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D427
* Refactor: use System.FilePath.splitSearchPathThomas Miedema2014-11-194-50/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: To address #2521 ("Trailing colon on GHC_PACKAGE_PATH doesn't work with ghc-pkg"), we were using a custom version of splitSearchPath (e4f46f5de). This solution however caused issue #9698 ("GHC_PACKAGE_PATH should be more lenient for empty paths"). This patch reverts back to System.FilePath.splitSearchPath (fixes #9698) and adresses (#2521) by testing for a trailing search path separators explicitly (instead of implicitly using empty search path elements). Empty paths are now allowed (ignored on Windows, interpreted as current directory on Posix systems), and trailing path separator still tack on the user and system package databases. Also update submodule filepath, which has a version of splitSearchPath which handles quotes in the same way as our custom version did. Test Plan: $ GHC_PACKAGE_PATH=/::/home: ./ghc-pkg list ... db stack: ["/",".","/home","<userdb>","<systemdb>"] ... Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D414 GHC Trac Issues: #2521, #9698
* The test runner now also works under the msys-native Python.Gintautas Miliauskas2014-11-191-0/+16
| | | | | | | Msys binaries apply heuristics to escape paths in arguments intended for non-msys binaries, which breaks timeout invocations, see #9626. Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: remove old-style field designator extension (#9396)Austin Seipp2014-11-192-29/+29
| | | | | | Authored-by: jrp Signed-off-by: Austin Seipp <austin@well-typed.com>
* Optimise `Identity` instances with `coerce`Herbert Valerio Riedel2014-11-191-13/+34
| | | | | | | | | | | | This also overrides all optional `Foldable` methods (which would otherwise be default-implemented in terms of `foldMap`) with supposedly optimally minimal implementations. While at it, this also removes the redundant `{-# LANGUAGE CPP #-}`. Reviewed By: austin, dfeuer Differential Revision: https://phabricator.haskell.org/D467
* Restore exact old semantics of `decodeFloat`Herbert Valerio Riedel2014-11-195-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `integer-gmp2` uses the new 64bit-based IEEE deconstructing primop introduced in b62bd5ecf3be421778e4835010b6b334e95c5a56. However, the returned values differ for exceptional IEEE values: Previous (expected) semantics: > decodeFloat (-1/0) (-4503599627370496,972) > decodeFloat (1/0) (4503599627370496,972) > decodeFloat (0/0) (-6755399441055744,972) Currently (broken) semantics: > decodeFloat (-1/0 :: Double) (-9223372036854775808,-53) > decodeFloat (1/0 :: Double) (-9223372036854775808,-53) > decodeFloat (0/0 :: Double) (-9223372036854775808,-53) This patch reverts to the old expected semantics. I plan to revisit the implementation during GHC 7.11 development. This should address #9810 Reviewed By: austin, ekmett, luite Differential Revision: https://phabricator.haskell.org/D486