summaryrefslogtreecommitdiff
path: root/docs/users_guide/8.2.1-notes.rst
Commit message (Collapse)AuthorAgeFilesLines
* Document the kind generalization behavior observed in #13555Ryan Scott2017-04-231-0/+5
| | | | | | | | | | | | | | | | | | | | The conclusion of #13555 was that a program which began to fail to typecheck (starting in GHC 8.2) was never correct to begin with. Let's document why this is the case with respect to `MonoLocalBinds`' interaction with kind generalization. Also adds the reported program as a `compile_fail` testcase. Test Plan: make test TEST=T13555 # Also, read the docs Reviewers: goldfire, simonpj, austin, bgamari Reviewed By: goldfire, simonpj, bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13555 Differential Revision: https://phabricator.haskell.org/D3472
* Doc typoAlex Biehl2017-04-131-1/+1
|
* Allow associated types to pattern-match in non-class-bound variablesRyan Scott2017-03-141-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After 8136a5cbfcd24647f897a2fae9fcbda0b1624035 (#11450), if you have a class with an associated type: ``` class C a where type T a b ``` And you try to create an instance of `C` like this: ``` instance C Int where type T Int Char = Bool ``` Then it is rejected, since you're trying to instantiate the variable ``b`` with something other than a type variable. But this restriction proves quite onerous in practice, as it prevents you from doing things like this: ``` class C a where type T a (b :: Identity c) :: c instance C Int where type T Int ('Identity x) = x ``` You have to resort to an auxiliary type family in order to define this now, which becomes extremely tiring. This lifts this restriction and fixes #13398, in which it was discovered that adding this restriction broke code in the wild. Test Plan: ./validate Reviewers: simonpj, bgamari, austin Reviewed By: simonpj Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3302
* Observe #13267 in release notesRyan Scott2017-03-111-0/+10
| | | | | | I noticed some code in the wild that broke due to the validity checking introduced in #13267, so we should be proactive and warn about it in the 8.2 release notes.
* Prohibit RULES changing constructorsDavid Feuer2017-03-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, `RULES` like ``` {-# RULES "JustNothing" forall x . Just x = Nothing #-} ``` were allowed. Simon Peyton Jones say this seems to have been a mistake, that such rules have never been supported intentionally, and that he doesn't know if they can break in horrible ways. Furthermore, Ben Gamari and Reid Barton are considering trying to detect the presence of "static data" that the simplifier doesn't need to traverse at all. Such rules do not play well with that. So for now, we ban them altogether. In most cases, it's possible to work around the ban using hand-written wrapper functions. Reviewers: austin, simonpj, bgamari Reviewed By: simonpj, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3169
* Changelog notice for compact.Edward Z. Yang2017-02-221-0/+10
| | | | | | | | | | Test Plan: none Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3165
* Allow type defaulting for multi-param type classes with ExtendedDefaultRulesvivid-synth2017-02-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expressions like the following will now typecheck: ``` data A x = A deriving Show class ToA a x where toA :: a -> A x instance ToA Integer x where toA _ = A main = print (toA 5 :: A Bool) ``` The new defaulting rules are Find all the unsolved constraints. Then: * Find those that have exactly one free type variable, and partition that subset into groups that share a common type variable `a`. * Now default `a` (to one of the types in the default list) if at least one of the classes `Ci` is an interactive class Reviewers: goldfire, bgamari, austin, mpickering, simonpj Reviewed By: bgamari, simonpj Subscribers: mpickering, simonpj, goldfire, thomie Differential Revision: https://phabricator.haskell.org/D2822
* Expand list of always loaded Windows shared libsTamar Christina2017-02-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | When the `GCC` driver envokes the pipeline a `SPEC` is used to determine how to configure the compiler and which libraries to pass along. For Windows/mingw, this specfile is https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/mingw32.h This expands the list of base DLLs with the ones that GCC always links, and adds extra sibling dlls of `stdc++` in case it is linked in. Following D3028 this patch only needs to load the always load only the top level individual shared libs. Test Plan: ./validate Reviewers: RyanGlScott, austin, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: RyanGlScott, thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D3029
* Refactor DeriveAnyClass's instance context inferenceRyan Scott2017-02-101-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, `DeriveAnyClass` has two glaring flaws: * It only works on classes whose argument is of kind `*` or `* -> *` (#9821). * The way it infers constraints makes no sense. It basically co-opts the algorithms used to infer contexts for `Eq` (for `*`-kinded arguments) or `Functor` (for `(* -> *)`-kinded arguments). This tends to produce overly constrained instances, which in extreme cases can lead to legitimate things failing to typecheck (#12594). Or even worse, it can trigger GHC panics (#12144 and #12423). This completely reworks the way `DeriveAnyClass` infers constraints to fix these two issues. It now uses the type signatures of the derived class's methods to infer constraints (and to simplify them). A high-level description of how this works is included in the GHC users' guide, and more technical notes on what is going on can be found as comments (and a Note) in `TcDerivInfer`. Fixes #9821, #12144, #12423, #12594. Test Plan: ./validate Reviewers: dfeuer, goldfire, simonpj, austin, bgamari Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D2961
* Derive <$David Feuer2017-02-071-0/+5
| | | | | | | | | | | | | | | | Using the default definition of `<$` for derived `Functor` instance is very bad for recursive data types. Derive the definition instead. Fixes #13218 Reviewers: austin, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D3072
* Add liftA2 to Applicative classDavid Feuer2017-02-051-0/+6
| | | | | | | | | | | | | | | | * Make `liftA2` a method of `Applicative`. * Add explicit `liftA2` definitions to instances in `base`. * Add explicit invocations in `base`. Reviewers: ekmett, bgamari, RyanGlScott, austin, hvr Reviewed By: RyanGlScott Subscribers: ekmett, RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3031
* Add support for StaticPointers in GHCiBen Gamari2017-02-021-0/+3
| | | | | | | | | | | | | | | | | | | | | Here we add support to GHCi for StaticPointers. This process begins by adding remote GHCi messages for adding entries to the static pointer table. We then collect binders needing SPT entries after linking and send the interpreter a message adding entries with the appropriate fingerprints. Test Plan: `make test TEST=StaticPtr` Reviewers: facundominguez, mboes, simonpj, simonmar, goldfire, austin, hvr, erikd Reviewed By: simonpj, simonmar Subscribers: RyanGlScott, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2504 GHC Trac Issues: #12356
* Introduce GHC.TypeNats module, change KnownNat evidence to be NaturalOleg Grenrus2017-02-011-0/+4
| | | | | | | | | | | | Reviewers: dfeuer, austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3024 GHC Trac Issues: #13181
* Abstract over the way eventlogs are flushedalexbiehl2017-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | Currently eventlog data is always written to a file `progname.eventlog`. This patch introduces the `flushEventLog` field in `RtsConfig` which allows to customize the writing of eventlog data. One possible scenario is the ongoing live-profile-monitor effort by @NCrashed which slurps all eventlog data through `fluchEventLog`. `flushEventLog` takes a buffer with eventlog data and its size and returns `false` (0) in case eventlog data could not be procesed. Reviewers: simonmar, austin, erikd, bgamari Reviewed By: simonmar, bgamari Subscribers: qnikst, thomie, NCrashed Differential Revision: https://phabricator.haskell.org/D2934
* Use top-level instances to solve superclasses where possibleDaniel Haraj2017-01-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new flag `-fsolve-constant-dicts` which makes the constraint solver solve super class constraints with available dictionaries if possible. The flag is enabled by `-O1`. The motivation of this patch is that the compiler can produce more efficient code if the constraint solver used top-level instance declarations to solve constraints that are currently solved givens and their superclasses. In particular, as it currently stands, the compiler imposes a performance penalty on the common use-case where superclasses are bundled together for user convenience. The performance penalty applies to constraint synonyms as well. This example illustrates the issue: ``` {-# LANGUAGE ConstraintKinds, MultiParamTypeClasses, FlexibleContexts #-} module B where class M a b where m :: a -> b type C a b = (Num a, M a b) f :: C Int b => b -> Int -> Int f _ x = x + 1 ``` Output without the patch, notice that we get the instance for `Num Int` by using the class selector `p1`. ``` f :: forall b_arz. C Int b_arz => b_arz -> Int -> Int f = \ (@ b_a1EB) ($d(%,%)_a1EC :: C Int b_a1EB) _ (eta1_B1 :: Int) -> + @ Int (GHC.Classes.$p1(%,%) @ (Num Int) @ (M Int b_a1EB) $d(%,%)_a1EC) eta1_B1 B.f1 ``` Output with the patch, nicely optimised code! ``` f :: forall b. C Int b => b -> Int -> Int f = \ (@ b) _ _ (x_azg :: Int) -> case x_azg of { GHC.Types.I# x1_a1DP -> GHC.Types.I# (GHC.Prim.+# x1_a1DP 1#) } ``` Reviewers: simonpj, bgamari, austin Reviewed By: simonpj Subscribers: mpickering, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D2714 GHC Trac Issues: #12791, #5835
* Fixes bug #11046Iavor S. Diatchki2017-01-301-0/+3
| | | | | | | | | | | | | | | | For some time now, type-level operators such as '+' have been treated as type constructors, rahter than type variables. This pathc fixes TH's `lookupName` function to account for this behavior. Reviewers: bgamari, austin, goldfire, RyanGlScott Reviewed By: RyanGlScott Subscribers: Phyx, thomie Differential Revision: https://phabricator.haskell.org/D3025 GHC Trac Issues: #11046
* Add a flag to emit error messages as JSONMatthew Pickering2017-01-301-0/+4
| | | | | | | | | | | | | | | | | | | | | This patch adds the flag `-ddump-json` which dumps all the compiler output as a JSON array. This allows tooling to more easily parse GHC's output to display to users. The flag is currently experimental and will hopefully be refined for the next release. In particular I have avoided any changes which involve significant refactoring and provided what is easy given the current infrastructure. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: DanielG, gracjan, thomie Differential Revision: https://phabricator.haskell.org/D3010 GHC Trac Issues: #13190
* Check that a default type signature aligns with the non-default signatureRyan Scott2017-01-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, GHC was extremely permissive about the form a default type signature could take on in a class declaration. Notably, it would accept garbage like this: class Monad m => MonadSupply m where fresh :: m Integer default fresh :: MonadTrans t => t m Integer fresh = lift fresh And then give an extremely confusing error message when you actually tried to declare an empty instance of MonadSupply. We now do extra validity checking of default type signatures to ensure that they align with their non-default type signature counterparts. That is, a default type signature is allowed to differ from the non-default one only in its context - they must otherwise be alpha-equivalent. Fixes #12918. Test Plan: ./validate Reviewers: goldfire, simonpj, austin, bgamari Reviewed By: bgamari Subscribers: mpickering, dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D2983 GHC Trac Issues: #12918
* Don't quantify implicit type variables when quoting type signatures in THRyan Scott2017-01-231-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A bug was introduced in GHC 8.0 in which Template Haskell-quoted type signatures would quantify _all_ their type variables, even the implicit ones. This would cause splices like this: ``` $([d| idProxy :: forall proxy (a :: k). proxy a -> proxy a idProxy x = x |]) ``` To splice back in something that was slightly different: ``` idProxy :: forall k proxy (a :: k). proxy a -> proxy a idProxy x = x ``` Notice that the kind variable `k` is now explicitly quantified! What's worse, this now requires the `TypeInType` extension to be enabled. This changes the behavior of Template Haskell quoting to never explicitly quantify type variables which are implicitly quantified in the source. There are some other places where this behavior pops up too, including class methods, type ascriptions, `SPECIALIZE` pragmas, foreign imports, and pattern synonynms (#13018), so I fixed those too. Fixes #13018 and #13123. Test Plan: ./validate Reviewers: simonpj, goldfire, austin, bgamari Reviewed By: simonpj, goldfire Subscribers: simonpj, mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2974 GHC Trac Issues: #13018, #13123
* Add 'type family (m :: Symbol) <> (n :: Symbol)'Oleg Grenrus2017-01-201-0/+3
| | | | | | | | | | | Reviewers: dfeuer, austin, bgamari, hvr Subscribers: dfeuer, mpickering, RyanGlScott, ekmett, yav, lelf, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2632 GHC Trac Issues: #12162
* Some 8.2.1 release notes for my stuffSimon Marlow2017-01-171-2/+21
| | | | | | | | | | | | Test Plan: Built it and looked at it Reviewers: niteria, erikd, dfeuer, austin, hvr, bgamari Reviewed By: bgamari Subscribers: dfeuer, thomie, erikd Differential Revision: https://phabricator.haskell.org/D2959
* Throw an exception on heap overflowDemi Obenour2017-01-101-0/+7
| | | | | | | | | | | | | | | | | This changes heap overflow to throw a HeapOverflow exception instead of killing the process. Test Plan: GHC CI Reviewers: simonmar, austin, hvr, erikd, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2790 GHC Trac Issues: #1791
* Warn about missing instance methods that start with an underscoreRyan Scott2016-12-151-0/+12
| | | | | | | | | | | | | | | | | | | Previously, GHC would not warn whenever there was a class instance that didn't implement a class method whose name begins with an underscore. Fixes #12959. Test Plan: make test TEST=WarnMinimal Reviewers: austin, bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2849 GHC Trac Issues: #12959
* Fix typo in users' guideRyan Scott2016-12-141-1/+1
| | | | [ci skip]
* Disambiguate reified closed type family kinds in THRyan Scott2016-12-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: A continuation of #8953. This fixes an oversight in which the left-hand sides of closed type families, when reified in Template Haskell, would not be given kind annotations, even when they are necessary for disambiguation purposes in the presence of `PolyKinds`. Fixes #8953 and #12646. Test Plan: ./validate Reviewers: hvr, bgamari, austin, goldfire Reviewed By: goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2795 GHC Trac Issues: #8953, #12646
* 8.2.1-notes.rst: tweak binutils versionSergei Trofimovich2016-12-021-2/+2
| | | | | | It's 2.27 (-2), not 1.27.2. Dropped stray '\r'. Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* Update Mingw-w64 bindist for WindowsTamar Christina2016-11-291-0/+3
| | | | | | | | | | | | | | | | | This updates the binary dists for windows to GCC 6.2.0 and binutils 2.27.2 which has fixes required for LLVM. Test Plan: ./validate Reviewers: simonmar, erikd, austin, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2749 GHC Trac Issues: #12871, #8974
* Make quoting and reification return the same typesDominik Bollmann2016-11-251-0/+2
| | | | | | | | | | | | | | | | | | Previously TH was incorrectly returning a `Dec` using a `ConT` instead of `PromotedT`. Test Plan: validate Reviewers: mainland, jstolarek, osa1, goldfire, thomie, bollmann, bgamari, RyanGlScott, austin Reviewed By: RyanGlScott Subscribers: erikd Differential Revision: https://phabricator.haskell.org/D2188 GHC Trac Issues: #11629
* Test for type synonym loops on TyCon.Edward Z. Yang2016-11-161-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, we tested for type synonym loops by doing a syntactic test on the literal type synonym declarations. However, in some cases, loops could go through hs-boot files, leading to an infinite loop (#12042); a similar situation can occur when signature merging. This commit replaces the syntactic test with a test on TyCon, simply by walking down all type synonyms until we bottom out, or find we've looped back. It's a lot simpler. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D2656 GHC Trac Issues: #12042
* Prevent GND from inferring an instance context for method-less classesRyan Scott2016-11-101-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `GeneralizedNewtypeDeriving` is used with a type class that has no methods, it will generate a redundant context, and as a result, it can trigger warnings when compiled with `-Wredundant-constraints`. This is a simple change in behavior to check beforehand if a class has methods when deriving it with GND, and if it has no methods, avoid inferring the redundant context. Beware that the test for #6088, which used to be expected to fail, now compiles without issue since it doesn't infer a problematic instance context. Thanks to Simon Peyton Jones for doing the necessary refactoring in f05d685ae05ec293083f2fa7ec7ba057fbe64869. Fixes #12814. Test Plan: ./validate Reviewers: goldfire, rwbarton, simonpj, austin, bgamari Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2692 GHC Trac Issues: #12814
* Allow GeneralizedNewtypeDeriving for classes with associated type familiesRyan Scott2016-11-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: This implements the ability to derive associated type family instances for newtypes automatically using `GeneralizedNewtypeDeriving`. Refer to the users' guide additions for how this works; I essentially follow the pattern laid out in https://ghc.haskell.org/trac/ghc/ticket/8165#comment:18. Fixes #2721 and #8165. Test Plan: ./validate Reviewers: simonpj, goldfire, austin, bgamari Reviewed By: simonpj Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2636 GHC Trac Issues: #2721, #8165
* Update release notes for type sigs in TH patterns patchMatthew Pickering2016-11-051-0/+2
| | | | [skip ci]
* Add -Wcpp-undef warning flagErik de Castro Lopo2016-10-221-0/+4
| | | | | | | | | | | | | | | | | | | | When enabled, this new warning flag passes `-Wundef` to the C pre-processor which causes the pre-processor to warn on uses of the `#if` directive on undefined identifiers. It is not currently enabled in any of the standard warning groups. Test Plan: Make sure the two tests pass on all major platforms. Reviewers: hvr, carter, Phyx, bgamari, austin Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2626 GHC Trac Issues: #12752
* Make error when deriving an instance for a typeclass less misleadingRyan Scott2016-10-141-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, when you attempted to derive an instance for a typeclass, e.g., ``` class C1 (a :: Constraint) where class C2 where deriving instance C1 C2 ``` GHC would complain that `C2`'s data constructors aren't in scope. But that makes no sense, since typeclasses don't have constructors! By refining the checks that GHC performs when deriving, we can make the error message a little more sensible. This also cleans up a related `DeriveAnyClass` infelicity. Before, you wouldn't have been able to compile code like this: ``` import System.IO (Handle) class C a deriving instance C Handle ``` Since GHC was requiring that all data constructors of `Handle` be in scope. But `DeriveAnyClass` doesn't even generate code that mentions any data constructors, so this requirement is silly! Fixes #11509. Test Plan: make test TEST=T11509 Reviewers: simonpj, austin, bgamari Reviewed By: simonpj, bgamari Subscribers: thomie, simonpj Differential Revision: https://phabricator.haskell.org/D2558 GHC Trac Issues: #11509
* Add NUMA support for WindowsTamar Christina2016-10-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: NOTE: I have been able to do simple testing on emulated NUMA nodes. Real hardware would be needed for a proper test. D2199 Added NUMA support for Linux, I have just filled in the missing pieces following the description of the Linux APIs. Test Plan: Use `bcdedit.exe /set groupsize 2` to modify the kernel again (Similar to D2533). This generates some NUMA nodes: ``` Logical Processor to NUMA Node Map: NUMA Node 0: ** -- NUMA Node 1: -- ** Approximate Cross-NUMA Node Access Cost (relative to fastest): 00 01 00: 1.1 1.1 01: 1.0 1.0 ``` run ` ../test-numa.exe +RTS --numa -RTS` and check PerfMon for NUMA allocations. Reviewers: simonmar, erikd, bgamari, austin Reviewed By: simonmar Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2534 GHC Trac Issues: #12602
* Support more than 64 logical processors on WindowsTamar Christina2016-10-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows support for more than 64 logical processors are implemented using processor groups. Essentially what it's doing is keeping the existing maximum of 64 processors and keeping the affinity mask a 64 bit value, but adds an hierarchy above that. This support was added to Windows 7 and so we need to at runtime detect if the APIs are still there due to our minimum supported version being Windows Vista. The Maximum number of groups supported at this time is 4, so 256 logical cores. The group indices are 0 based. One thread can have affinity with multiple groups. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684251.aspx and particularly helpful is the whitepaper: 'Supporting Systems that have more than 64 processors' at https://msdn.microsoft.com/en-us/library/windows/hardware/dn653313.aspx Processor groups are not guaranteed to be uniformly distributed nor guaranteed to be filled before a next group is needed. The OS will assign processors to groups based on physical proximity and will never partially assign cores from one physical cpu to more than one group. If one has two 48 core CPUs then you'd end up with two groups of 48 logical cpus. Now add a 3rd CPU with 10 cores and the group it is assigned to depends where the socket is on the board. Test Plan: ./validate or make test -c . in the rts test folder. This tests for regressions, to test this particular functionality itself: <program> +RTS -N -qa -RTS Test is detailed in description. Reviewers: bgamari, simonmar, austin, erikd Reviewed By: simonmar Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2533 GHC Trac Issues: #11054
* Implement deriving strategiesRyan Scott2016-09-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allows users to explicitly request which approach to `deriving` to use via keywords, e.g., ``` newtype Foo = Foo Bar deriving Eq deriving stock Ord deriving newtype Show ``` Fixes #10598. Updates haddock submodule. Test Plan: ./validate Reviewers: hvr, kosmikus, goldfire, alanz, bgamari, simonpj, austin, erikd, simonmar Reviewed By: alanz, bgamari, simonpj Subscribers: thomie, mpickering, oerjan Differential Revision: https://phabricator.haskell.org/D2280 GHC Trac Issues: #10598
* users_guide: Move initGhcMonad note to 8.0.2 relnotesBen Gamari2016-09-011-5/+1
|
* users_guide: Move -fdefer-out-of-scope-variables note to 8.0.2 relnotesBen Gamari2016-09-011-3/+0
| | | | It will be included in 8.0.2
* users_guide: Move addModFinalizer mention to 8.0.2 release notesBen Gamari2016-09-011-8/+0
|
* Add -fdefer-out-of-scope-variables flag (#12170).Eugene Akentyev2016-08-311-0/+3
| | | | | | | | | | | | Reviewers: simonpj, thomie, austin, bgamari Reviewed By: simonpj, thomie, bgamari Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2458 GHC Trac Issues: #12170
* Add -flocal-ghci-history flag (#9089).Eugene Akentyev2016-08-311-0/+2
| | | | | | | | | | | | Reviewers: thomie, bgamari, austin Reviewed By: thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2461 GHC Trac Issues: #9089
* Add Read1/Read2 methods defined in terms of ReadPrecRyan Scott2016-08-311-0/+6
| | | | | | | | | | | | | | | | | This adds new methods `liftReadList(2)` and `liftReadListPrec(2)` to the `Read1`/`Read2` classes which are defined in terms of `ReadPrec` instead of `ReadS`. This also adds related combinators and changes existing `Read1` and `Read2` instances to be defined in terms of the new methods. Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2379 GHC Trac Issues: #12358
* GHC: Expose installSignalHandlers, withCleanupSessionBen Gamari2016-08-311-1/+4
| | | | | | | | | | | | | | Test Plan: Validate Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2492 GHC Trac Issues: #12398
* Template Haskell support for TypeApplicationsRyan Scott2016-08-291-0/+2
| | | | | | | | | | | | | | | | Summary: Fixes #12530. Test Plan: make test TEST=12530 Reviewers: austin, bgamari, hvr, goldfire Reviewed By: goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2472 GHC Trac Issues: #12530
* Template Haskell support for unboxed sumsRyan Scott2016-08-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | This adds new constructors `UnboxedSumE`, `UnboxedSumT`, and `UnboxedSumP` to represent unboxed sums in Template Haskell. One thing you can't currently do is, e.g., `reify ''(#||#)`, since I don't believe unboxed sum type/data constructors can be written in prefix form. I will look at fixing that as part of #12514. Fixes #12478. Test Plan: make test TEST=T12478_{1,2,3} Reviewers: osa1, goldfire, austin, bgamari Reviewed By: goldfire, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2448 GHC Trac Issues: #12478
* Move #12403, #12513 users guide notes to 8.2.1 release notesRyan Scott2016-08-221-0/+8
| | | | | | | | The changes in #12403 and #12513 subtly changed the behavior of Template Haskell reification and splicing. While the old behavior was certainly buggy, it's possible that there's code in the wild that depended on the old behavior to work. To err on the side of caution, I'll postpone these changes to GHC 8.2.1 instead of having them merged into GHC 8.0.2.
* Support for noinline magic function.Edward Z. Yang2016-08-211-0/+3
| | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2209
* Add gcoerceWith to Data.Type.CoercionRyan Scott2016-08-181-0/+3
| | | | | | | | | | | | | | | | | Summary: For symmetry with `gcastWith` in `Data.Type.Equality`. Fixes #12493. Test Plan: It compiles Reviewers: bgamari, goldfire, hvr, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2456 GHC Trac Issues: #12493
* Data.Either: Add fromLeft and fromRight (#12402)Dylan Meysmans2016-07-201-0/+2
| | | | | | | | | | | | Reviewers: austin, hvr, RyanGlScott, bgamari Reviewed By: RyanGlScott, bgamari Subscribers: RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D2403 GHC Trac Issues: #12402