summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail116.stderr
Commit message (Collapse)AuthorAgeFilesLines
* Improve error messages for skolemsSimon Peyton Jones2017-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In error messages like this • Couldn't match type ‘c’ with ‘f0 (a -> b)’ ‘c’ is a rigid type variable bound by the type signature for: f :: ((a -> b) -> b) -> forall c. c -> a we need to take case both to actually show that 'forall c', and to make sure that its name lines with the 'c' in the error message. This has been shaky for some time, and this commit puts it on solid ground. See TcRnTypes: Note [SigSkol SkolemInfo] The main changes are * SigSkol gets an extra field that records the way in which the type signature was skolemised. * The type in SigSkol is now the /un/-skolemised version * pprSkolemInfo uses the info to make the tidy type line up nicely Lots of error message wibbles!
* Testsuite: accept output without Windows line endings (#11631)Thomas Miedema2016-02-231-12/+12
|
* Refactor treatment of wildcardsSimon Peyton Jones2015-12-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch began as a modest refactoring of HsType and friends, to clarify and tidy up exactly where quantification takes place in types. Although initially driven by making the implementation of wildcards more tidy (and fixing a number of bugs), I gradually got drawn into a pretty big process, which I've been doing on and off for quite a long time. There is one compiler performance regression as a result of all this, in perf/compiler/T3064. I still need to look into that. * The principal driving change is described in Note [HsType binders] in HsType. Well worth reading! * Those data type changes drive almost everything else. In particular we now statically know where (a) implicit quantification only (LHsSigType), e.g. in instance declaratios and SPECIALISE signatures (b) implicit quantification and wildcards (LHsSigWcType) can appear, e.g. in function type signatures * As part of this change, HsForAllTy is (a) simplified (no wildcards) and (b) split into HsForAllTy and HsQualTy. The two contructors appear when and only when the correponding user-level construct appears. Again see Note [HsType binders]. HsExplicitFlag disappears altogether. * Other simplifications - ExprWithTySig no longer needs an ExprWithTySigOut variant - TypeSig no longer needs a PostRn name [name] field for wildcards - PatSynSig records a LHsSigType rather than the decomposed pieces - The mysterious 'GenericSig' is now 'ClassOpSig' * Renamed LHsTyVarBndrs to LHsQTyVars * There are some uninteresting knock-on changes in Haddock, because of the HsSyn changes I also did a bunch of loosely-related changes: * We already had type synonyms CoercionN/CoercionR for nominal and representational coercions. I've added similar treatment for TcCoercionN/TcCoercionR mkWpCastN/mkWpCastN All just type synonyms but jolly useful. * I record-ised ForeignImport and ForeignExport * I improved the (poor) fix to Trac #10896, by making TcTyClsDecls.checkValidTyCl recover from errors, but adding a harmless, abstract TyCon to the envt if so. * I did some significant refactoring in RnEnv.lookupSubBndrOcc, for reasons that I have (embarrassingly) now totally forgotten. It had to do with something to do with import and export Updates haddock submodule.
* A raft of small changes associated with -XConstrainedClassMethodsSimon Peyton Jones2015-03-041-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | See Trac #7854. Specifically: * Major clean up and simplification of check_op in checkValidClass; specifically - use checkValidType on the entire method-selector type to detect ambiguity - put a specific test for -XConstrainedClassMethods * Make -XConstrainedClassMethods be implied by -XMultiParamTypeClasses (a bit ad-hoc but see #7854), and document in the user manual. * Do the checkAmbiguity test just once in TcValidity.checkValidType, rather than repeatedly at every level. See Note [When to call checkAmbiguity] * Add -XAllowAmbiguousTypes in GHC.IP, since 'ip' really is ambiguous. (It's a rather magic function.) * Improve location info for check_op in checkValidClass * Update quite a few tests, which had genuinely-ambiguous class method signatures. Some I fixed by making them unambiguous; some by adding -XAllowAmbiguousTypes
* Clarify error message. See #9167.Richard Eisenberg2014-06-111-1/+1
|
* Check that an associated type mentions at least one type variable from the classSimon Peyton Jones2014-06-091-1/+1
| | | | Fixes Trac #9167
* Use U+2018 instead of U+201B quote mark in compiler messagesHerbert Valerio Riedel2014-02-251-2/+2
| | | | | | | This matches GCC's choice of Unicode quotation marks (i.e. U+2018 and U+2019) and therefore looks more familiar on the console. This addresses #2507. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Update outputs following the unicode quote change in GHC's outputIan Lynagh2013-02-241-2/+2
|
* Move tests from tests/ghc-regress/* to just tests/*David Terei2011-07-201-0/+6