summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* Change runtime linker to perform lazy loading of symbols/sectionsTamar Christina2016-04-1123-1/+418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Runtime Linker is currently eagerly loading all object files on all platforms which do not use the system linker for `GHCi`. The problem with this approach is that it requires all symbols to be found. Even those of functions never used/called. This makes the number of libraries required to link things like `mingwex` quite high. To work around this the `rts` was relying on a trick. It itself was compiled with `MingW64-w`'s `GCC`. So it was already linked against `mingwex`. As such, it re-exported the symbols from itself. While this worked it made it impossible to link against `mingwex` in user libraries. And with this means no `C99` code could ever run in `GHCi` on Windows without having the required symbols re-exported from the rts. Consequently this rules out a large number of packages on Windows. SDL2, HMatrix etc. After talking with @rwbarton I have taken the approach of loading entire object files when a symbol is needed instead of doing the dependency tracking on a per symbol basis. This is a lot less fragile and a lot less complicated to implement. The changes come down to the following steps: 1) modify the linker to and introduce a new state for ObjectCode: `Needed`. A Needed object is one that is required for the linking to succeed. The initial set consists of all Object files passed as arguments to the link. 2) Change `ObjectCode`'s to be indexed but not initialized or resolved. This means we know where we would load the symbols, but haven't actually done so. 3) Mark any `ObjectCode` belonging to `.o` passed as argument as required: ObjectState `NEEDED`. 4) During `Resolve` object calls, mark all `ObjectCode` containing the required symbols as `NEEDED` 5) During `lookupSymbol` lookups, (which is called from `linkExpr` and `linkDecl` in `GHCI.hs`) is the symbol is in a not-yet-loaded `ObjectCode` then load the `ObjectCode` on demand and return the address of the symbol. Otherwise produce an unresolved symbols error as expected. 6) On `unloadObj` we then change the state of the object and remove it's symbols from the `reqSymHash` table so it can be reloaded. This change affects all platforms and OSes which use the runtime linker. It seems there are no real perf tests for `GHCi`, but performance shouldn't be impacted much. We gain a lot of time not loading all `obj` files, and we lose some time in `lookupSymbol` when we're finding sections that have to be loaded. The actual finding itself is O(1) (Assuming the hashtnl is perfect) It also consumes slighly more memory as instead of storing just the address of a symbol I also store some other information, like if the symbol is weak or not. This change will break any packages relying on renamed POSIX functions that were re-named and re-exported by the rts. Any packages following the proper naming for functions as found on MSDN will work fine. Test Plan: ./validate on all platforms which use the Runtime linker. Reviewers: thomie, rwbarton, simonmar, erikd, bgamari, austin, hvr Reviewed By: erikd Subscribers: kgardas, gridaphobe, RyanGlScott, simonmar, rwbarton, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D1805 GHC Trac Issues: #11223
* Remove the instantiation check when deriving Generic(1)RyanGlScott2016-04-106-20/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, deriving `Generic(1)` bailed out when attempting to instantiate visible type parameters (#5939), but this instantiation check was quite fragile and doesn't interact well with `-XTypeInType`. It has been decided that `Generic(1)` shouldn't be subjected to this check anyway, so it has been removed, and `gen_Generic_binds`'s machinery has been updated to substitute the type variables in a generated `Rep`/`Rep1` instance with the user-supplied type arguments. In addition, this also refactors `Condition` in `TcDeriv` a bit. Namely, since we no longer need `tc_args` to check any conditions, the `[Type]` component of `Condition` has been removed. Fixes #11732. Test Plan: ./validate Reviewers: goldfire, kosmikus, simonpj, bgamari, austin Reviewed By: simonpj, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2061 GHC Trac Issues: #5939, #11732
* Fix suggestions for unbound variables (#11680)Jason Eisenberg2016-04-103-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | When the typechecker generates the error message for an out-of-scope variable, it now uses the GlobalRdrEnv with respect to which the variable is unbound, not the GlobalRdrEnv which is available at the time the error is reported. Doing so ensures we do not provide suggestions which themselves are out-of-scope (because they are bound in a later inter-splice group). Nonetheless, we do note in the error message if an unambiguous, exact match to the out-of-scope variable is found in a later inter-splice group, and we specify where that match is not in scope. Test Plan: ./validate Reviewers: goldfire, austin, bgamari Reviewed By: goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2000 GHC Trac Issues: #11680
* Reduce default for -fmax-pmcheck-iterations from 1e7 to 2e6Herbert Valerio Riedel2016-04-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The commit 28f951edfe50ea5182065144340061ec326781f5 introduced the `-fmax-pmcheck-iterations` flag and set the default limit to 1e7 iterations. However, this value is still high enough that it can result GHC to exhibit memory spikes beyond 1 GiB of RAM usage (heap profile showed several `(:)`s, as well as `THUNK_2_0`, and `PmCon` during the memory spikes) A value of 2e6 seems to be a safer upper bound which still manages to let the checker not run into the limit in most cases. Test Plan: Validate, try building a few Hackage packages Reviewers: austin, gkaracha, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2095
* Fix Template Haskell bug reported in #11809.Dominik Bollmann2016-04-102-1/+14
| | | | | | | | | | | | | | | | | | Record selectors of data types spliced in with Template Haskell are not renamer-resolved correctly in GHC HEAD. The culprit is `newRecordSelector` which violates notes `Note [Binders in Template Haskell] in Convert.hs` and `Note [Looking up Exact RdrNames] in RnEnv.hs`. This commit fixes `newRecordSelector` accordingly. Test Plan: ./validate Reviewers: thomie, mpickering, bgamari, austin, simonpj, goldfire Reviewed By: goldfire Differential Revision: https://phabricator.haskell.org/D2091 GHC Trac Issues: #11809
* GHC.Base: Use thenIO in instance Applicative IOJoachim Breitner2016-04-081-1/+2
| | | | | | | | Since recent changes to CSE, the previous definition were no longer CSEd with thenIO, which resulted in extra steps in the simplifier and hence slightly larger compile times. See ticket:11781#comment:7. Differential Revision: https://phabricator.haskell.org/D2092
* Revert "testsuite: One more 32-bit performance slip"Ben Gamari2016-04-071-2/+1
| | | | This reverts commit 06b7ce21571cc6696ded6126098f0f596f4ba3ca.
* testsuite: One more 32-bit performance slipBen Gamari2016-04-071-1/+2
| | | | (cherry picked from commit 6d36d8e19a7e9cf3d8e715b1820cb656e937e809)
* Adjust performance numbersJoachim Breitner2016-04-072-2/+4
| | | | | to what phabricator found; not sure why my local validation yielded different numbers.
* Set tct_closed to TopLevel for closed bindings.Facundo Domínguez2016-04-063-0/+15
| | | | | | | | | | | | | | | | | | Summary: Till now tct_closed determined whether the type of a binding is closed. With this patch tct_closed indicates whether the binding is closed. Test Plan: ./validate Reviewers: simonpj, austin, bgamari Reviewed By: simonpj Subscribers: mboes, thomie, simonpj Differential Revision: https://phabricator.haskell.org/D2016 GHC Trac Issues: #11698
* Demand Analyzer: Do not set OneShot information (second try)Joachim Breitner2016-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | as suggested in ticket:11770#comment:1. This code was buggy (#11770), and the occurrence analyzer does the same job anyways. This also elaborates the notes in the occurrence analyzer accordingly. Previously, the worker/wrapper code would go through lengths to transfer the oneShot annotations from the original function to both the worker and the wrapper. We now simply transfer the demand on the worker, and let the subsequent occurrence analyzer push this onto the lambda binders. This also requires the occurrence analyzer to do this more reliably. Previously, it would not hand out OneShot annotatoins to things that would not `certainly_inline` (and it might not have mattered, as the Demand Analysis might have handed out the annotations). Now we hand out one-shot annotations unconditionally. Differential Revision: https://phabricator.haskell.org/D2085
* CSE code cleanup and improvementSimon Peyton Jones2016-04-063-9/+19
| | | | | | | | | Triggered by an observation by Joachim, Simon felt the urge to clean up the CSE code a bit. This is the result. (Code by Simon, commit message and other leg-work by Joachim) Differential Revision: https://phabricator.haskell.org/D2074
* Core pretty printer: Omit wild case bindersJoachim Breitner2016-04-0610-54/+38
| | | | | | | as they (especially their id info with absence information) clutter the output too much. They come back with debug_on. Differential Revision: https://phabricator.haskell.org/D2072
* testsuite: Update 32-bit performance numbersBen Gamari2016-04-064-61/+92
| | | | It's been quite a while since this has happened for some of our tests.
* T10870: Skip on 32-bit architecturesBen Gamari2016-04-061-1/+1
| | | | Shifts by amounts greater-than-or-equal-to the word size are undefined.
* T10272, T4340: Add 32-bit outputBen Gamari2016-04-064-0/+2
|
* Fix misattribution of `-Wunused-local-binds` warningsHerbert Valerio Riedel2016-04-0518-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where warnings actually controlled by - `Opt_WarnUnusedMatches` - `Opt_WarnUnusedTypePatterns` - `Opt_WarnUnusedTopBinds` were incorrectly reported as being controlled by `Opt_WarnUnusedLocalBinds` as well This bug was introduced in bb5afd3c274011c5ea302210b4c290ec1f83209c while implementing #10752 Test Plan: ./validate still running -- testsuite output wiggles expected Reviewers: barrucadu, quchen, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2077
* Don't infer CallStacksEric Seidel2016-04-0414-48/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We originally wanted CallStacks to be opt-in, but dealing with let binders complicated things, forcing us to infer CallStacks. It turns out that the inference is actually unnecessary though, we can let the wanted CallStacks bubble up to the outer context by refusing to quantify over them. Eventually they'll be solved from a given CallStack or defaulted to the empty CallStack if they reach the top. So this patch prevents GHC from quantifying over CallStacks, getting us back to the original plan. There's a small ugliness to do with PartialTypeSignatures, if the partial theta contains a CallStack constraint, we *do* want to quantify over the CallStack; the user asked us to! Note that this means that foo :: _ => CallStack foo = getCallStack callStack will be an *empty* CallStack, since we won't infer a CallStack for the hole in the theta. I think this is the right move though, since we want CallStacks to be opt-in. One can always write foo :: (HasCallStack, _) => CallStack foo = getCallStack callStack to get the CallStack and still have GHC infer the rest of the theta. Test Plan: ./validate Reviewers: goldfire, simonpj, austin, hvr, bgamari Reviewed By: simonpj, bgamari Subscribers: bitemyapp, thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D1912 GHC Trac Issues: #11573
* Elaborate test for #11376Simon Peyton Jones2016-04-042-1/+11
| | | | | | | This just adds the Prox stuff from the Description in Trac #11376 to the test case, The class stuff seems weird becuase the type is ambiguous
* rts: Make StablePtr derefs thread-safe (#10296)Jason Eisenberg2016-04-045-0/+77
| | | | | | | | | | | | | | | Stable pointers can now be safely dereferenced while the stable pointer table is simultaneously being enlarged. Test Plan: ./validate Reviewers: ezyang, austin, bgamari, simonmar Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D2031 GHC Trac Issues: #10296
* Deeply instantiate in :typeSimon Peyton Jones2016-04-046-19/+29
| | | | | | | | See Trac #11376 and Note [Deeply instantiate in :type] in TcRnDriver Sadly this showed up one new problem (Trac #11786) and one opportunity (Trac #11787), so test T11549 is now marked expect-broken on these two.
* Improve printing of pattern synonym typesRik Steenkamp2016-04-023-0/+76
| | | | | | | | | | | | | | | | | | | | | Add the function `pprPatSynType :: PatSyn -> SDoc` for printing pattern synonym types, and remove the ambiguous `patSynType` function. Also, the types in a `PatSyn` are now tidy. Haddock submodule updated to reflect the removal of `patSynType` by mpickering. Fixes: #11213. Reviewers: goldfire, simonpj, austin, mpickering, bgamari Reviewed By: simonpj, mpickering Subscribers: bollmann, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1896 GHC Trac Issues: #11213
* Revert "Demand Analyzer: Do not set OneShot information"Joachim Breitner2016-03-311-1/+1
| | | | | | | This reverts commit 28fe0eea4d161b707f67aae26fddaa2e60d8a901 due to various regressions. I’m not sure why my local ./validate --slow run did not catch this, though.
* Demand Analyzer: Do not set OneShot informationJoachim Breitner2016-03-311-1/+1
| | | | | | | | | as suggested in ticket:11770#comment:1. This code was buggy (#11770), and the occurrence analyzer does the same job anyways. This also elaborates the notes in the occurrence analyzer accordingly. Differential Revision: https://phabricator.haskell.org/D2070
* Refactor error generation for pattern synonymsSimon Peyton Jones2016-03-312-10/+8
| | | | | | The result of a series of patches on type-error messages for pattern synonyms had become a bit baroque. This tidies it up a bit. Still not fantastic, but better.
* Kill the magic of AnyBen Gamari2016-03-302-2/+2
| | | | | | | | | | | | | | | | | | | | This turns `Any` into a standard wired-in type family defined in `GHC.Types`, instead its current incarnation as a magical creature provided by the `GHC.Prim`. Also kill `AnyK`. See #10886. Test Plan: Validate Reviewers: simonpj, goldfire, austin, hvr Reviewed By: simonpj Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D2049 GHC Trac Issues: #10886
* Add -f(no-)version-macro to explicitly control macros.Edward Z. Yang2016-03-304-0/+8
| | | | | | | | | | | | | | Test Plan: validate Reviewers: thomie, austin, bgamari Reviewed By: bgamari Subscribers: hvr Differential Revision: https://phabricator.haskell.org/D2058 GHC Trac Issues: #11763
* Don't require -hide-all-packages for MIN_VERSION_* macrosThomas Miedema2016-03-304-14/+3
| | | | | | | | | | | | | | | | | Define MIN_VERSION_pkgname and VERSION_pkgname macros for all exposed packages, without requiring -hide-all-packages. See #10970 comment 7-10 for discussion. Reviewers: duncan, ezyang, bgamari, austin Reviewed By: ezyang Subscribers: hvr, rwbarton Differential Revision: https://phabricator.haskell.org/D1869 GHC Trac Issues: #10970
* ghc-prim: Delay inlining of {gt,ge,lt,le}Int to phase 1Ben Gamari2016-03-302-4/+5
| | | | Otherwise rewrite rules may not get an opporunity to fire.
* Typos in non-codeGabor Greif2016-03-304-4/+4
|
* Add testcase for #11770Joachim Breitner2016-03-307-23/+119
| | | | | and use normalise_errmsg_fun to check the core output in all.T, instead relying on code in the Makefile.
* rename: Disallow type signatures in patterns in plain HaskellBen Gamari2016-03-293-0/+25
| | | | | | | | | | | | | | | | | | | | This should require -XScopedTypeVariables. It seems this was previously handled by RnTypes.rnHsBndrSig which called RnTypes.badKindSigErr but this was broken in Simon's refactor of wildcards, 1e041b7382b6aa329e4ad9625439f811e0f27232. Here we re-introduce a check in RnPat. See #11663. Test Plan: Validate with `T11663` Reviewers: austin, simonpj Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2054 GHC Trac Issues: #11663
* Tes suite output updatesJoachim Breitner2016-03-292-24/+25
|
* Do not print DmdType in Core outputJoachim Breitner2016-03-2919-101/+98
| | | | too verbose, and usualy preceded by Str= anyways.
* Do not test for existence of the executableKai Harries2016-03-284-4/+4
| | | | | | | | | | | | | | | | | Summary: The test for the existence of the executable breaks on MS Windows. It is furthermore needless, because if the test can be executed the executable is obviously there. Reviewers: austin, bgamari, Phyx Reviewed By: Phyx Subscribers: Phyx, thomie Differential Revision: https://phabricator.haskell.org/D2050 GHC Trac Issues: #4114
* Check for rep poly on wildcard binders.Richard Eisenberg2016-03-263-0/+17
| | | | | | | I had just missed this case when adding my test. This is relevant to ticket #11473. Also adds lots of comments.
* Fix #11754 by adding an additional check.Richard Eisenberg2016-03-262-0/+29
| | | | | | This was just plain wrong previously. Test case: typecheck/should_compile/T11754
* testsuite: Identify framework failures in testsuite summaryBen Gamari2016-03-261-0/+14
| | | | | | | | | | | | | | | | Currently the testsuite driver tells you how many tests failed due to a framework failure but you need to manually grep through the testsuite output to identify which ones. Test Plan: Validate with, e.g., a timing out testcase Reviewers: austin, thomie Reviewed By: austin, thomie Differential Revision: https://phabricator.haskell.org/D2026 GHC Trac Issues: #11165
* Test Trac #11728Simon Peyton Jones2016-03-253-0/+32
|
* Add option `no-keep-hi-files` and `no-keep-o-files` (fixes #4114)Kai Harries2016-03-249-0/+140
| | | | | | | | | | | | | | | | | Summary: Remove `.hi` and `.o` files if the flags `no-keep-hi-files` and `no-keep-o-files` are given. Test Plan: ./validate Reviewers: austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2021 GHC Trac Issues: #4114
* Tidy up handling of coercion variablesSimon Peyton Jones2016-03-242-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Comments to explain that a CoVar, whose IdInfo is CoVarId, is always unlifted (but may be nominal or representational role) And TyCoRep.isCoercionType picks out only those unlifted types, NOT the lifted versions * Introduce Var.NcId for non-co-var Ids with predicate isNonCoVarId * Add assertions in CoreSubst that the Id env is only used for NcIds * Fix lurking bug in CSE which extended the CoreSubst Id env with a CoVar * Fix two bugs in Specialise.spec_call, which wrongly treated CoVars like NcIds - needed a varToCoreExpr in one place - needed extendSubst not extendIdSubst in another This was the root cause of Trac #11644 Minor refactoring * Eliminate unused mkDerivedLocalCoVarM, mkUserLocalCoVar * Small refactor in mkSysLocalOrCoVar
* Defer inlining of Eq for primitive typesBen Gamari2016-03-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is one solution to #11688, wherein (==) was inlined to soon defeating a rewrite rule provided by bytestring. Since the RHSs of Eq's methods are simple, there is little to be gained and much to be lost by inlining them early. For instance, the bytestring library provides, ```lang=haskell break :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString) breakByte :: Word8 -> ByteString -> (ByteString, ByteString) ``` and a rule ``` forall x. break ((==) x) = breakByte x ``` since `breakByte` implments an optimized version of `break (== x)` for known `x :: Word8`. If we allow `(==)` to be inlined too early, we will prevent this rule from firing. This was the cause of #11688. This patch just defers the `Eq` methods, although it's likely worthwhile giving `Ord` this same treatment. This regresses compiler allocations for T9661 by about 8% due to the additional inlining that we now require the simplifier to perform. Updates the `bytestring` submodule to include updated rewrite rules which match on `eqWord8` instead of `(==)`. Test Plan: * Validate, examine performance impact Reviewers: simonpj, hvr, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1980 GHC Trac Issues: #11688
* Default RuntimeRep variables unless -fprint-explicit-runtime-repsBen Gamari2016-03-245-9/+32
| | | | | | | | | | | | | | | | | | | | Summary: Addresses #11549 by defaulting `RuntimeRep` variables to `PtrRepLifted` and adding a new compiler flag `-fprint-explicit-runtime-reps` to disable this behavior. This is just a guess at the right way to go about this. If it's wrong-beyond-any-hope just say so. Test Plan: Working on a testcase Reviewers: goldfire, austin Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1961 GHC Trac Issues: #11549
* Show: Restore redundant parentheses around recordsBen Gamari2016-03-243-6/+6
| | | | | | | | | | | | | | | | | | | | As discussed in #2530 we are going to continue to produce parentheses here in order to preserve compatibility with previous GHC releases. It was found that dropped parentheses would break some testsuites which compared against output from Show. This has been documented in the users guide. This reverts commit 5692643c9d17e746327588cd6157a923642b7975. Test Plan: Validate Reviewers: hvr, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2027 GHC Trac Issues: #2350
* Add expected output for T9405Ben Gamari2016-03-241-0/+3
|
* DsExpr: Rip out static/dynamic check in list desugaringBen Gamari2016-03-242-9/+13
| | | | | | | | | | | | | | | | | | | | | | Previously we would try to break explicit lists into a dynamic prefix and static tail and desugar the former into a `build` expression. Unfortunately, this heuristic resulted in surprising behavior (see #11710) and wasn't pulling its weight. Here we drop it (along with the `-fsimple-list-literals` flag), leaving only the list length heuristic to determine whether `build` or cons list desugaring should be used. Test Plan: Validate Reviewers: simonpj, austin Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2023 GHC Trac Issues: #11710
* Create empty dump files (fixes #10320)Kai Harries2016-03-243-0/+21
| | | | | | | | | | | | | | Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2015 GHC Trac Issues: #10320
* Add unicode syntax for banana bracketsJosh Price2016-03-243-13/+49
| | | | | | | | | | | | | | | | | | | | | Summary: Add "⦇" and "⦈" as unicode alternatives for "(|" and "|)" respectively. This must be implemented differently than other unicode additions because ⦇" and "⦈" are interpretted as a $unigraphic rather than a $unisymbol. Test Plan: validate Reviewers: goldfire, bgamari, austin Reviewed By: bgamari, austin Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2012 GHC Trac Issues: #10162
* Close ticky profiling file stream after printing (#9405)Flaviu Andrei Csernik2016-03-243-0/+15
| | | | | | | | | | | | | | Test Plan: T9405 Reviewers: simonmar, austin, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2008 GHC Trac Issues: #9405
* Add `PatSynSigSkol` and modify `PatSynCtxt`Rik Steenkamp2016-03-245-8/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the type of a pattern synonym cannot in general be represented by a value of type Type, we cannot use a value `SigSkol (PatSynCtxt n) (Check ty)` to represent the signature of a pattern synonym (this causes incorrect signatures to be printed in error messages). Therefore we now represent it by a value `PatSynSigSkol n` (instead of incorrect signatures we simply print no explicit signature). Furthermore, we rename `PatSynCtxt` to `PatSynBuilderCtxt`, and use `SigSkol (PatSynBuilderCtxt n) (Check ty)` to represent the type of a bidirectional pattern synonym when used in an expression context. Before, this type was represented by a value `SigSkol (PatSynCtxt n) (Check ty)`, which caused incorrect error messages. Also, in `mk_dict_err` of `typecheck\TcErrors.hs` we now distinguish between all enclosing implications and "useful" enclosing implications, for better error messages concerning pattern synonyms. See `Note [Useful implications]`. See the Phabricator page for examples. Reviewers: mpickering, goldfire, simonpj, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1967 GHC Trac Issues: #11667