summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
...
* Lower precedence for {-# UNPACK #-}Vladislav Zavialov2018-11-011-0/+9
| | | | | | | | | | Test Plan: Validate Reviewers: goldfire, bgamari Subscribers: osa1, mpickering, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5221
* Revert "Add a RTS option -xp to load PIC object anywhere in address space"Ben Gamari2018-10-302-30/+2
| | | | This reverts commit 5403a8636fe82f971234873564f3a05393b89b7a.
* Improve documentation for warning optionsNathan Collins2018-10-291-4/+11
| | | | | | | | | | | | | My main goal was to make it easy to discover how to reverse `-Werror`, since `Wno-error` doesn't work, and the fact that `-Wwarn` negates `-Werror` was only mentioned in the `-Wwarn` docs before. Other changes: - explain at the outset that some options control individual warnings while others control warning families. - explain at the outset that `-Wno-<wflag>` can be used to reverse `-W<wflag>`. This is no mentioned in two places, but I don't think that's a bad thing.
* Fix sample code of -fprint-explicit-kinds, plus sample when disabling PolyKindsYuji Yamamoto2018-10-291-7/+10
| | | | | | | | | | - Although the sample is for `-fprint-explicit-kinds`, the sample code uses `-fprint-explicit-foralls` (but perhaps the output used to be correct one of `-fprint-explicit-kinds`). - Update the output with the recent version of GHC (ver. 8.4.3. I guess it doesn't change in GHC 8.6...) - Add more samples to clarify the difference of kinds, which tells effect of `-fprint-explicit-kinds` more clearly.
* users guide: Introduce :pragma: directiveBen Gamari2018-10-292-75/+158
|
* users guide: Mention :since: in editing-guideBen Gamari2018-10-291-0/+2
|
* Finish fix for #14880.Tobias Dammers2018-10-282-82/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The real change that fixes the ticket is described in Note [Naughty quantification candidates] in TcMType. Fixing this required reworking candidateQTyVarsOfType, the function that extracts free variables as candidates for quantification. One consequence is that we now must be more careful when quantifying: any skolems around must be quantified manually, and quantifyTyVars will now only quantify over metavariables. This makes good sense, as skolems are generally user-written and are listed in the AST. As a bonus, we now have more control over the ordering of such skolems. Along the way, this commit fixes #15711 and refines the fix to #14552 (by accepted a program that was previously rejected, as we can now accept that program by zapping variables to Any). This commit also does a fair amount of rejiggering kind inference of datatypes. Notably, we now can skip the generalization step in kcTyClGroup for types with CUSKs, because we get the kind right the first time. This commit also thus fixes #15743 and #15592, which both concern datatype kind generalisation. (#15591 is also very relevant.) For this aspect of the commit, see Note [Required, Specified, and Inferred in types] in TcTyClsDecls. Test cases: dependent/should_fail/T14880{,-2}, dependent/should_fail/T15743[cd] dependent/should_compile/T15743{,e} ghci/scripts/T15743b polykinds/T15592 dependent/should_fail/T15591[bc] ghci/scripts/T15591
* More explicit foralls (GHC Proposal 0007)Matthew Yacavone2018-10-272-10/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the user to explicitly bind type/kind variables in type and data family instances (including associated instances), closed type family equations, and RULES pragmas. Follows the specification of GHC Proposal 0007, also fixes #2600. Advised by Richard Eisenberg. This modifies the Template Haskell AST -- old code may break! Other Changes: - convert HsRule to a record - make rnHsSigWcType more general - add repMaybe to DsMeta Includes submodule update for Haddock. Test Plan: validate Reviewers: goldfire, bgamari, alanz Subscribers: simonpj, RyanGlScott, goldfire, rwbarton, thomie, mpickering, carter GHC Trac Issues: #2600, #14268 Differential Revision: https://phabricator.haskell.org/D4894
* Update core-spec for Coercion QuantificationNingning Xie2018-10-253-2/+12
| | | | | | | | | | | | | | | | | | Summary: Update details for `ForAllTy` and `ForAllCo` in core-spec, as they can now quantify over coercion variables. Test Plan: Please read core-spec.pdf Reviewers: goldfire, simonpj, bgamari Reviewed By: goldfire Subscribers: rwbarton, carter GHC Trac Issues: #15497, #15589 Differential Revision: https://phabricator.haskell.org/D5247
* Improve documentation about overlapping instancesSimon Peyton Jones2018-10-251-14/+36
| | | | An attempt to help with Trac #15800
* Add a RTS option -xp to load PIC object anywhere in address spaceZejun Wu2018-10-152-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a RTS option -xp to load PIC object anywhere in address space. We do this by relaxing the requirement of <0x80000000 result of `mmapForLinker` and implying USE_CONTIGUOUS_MMAP. We also need to change calls to `ocInit` and `ocGetNames` to avoid dangling pointers when the address of `oc->image` is changed by `ocAllocateSymbolExtra`. Test Plan: ``` $ uname -a Linux localhost 4.18.8-arch1-1-ARCH #1 SMP PREEMPT Sat Sep 15 20:34:48 UTC 2018 x86_64 GNU/Linux $ cat mk/build.mk DYNAMIC_GHC_PROGRAMS = NO DYNAMIC_BY_DEFAULT = NO GhcRTSWays += thr_debug EXTRA_HC_OPTS += -debug WAY_p_HC_OPTS += -fPIC -fexternal-dynamic-refs $ inplace/bin/ghc-stage2 --interactive -prof +RTS -xp GHCi, version 8.7.20180928: http://www.haskell.org/ghc/ :? for help ghc-stage2: R_X86_64_32 relocation out of range: ghczmprim_GHCziTypes_ZMZN_closure = 7f690bffab59 Recompile /data/users/watashi/ghc/libraries/ghc-prim/dist-install/build/HSghc-prim -0.5.3.o with -fPIC -fexternal-dynamic-refs. ghc-stage2: unable to load package `ghc-prim-0.5.3' $ strace -f -e open,mmap inplace/bin/ghc-stage2 --interactive -prof -fexternal-interpreter -opti+RTS -opti-xp ... [pid 1355283] open("/data/users/watashi/ghc/libraries/base/dist-install/build/libHSbas e-4.12.0.0_p.a", O_RDONLY) = 14 [pid 1355283] mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6a84842000 [pid 1355283] open("/data/users/watashi/ghc/libraries/base/dist-install/build/libHSbas e-4.12.0.0_p.a", O_RDONLY) = 14 [pid 1355283] mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6a84676000 ... Prelude> System.Posix.Process.getProcessID ... [pid 1355283] open("/data/users/watashi/ghc/libraries/unix/dist-install/build/libHSuni x-2.7.2.2_p.a", O_RDONLY) = 14 [pid 1355283] mmap(NULL, 45056, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6a67d60000 [pid 1355283] open("/data/users/watashi/ghc/libraries/unix/dist-install/build/libHSuni x-2.7.2.2_p.a", O_RDONLY) = 14 [pid 1355283] mmap(NULL, 57344, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6a67d52000 ... ``` ``` $ uname -a Darwin watashis-iMac.local 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64 $ mv /Users/watashi/gao/ghc/libraries/integer-gmp/dist-install/build/HSintege r-gmp-1.0.2.0.o{,._DISABLE_GHC_ISSUE_15105} $ inplace/bin/ghc-stage2 --interactive +RTS -xp GHCi, version 8.7.20181003: http://www.haskell.org/ghc/ :? for help Prelude> System.Posix.Process.getProcessID 42791 Prelude> Data.Set.fromList [1 .. 10] fromList [1,2,3,4,5,6,7,8,9,10] Prelude> Leaving GHCi. $ inplace/bin/ghc-stage2 --interactive -prof -fexternal-interpreter GHCi, version 8.7.20181003: http://www.haskell.org/ghc/ :? for help Prelude> System.Posix.Process.getProcessID 42806 Prelude> Data.Set.fromList [1 .. 10] fromList [1,2,3,4,5,6,7,8,9,10] Prelude> Leaving GHCi. ``` Also test with something that used to hit the 2Gb limit and it loads and runs without problem. Reviewers: simonmar, bgamari, angerman, Phyx, hvr, erikd Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5195
* Surprising error message with bang patternSasa Bogicevic2018-10-151-0/+7
| | | | | | | | | | | | Reviewers: bgamari, alanz Reviewed By: bgamari Subscribers: sgraf, mpickering, rwbarton, thomie, carter GHC Trac Issues: #13600 Differential Revision: https://phabricator.haskell.org/D5040
* Deprecate -fllvm-pass-vectors-in-regsBen Gamari2018-10-151-0/+3
| | | | | | | | | | | | Summary: The behavior previously enabled by this flag is as been the default since 8.6.1. Reviewers: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5193
* Correct typo "Deppendency" -> DependencyNathan van Doorn2018-10-152-2/+2
| | | | PR: https://github.com/ghc/ghc/pull/203/
* Include -fwarn-star-is-type in -WcompatVladislav Zavialov2018-10-122-0/+6
| | | | | | | | | | | | | | | | | According to the deprecation schedule in the accepted proposal, the first step is to include `-fwarn-star-is-type` in `-Wcompat`. Test Plan: Validate Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15476 Differential Revision: https://phabricator.haskell.org/D5044
* Stable name type roleDavid Feuer2018-10-041-0/+8
| | | | | | | | | | | | | | | | | Make the `StableName#` parameter phantom: There is actually never any reason to care about the type of the underlying object of a `StableName#`. The underlying object type shouldn't really even *be* a parameter. But at least we can mark it as phantom. Reviewers: hvr, bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: ekmett, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5117
* Add -Wstar-is-type to the User's GuideVladislav Zavialov2018-10-041-0/+19
| | | | | | | | | | | | | | | The -Wstar-is-type flag was added without documentation. Now it has documentation. Test Plan: Validate Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5203
* Set `infixr -1 ->`Alec Theriault2018-10-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This simply makes explicit what is already the case. Due to special treatment in the parser, `->` has the lowest fixity. This patch propagates that information to: * GHCi, where `:info ->` now return the right fixity * TH, where `reifyFixity` returns the right fixity * the generated sources for `GHC.Prim` See #15235. Test Plan: make test Reviewers: bgamari, alanz, RyanGlScott Reviewed By: RyanGlScott Subscribers: int-index, RyanGlScott, rwbarton, mpickering, carter GHC Trac Issues: #15235 Differential Revision: https://phabricator.haskell.org/D5199
* Allow (unparenthesized) kind signaturesAlec Theriault2018-10-041-0/+4
| | | | | | | | | | | | | | | | Summary: This allows for things like `[t :: MyKind]`, `(a :: k, b)`, and so on. Test Plan: make TEST=T11622 && make TEST=T8708 Reviewers: RyanGlScott, bgamari, simonpj, goldfire, alanz Reviewed By: RyanGlScott, simonpj Subscribers: alanz, simonpj, rwbarton, mpickering, carter GHC Trac Issues: #11622, #8708 Differential Revision: https://phabricator.haskell.org/D5173
* Parse the (!) type operator and allow type operators in existential contextVladislav Zavialov2018-10-041-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Improve the way `(!)`, `(~)`, and other type operators are handled in the parser, fixing two issues at once: 1. `(!)` can now be used as a type operator that respects fixity and precedence (#15457) 2. Existential context of a data constructor no longer needs parentheses (#15675) In addition to that, with this patch it is now trivial to adjust precedence of the `{-# UNPACK #-}` pragma, as suggested in https://ghc.haskell.org/trac/ghc/ticket/14761#comment:7 There was a small change to API Annotations. Before this patch, `(~)` was a strange special case that produced an annotation unlike any other type operator. After this patch, when `(~)` or `(!)` are used to specify strictness they produce AnnTilde and AnnBang annotations respectively, and when they are used as type operators, they produce no annotations. Test Plan: Validate Reviewers: simonpj, bgamari, alanz, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, rwbarton, mpickering, carter GHC Trac Issues: #15457, #15675 Differential Revision: https://phabricator.haskell.org/D5180
* resolve T13704chessai2018-10-021-0/+28
| | | | | | | | | | | | | | | | | Summary: allow -main-is to change export list for default module header, allowing one to change the entry point to one's program. Test Plan: ./validate Reviewers: bgamari, nomeata, mpickering Reviewed By: mpickering Subscribers: mpickering, rwbarton, carter GHC Trac Issues: #13704 Differential Revision: https://phabricator.haskell.org/D5189
* Quantify class variables first in associated families' kindsRyan Scott2018-10-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, `kcLHsQTyVars` would always quantify class-bound variables invisibly in the kinds of associated types, resulting in #15591. We counteract this by explicitly passing the class-bound variables to `kcLHsQTyVars` and quantifying over the ones that are mentioned in the associated type such that (1) they are specified, and (2) they come before other kind variables. See `Note [Kind variable ordering for associated types]`. Test Plan: make test TEST=T15591 Reviewers: goldfire, simonpj, bgamari Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15591 Differential Revision: https://phabricator.haskell.org/D5159
* Add -fkeep-cafsSimon Marlow2018-09-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Summary: I noticed while playing around with https://github.com/fbsamples/ghc-hotswap/ that the main binary needs to have a custom main function to set `config.keep_cafs = true` when initialising the runtime. This is pretty annoying, it means an extra C file with some cryptic incantations in it, and a `-no-hs-main` flag. So I've replaced this with a link-time flag to GHC, `-fkeep-cafs` that does the same thing. Test Plan: New unit test that tests for the RTS's GC'd CAFs assertion, and also the -keep-cafs flag. Reviewers: bgamari, osa1, erikd, noamz Reviewed By: osa1 Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5183
* users' guide: document -freverse-errorsquasicomputational2018-09-271-0/+10
|
* user-guide: Allow build with sphinx < 1.8Ben Gamari2018-09-201-2/+7
| | | | | Apparently the override argument to add_directive_to_domain was added in sphinx 1.8.
* users_guide: fix sphinx error caused by non-explicit overrideZejun Wu2018-09-201-12/+5
| | | | | | | | | | | | | | | | | | | | | Encouter following error when `make`: ``` Extension error: The 'ghc-flag' directive is already registered to domain std ``` as we register `ghc-flag` to `std` in `add_object_type` first and then overtride it in `add_directive_to_domain`. Test Plan: make -C utils/haddock/doc html SPHINX_BUILD=/usr/bin/sphinx-build Reviewers: austin, bgamari, patrickdoc Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5161
* users-guide: Fix build with sphinx 1.8Ben Gamari2018-09-201-2/+10
| | | | | | It seems that both add_object_type and add_directive_to_domain both register a directive. Previously sphinx didn't seem to mind this but as of Sphinx 1.8 it crashes with an exception.
* users guide: Fix a few issuesFrank Steffahn2018-09-202-6/+9
|
* docs: fix example codejohn2018-09-191-2/+2
| | | | PR: https://github.com/ghc/ghc/pull/197/
* Users guide: EmptyDataDecls on by defaultChris Martin2018-09-181-2/+10
|
* Updated PE linker, section alignment and cleanup.Tamar Christina2018-09-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is to address a couple of short comings of the PE linker. The first thing it does is properly honor section alignments, so SSE code will work reliably. While doing this I've also changed how it reads and stores ObjectFile information. Previously the entire object file was read in and treated as one blob, including headers, symbol tables etc. Now the ObjectFile is read in but stored in chunks, tables go into a temporary info struct and code/data into a new private heap. This allows me to free all meta data once we're done relocating. Which means we can reclaim this memory. As I've mentioned above I've also moved from using VirtualAlloc to HeapAlloc. The reason is VirtualAlloc is meant to be used for more low level memory allocation, it's very fast because it can only allocate whole blocks, (64k) by default, and the memory must be paged (4k) aligned. So when you ask for e.g. 30k of memory, you're given a whole block where 34k will be wasted memory. Nothing else can ever access that untill you free the 30k. One downside of HeapAlloc is that you're not in control of how the heap grows, and heap memory is always committed. So it's harder to tell how much we're actually using now. Another big upside of splitting off the ObjectCode tables to info structs is that I can adjust them, so that later addressings can just use array subscripts to index into them. This simplifies the code a lot and a lot of complicated casts and indexing can be removed. Leaving less and more simple code. This patch doesn't fix the memprotection but it doesn't regress it either. It does however make the next changes smaller and fixes the alignments. Test Plan: ./validate , new test T13617 Reviewers: bgamari, erikd, simonmar, hvr, angerman Reviewed By: angerman Subscribers: nickkuk, carter, RyanGlScott, rwbarton, thomie GHC Trac Issues: #13617 Differential Revision: https://phabricator.haskell.org/D3915
* users-guide: Fix code-block layout for QuantifiedConstraintsTakenobu Tani2018-09-171-4/+4
| | | | | | | | | | | | | | | | | Summary: Fix code-block layout for QuantifiedConstraints. [ci skip] Test Plan: build Reviewers: bgamari, monoidal Reviewed By: monoidal Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5121
* Add support for ImplicitParams and RecursiveDo in THMichael Sloan2018-09-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds TH support for the ImplicitParams and RecursiveDo extensions. I'm submitting this as one review because I cannot cleanly make the two commits independent. Initially, my goal was just to add ImplicitParams support, and I found that reasonably straightforward, so figured I might as well use my newfound knowledge to address some other TH omissions. Test Plan: Validate Reviewers: goldfire, austin, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: carter, RyanGlScott, thomie GHC Trac Issues: #1262 Differential Revision: https://phabricator.haskell.org/D1979
* Typo in user guide wrongly claims DeriveLift was added in 7.2Merijn Verstraaten2018-09-131-1/+1
|
* users-guide: Disable syntax highlightingTakenobu Tani2018-09-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I disabled syntax highlighting for NumericUnderscores extension. Because pygments does not yet correspond to syntax rule for NumericUnderscores. (Sphinx uses pygments as the syntax highlighting.) I've sent a pull-request to pygments project[1]. But development of pygments has been suspended since 2017 March. [1]: https://bitbucket.org/birkenfeld/pygments-main/pull-requests/ 745/fix-haskell-lexer-for-numeric-literals/diff [ci skip] Test Plan: build Reviewers: bgamari, monoidal Reviewed By: monoidal Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5120
* Documentation tweaksKrzysztof Gogolewski2018-09-071-18/+7
| | | | | | | | | | | | | | | | | | | Summary: - Mention static pointers in "stolen syntax" - Suggest importing Constraint and IsString from Data.* instead of GHC.* - Remove obsolete SPECIALISE syntax; it was removed in or before 1999 (d66d409bf6) - Fix link in pattern signatures Test Plan: build Reviewers: bgamari, takenobu Reviewed By: takenobu Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5132
* Fix typos in -Wsimplifiable-class-constraints flag docsSergey Vinokurov2018-09-041-2/+2
|
* Remove duplicate "since" field in glasgow_exts.rstJosh Price2018-09-031-2/+0
|
* fix -ddump-asm descriptionAlp Mestanogullari2018-08-301-1/+1
| | | | | | | | | | | | | | Summary: It was missing some words. Test Plan: None (docs only) Reviewers: bgamari, monoidal Reviewed By: monoidal Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5102
* Finish stable splitDavid Feuer2018-08-292-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long ago, the stable name table and stable pointer tables were one. Now, they are separate, and have significantly different implementations. I believe the time has come to finish the split that began in #7674. * Divide `rts/Stable` into `rts/StableName` and `rts/StablePtr`. * Give each table its own mutex. * Add FFI functions `hs_lock_stable_ptr_table` and `hs_unlock_stable_ptr_table` and document them. These are intended to replace the previously undocumented `hs_lock_stable_tables` and `hs_lock_stable_tables`, which are now documented as deprecated synonyms. * Make `eqStableName#` use pointer equality instead of unnecessarily comparing stable name table indices. Reviewers: simonmar, bgamari, erikd Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15555 Differential Revision: https://phabricator.haskell.org/D5084
* Rename kind vars in left-to-right order in bindHsQTyVarsRyan Scott2018-08-281-0/+11
| | | | | | | | | | | | | | | | | | | | Summary: When renaming kind variables in an `LHsQTyVars`, we were erroneously putting all of the kind variables in the binders //after// the kind variables in the body, resulting in #15568. The fix is simple: just swap the order of these two around. Test Plan: make test TEST=T15568 Reviewers: simonpj, bgamari, goldfire Reviewed By: goldfire Subscribers: goldfire, rwbarton, carter GHC Trac Issues: #15568 Differential Revision: https://phabricator.haskell.org/D5108
* Fix typo in 8.6.1 notesKrzysztof Gogolewski2018-08-281-1/+1
|
* Don't reify redundant class method tyvars/contextsRyan Scott2018-08-271-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, reifying classes produces class methods with redundant tyvars and class contexts in their type signatures, such as in the following: ```lang=haskell class C a where method :: forall a. C a => a ``` Fixing this is very straightforward: just apply `tcSplitMethodTy` to the type of each class method to lop off the redundant parts. It's possible that this could break some TH code in the wild that assumes the existence of these tyvars and class contexts, so I'll advertise this change in the release notes just to be safe. Test Plan: make test TEST="TH_reifyDecl1 T9064 T10891 T14888" Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, carter GHC Trac Issues: #15551 Differential Revision: https://phabricator.haskell.org/D5088
* Take strict fields into account in coverage checkingRyan Scott2018-08-271-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The current pattern-match coverage checker implements the formalism presented in the //GADTs Meet Their Match// paper in a fairly faithful matter. However, it was discovered recently that there is a class of unreachable patterns that //GADTs Meet Their Match// does not handle: unreachable code due to strict argument types, as demonstrated in #15305. This patch therefore goes off-script a little and implements an extension to the formalism presented in the paper to handle this case. Essentially, when determining if each constructor can be matched on, GHC checks if its associated term and type constraints are satisfiable. This patch introduces a new form of constraint, `NonVoid(ty)`, and checks if each constructor's strict argument types satisfy `NonVoid`. If any of them do not, then that constructor is deemed uninhabitable, and thus cannot be matched on. For the full story of how this works, see `Note [Extensions to GADTs Meet Their Match]`. Along the way, I did a little bit of much-needed refactoring. In particular, several functions in `Check` were passing a triple of `(ValAbs, ComplexEq, Bag EvVar)` around to represent a constructor and its constraints. Now that we're adding yet another form of constraint to the mix, I thought it appropriate to turn this into a proper data type, which I call `InhabitationCandidate`. Test Plan: make test TEST=T15305 Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15305 Differential Revision: https://phabricator.haskell.org/D5087
* Update unicode tables to v. 12 of the standardArtem Pelenitsyn2018-08-231-0/+2
| | | | | | | | | | | | Reviewers: hvr, bgamari, Azel Reviewed By: bgamari Subscribers: thomie, Azel, rwbarton, carter GHC Trac Issues: #5518, #15525 Differential Revision: https://phabricator.haskell.org/D5066
* docs: Add changelog and release notes entry for traceBinaryEvent#Ben Gamari2018-08-231-0/+7
|
* docs: "state transformer" -> "state monad" / "ST" (whichever is meant)Artem Pelenitsyn2018-08-211-2/+2
| | | | | | | | | | | | | | FIxes #15189. Reviewers: hvr, bgamari, simonmar, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #15189 Differential Revision: https://phabricator.haskell.org/D5019
* Show -with-rtsopts options in runtime's --info (#15261)roland2018-08-212-0/+7
| | | | | | | | | | | | | | | | | | Add an additional line to the output of +RTS --info. It shows the value of the flag -with-rtsopts provided at compile/link time. Test Plan: make test TESTS="T15261a T15261b" Reviewers: hvr, erikd, dfeuer, thomie, austin, bgamari, simonmar, osa1, monoidal Reviewed By: osa1, monoidal Subscribers: osa1, rwbarton, carter GHC Trac Issues: #15261 Differential Revision: https://phabricator.haskell.org/D5053
* Introduce flag -keep-hscpp-filesroland2018-08-212-0/+14
| | | | | | | | | | | | | | Test Plan: `make test=T10869` Reviewers: mpickering, thomie, ezyang, bgamari Reviewed By: thomie, bgamari Subscribers: rwbarton, carter GHC Trac Issues: #10869 Differential Revision: https://phabricator.haskell.org/D4861
* Document default value of +RTS -N in user's guideÖmer Sinan Ağacan2018-08-171-0/+2
| | | | | | | | | | | | Summary: (This is documented in `+RTS -?` but wasn't documented in the user's guide) Reviewers: simonmar, bgamari, monoidal Reviewed By: monoidal Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5065