summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Travis: Boot with ghc-8.2.1wip/travis2Joachim Breitner2017-08-191-5/+5
|
* Inline join points with a single occurrence even into joinrecsJoachim Breitner2017-08-191-1/+2
| | | | | | as proposed by SPJ in https://ghc.haskell.org/trac/ghc/ticket/14137#comment:8. (explanatory Note pending)
* CSE.cseOneExpr: Set InScopeSet correctlyJoachim Breitner2017-08-181-2/+8
| | | | | because this is a convenience function for API users, calculate the in-scope set from `exprFreeVars`.
* testsuite: Add test for #13916Ben Gamari2017-08-173-0/+170
| | | | | | | | Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3764
* Make function intToSBigNat# preserve sign (fixes #14085)Olivier Chéron2017-08-174-4/+10
| | | | | | | | | | | | | | | | | | | Impacts only functions gcdExtInteger, powModInteger and recipModInteger which gave invalid results on negative S# inputs. Also fixes gcdExtInteger assertion when first argument is negative. Test Plan: Updated test case integerGmpInternals Reviewers: austin, hvr, goldfire, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14085 Differential Revision: https://phabricator.haskell.org/D3826
* Remove unneeded reqlibs for mtl and parsec in the GHC testsuiteRyan Scott2017-08-1713-21/+20
| | | | | | | | | | | | | | | | Now that `mtl` and `parsec` are boot libraries, there's no need to qualify various tests in the testsuite with `reqlib('mtl')` or `reqlib('parsec')`. Test Plan: make test TEST="T4809 tcfail126 T4355 tc232 tc223 tc220 tc217 tc183 T5303 DoParamM qq005 qq006 galois_raytrace T1074 mod133 T3787 T4316 prog011 drvfail006 drvfail008" Reviewers: bgamari, austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3855
* Fix #13399 by documenting higher-rank kinds.Richard Eisenberg2017-08-171-0/+39
| | | | | | | | | | | | | | Test Plan: Read it. Reviewers: simonpj, RyanGlScott, austin, bgamari Reviewed By: RyanGlScott Subscribers: rwbarton, thomie GHC Trac Issues: #13399 Differential Revision: https://phabricator.haskell.org/D3860
* user-guide: add `:type +d` and `:type +v` in release highlightTakenobu Tani2017-08-171-0/+2
| | | | | | | | | | | | | | | | | | Add new ghci command to release highlight and fix link anchor. This commit is for ghc-8.2 branch. Test Plan: build Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #11975 Differential Revision: https://phabricator.haskell.org/D3850
* rts: Enable USDT probes object on LinuxBen Gamari2017-08-171-1/+5
| | | | | | | | | | | | Summary: The dtrace utility shipped with Debian expects this. Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3829
* user-guide: fix examples of ghci commandsTakenobu Tani2017-08-172-12/+21
| | | | | | | | | | | | | | | | | | | Fix examples of ghci commands: * correct typos * add top-level binding without let statement * modify Time.getClockTime to Data.Time.getZonedTime * modify Directory.setCurrentDirectory * modify ghc version number Test Plan: build Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3852
* Fix index entries in "separate compilation" sectionChris Martin2017-08-171-5/+9
| | | | | This appears to have been a mistake from the translation of the manual into RST format by 4fd6207ec6.
* Add missing initial version for extension doc.superfunc2017-08-171-0/+2
|
* Loads of doc(test)sDavid Luposchainsky2017-08-1714-110/+272
|
* Convert documentation examples to doctests for ReadP moduleDavid Luposchainsky2017-08-171-73/+54
|
* Mention the category laws explicitlyDavid Luposchainsky2017-08-171-2/+7
|
* Add some Monoid doctestsDavid Luposchainsky2017-08-172-4/+38
|
* Insert missing blank line to fix Applicative docDavid Luposchainsky2017-08-171-0/+1
|
* Sections with undefined operators have non-standard behaviorDavid Luposchainsky2017-08-171-0/+23
|
* Doctest for Void.absurdDavid Luposchainsky2017-08-171-0/+8
|
* Handle ListPat in isStrictPatternAlexander Biehl2017-08-171-0/+1
| | | This fixes #14105.
* Remove extra ` from "kind-indexed GADTs" docChris Martin2017-08-171-1/+1
|
* Fix #11785 by making reifyKind = reifyTypeRyan Scott2017-08-171-27/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: This ties up the last loose end in Template Haskell's separate code paths for types and kinds. By making `reifyKind = reifyType` in `TcSplice`, types and kinds are now treated on equal terms in TH. This is itself a small patch, but most of the heavy lifting to make this possible was done in ad7b945257ea262e3f6f46daa4ff3e451aeeae0b. Test Plan: ./validate Reviewers: goldfire, austin, bgamari Reviewed By: goldfire Subscribers: rwbarton, thomie GHC Trac Issues: #11785 Differential Revision: https://phabricator.haskell.org/D3854
* Suggest how to fix illegally nested foralls in GADT constructor type signaturesRyan Scott2017-08-174-1/+98
| | | | | | | | | | | | | | | | | | Summary: Although the code from #12087 isn't accepted by GHC, we can at least do a better job of letting users know what the problem is, and how to fix it. Test Plan: make test TEST=T12087 Reviewers: goldfire, austin, bgamari Reviewed By: goldfire Subscribers: rwbarton, thomie GHC Trac Issues: #12087 Differential Revision: https://phabricator.haskell.org/D3851
* Fix #13972 by producing tidier errorsRyan Scott2017-08-174-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, one could experience an error message like this: ``` Expected: T (a -> Either a b) Actual: T (a -> Either a b) ``` This makes the error message an iota clearer by tidying it first, which will instead produce: ``` Expected: T (a1 -> Either a1 b1) Actual: T (a -> Either a b) ``` Which steers users towards the understanding that the two sets of tyvars are actually different. Test Plan: make test TEST=T13972 Reviewers: simonpj, austin, bgamari, goldfire Reviewed By: goldfire Subscribers: goldfire, rwbarton, thomie GHC Trac Issues: #13972 Differential Revision: https://phabricator.haskell.org/D3820
* Allow TcDerivInfer to compile with GHC 8.0.1Ben Gamari2017-08-161-21/+21
| | | | | | | | | | | | | | | | | As of ed7a830de6a2ea74dd6bb81f8ec55b9fe0b52f28 this module uses MultiWayIf, the parsing behavior of which changed in 8.0.2 due to #10807. Reformat the code so that it compiles under both 8.0.1 and 8.0.2/8.2.1. Test Plan: Validate bootstrapping with 8.0.1 Reviewers: austin Subscribers: rwbarton, thomie, RyanGlScott GHC Trac Issues: #14130 Differential Revision: https://phabricator.haskell.org/D3863
* Speed up compilation of profiling stubsBen Gamari2017-08-164-15/+68
| | | | | | | | | | | | | | | | | | | | Here we encode the cost centre list as static data. This means that the initialization stubs are small functions which should be easy for GCC to compile, even with optimization. Fixes #7960. Test Plan: Test profiling Reviewers: austin, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #7960 Differential Revision: https://phabricator.haskell.org/D3853
* Bump mtl, parsec, text submodules (again)Ryan Scott2017-08-163-0/+0
| | | | | | We failed to add dist-install and dist-boot to .gitignore in the commits brought in via commit e054c5f06451def4437d9d770ae156f034796c59. This round of submodule commits should do the trick.
* Bump mtl, parsec, text submodulesBen Gamari2017-08-153-0/+0
| | | | | a520adcce27908c799b64214618cf9b33572dc37 updated the upstream repository locations but failed to update the commits themselves.
* Bump nofib submoduleBen Gamari2017-08-141-0/+0
|
* Add Semigroup/Monoid instances to ST monadBen Gamari2017-08-143-0/+12
| | | | | | | | | | | | | | | | Fixes #14107. Signed-off-by: Philipp Middendorf <middendorf@plapadoo.de> Reviewers: austin, hvr, bgamari, RyanGlScott Reviewed By: bgamari Subscribers: RyanGlScott, rwbarton, thomie GHC Trac Issues: #14107 Differential Revision: https://phabricator.haskell.org/D3845
* Bump mtl, parsec, text submodulesRyan Scott2017-08-141-2/+2
| | | | | | | | | | | | | | These three submodules have commits which add certain files to their respective .gitignores which GHC's build system produces. Also update the packages file accordingly. Test Plan: If it builds, ship it Reviewers: hvr, austin, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3842
* Recognize FreeBSD compiler as Clang.Gleb Popov2017-08-141-0/+3
| | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3840
* Use a ReaderT in TcDeriv to avoid some tedious plumbingRyan Scott2017-08-143-586/+693
| | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses point (2) of https://phabricator.haskell.org/D3337#107865. Before, several functions in `TcDeriv` and `TcDerivInfer` which compute an `EarlyDerivSpec` were manually threading through about 10 different arguments, which contribute to quite a lot of clutter whenever they need to be updated. To minimize this plumbing, and to make it clearer which of these 10 values are being used where, I refactored the code in `TcDeriv` and `TcDerivInfer` to use a new `DerivM` type: ```lang=haskell type DerivM = ReaderT DerivEnv TcRn ``` where `DerivEnv` contains the 10 aforementioned values. In addition to cleaning up the code, this should make some subsequent changes planned for later less noisy. Test Plan: ./validate Reviewers: austin, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3846
* Don't drop GHCi-defined functions with -fobject-code enabledRyan Scott2017-08-142-7/+17
| | | | | | | | | | | | | | | | | | | | | The desugarer was using `targetRetainsAllBindings` as a litmus test for determining if a function was defined in interactive mode (and thus should be exported). However, there is a corner case where one can be in interactive mode and have `targetRetainsAllBindings` return `False`: if `-fobject-code` is enabled (since the target will no longer be `HscInteractive`). In such a scenario, we should fall back on a different test for determining if we are in a GHCi session. I chose to use `isInteractiveModule`, which appears to do the trick. Test Plan: make test TEST=T12091 Reviewers: austin, bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #12091 Differential Revision: https://phabricator.haskell.org/D3849
* Properly handle dlerror() message on FreeBSD when linking linker scriptsGleb Popov2017-08-141-1/+1
| | | | | | | | | | | | Test Plan: `GHCi.loadDll "/usr/lib/libc++.so` now works on FreeBSD. Reviewers: austin, bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3841
* Fix #14060 by more conservatively annotating TH-reified typesRyan Scott2017-08-1415-43/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, TH was quite generous in applying kind annotations to reified type constructors whose result kind happened to mention type variables. This could result in agonizingly large reified types, so this patch aims to quell this a bit by adopting a more nuanced algorithm for determining when a tycon application deserves a kind annotation. This implements the algorithm laid out in https://ghc.haskell.org/trac/ghc/ticket/14060#comment:1. I've updated `Note [Kind annotations on TyConApps]` to reflect the new wisdom. Essentially, instead of only checking if the result kind contains free variables, we also check if any of those variables do not appear free in injective positions in the argument kinds—only then do we put on a kind annotation. Bumps `haddock` submodule. Test Plan: make test TEST=T14060 Reviewers: goldfire, austin, bgamari Reviewed By: goldfire Subscribers: rwbarton, thomie GHC Trac Issues: #14060 Differential Revision: https://phabricator.haskell.org/D3807
* Point to FunDeps documentation on Haskell wikiBen Gamari2017-08-141-2/+2
|
* Add test for #14101Ryan Scott2017-08-122-0/+11
| | | | | I forgot to do this in 0bb1e84034a12d7f700b48fca6710c01bd08f397.
* Expand type synonyms during role inferenceRyan Scott2017-08-123-0/+8
| | | | | | | | | | | | | | | | | | | | | Summary: During role inference, we need to expand type synonyms, since oversaturated applications of type synonym tycons would otherwise have overly conservative roles inferred for its arguments. Fixes #14101. Test Plan: ./validate Reviewers: goldfire, austin, bgamari Reviewed By: goldfire Subscribers: rwbarton, thomie GHC Trac Issues: #14101 Differential Revision: https://phabricator.haskell.org/D3838
* Change isClosedAlgType to be TYPE-aware, and rename it to pmIsClosedTypeRyan Scott2017-08-123-138/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In a267580e4ab37115dcc33f3b8a9af67b9364da12, I somewhat awkwardly inserted a special case for `TYPE` in the `EmptyCase` coverage checker. Instead of placing it there, @mpickering noted that `isClosedAlgType` would be a better fit for it. I do just that in this patch. I also renamed `isClosedAlgType` to `pmIsClosedType`, reflecting the fact that `TYPE` technically isn't an algebraic type (it's a primitive one), and that its behavior is pattern-match coverage checking-oriented. I also moved it to `Check`, which is a better home for this function than `Type`. Luckily, the only call sites for `isClosedAlgType` were in the pattern-match coverage checker anyways, so this change is simple enough. Test Plan: ./validate Reviewers: mpickering, austin, goldfire, bgamari Reviewed By: goldfire Subscribers: rwbarton, thomie, mpickering GHC Trac Issues: #14086 Differential Revision: https://phabricator.haskell.org/D3830
* Use NonEmpty lists to represent lists of duplicate elementsRyan Scott2017-08-1213-55/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Three functions in `ListSetOps` which compute duplicate elements represent lists of duplicates of `[a]`. This is a really bad way to go about things, because these lists are guaranteed to always have at least one element (the "representative" of the duplicates), and several places in the GHC API call `head` (a partial function) on these lists of duplicates to retrieve the representative. This changes the representation of duplicates to `NonEmpty` lists instead, which allow for many partial uses of `head` to be made total. Fixes #13823. Test Plan: ./validate Reviewers: bgamari, austin, goldfire Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie GHC Trac Issues: #13823 Differential Revision: https://phabricator.haskell.org/D3823
* Don't suppress unimplemented type family warnings with DeriveAnyClassRyan Scott2017-08-128-23/+82
| | | | | | | | | | | | | | | | | | | | | | | Summary: For some asinine reason, we were suppressing warnings when deriving associated type family instances with `DeriveAnyClass`. That seems like a bad idea. Let's not do that. Along the way, I noticed that the error contexts associated with these newly emitted warnings were less than ideal, so I did some minor refactoring to improve the story there. Fixes #14094 Test Plan: ./validate Reviewers: bgamari, austin Subscribers: rwbarton, thomie GHC Trac Issues: #14094 Differential Revision: https://phabricator.haskell.org/D3828
* Split out inferConstraintsDataConArgs from inferConstraintsRyan Scott2017-08-121-21/+41
| | | | | | | | | | | | | | | | | | | | | | | Summary: Addresses point (1) of https://phabricator.haskell.org/D3337#107865. Before, `inferConstraints` awkwardly combined all of the logic needed to handle stock, newtype, and anyclass deriving. Really, though, the stock/newtype logic is quite different from the anyclass logic, so this splits off `inferConstraintsDataConArgs` (so named because it infers constraints by inspecting the types of the arguments to data constructors) from `inferConstraints` to handle the stock/newtype-specific bits. Aside from making the code somewhat clearer, this allows us to factor out superclass constraint inference, which is done regardless of deriving strategy. Test Plan: If it builds, ship it Reviewers: bgamari, austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3827
* Fix EmptyCase documentationCyd Parser2017-08-071-6/+5
|
* Convert examples to doctests, and add a handful of new onesDavid Luposchainsky2017-08-061-35/+157
|
* Fix string escaping in JSONDmitry Malikov2017-08-061-1/+1
| | | | | It seems to that double quotes is not escaped well at the moment. We'd noticed this with @alexbiehl during the work on https://github.com/haskell/haddock/pull/645
* Add forgotten > in Control.ApplicativeOleg Grenrus2017-08-061-1/+1
| | | As reported by tabaqui on `#hackage`
* Don't warn when empty casing on TypeRyan Scott2017-08-053-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: `Type` (a.k.a. `TYPE LiftedRep`) can be used at the type level thanks to `TypeInType`. However, expressions like ```lang=haskell f :: Type -> Int f x = case x of {} ``` were falsely claiming that the empty case on the value of type `Type` was non-exhaustive. The reason is a bit silly: `TYPE` is technically not an empty datatype in GHC's eyes, since it's a builtin, primitive type. To convince the pattern coverage checker otherwise, this adds a special case for `TYPE`. Test Plan: make test TEST=T14086 Reviewers: gkaracha, austin, bgamari, goldfire Reviewed By: goldfire Subscribers: goldfire, rwbarton, thomie GHC Trac Issues: #14086 Differential Revision: https://phabricator.haskell.org/D3819
* Remove the deprecated Typeable{1..7} type synonymsRyan Scott2017-08-053-19/+3
| | | | | | | | | | | | | | | | | | | Summary: `Typeable{1..7}` (type synonyms for the poly-kinded `Typeable`) have been deprecated since GHC 7.8. They're now causing problems for users who try to still work with them in legacy code, since they can no longer be used in instances. To avoid this sort of confusion, let's just remove `Typeable{1..7}` altogether. Resolves #14047. Reviewers: bgamari, austin, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14047 Differential Revision: https://phabricator.haskell.org/D3817
* Add MonadIO Q - by requiring MonadIO => QuasiOleg Grenrus2017-08-055-7/+18
| | | | | | | | | | | | Summary: This is follow-up to https://ghc.haskell.org/trac/ghc/ticket/10773 Reviewers: austin, goldfire, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3816