summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/ado/ado005.stderr8
-rw-r--r--testsuite/tests/arrows/should_fail/T5380.stderr48
-rw-r--r--testsuite/tests/deriving/should_fail/T5287.stderr22
-rw-r--r--testsuite/tests/gadt/T3169.stderr28
-rw-r--r--testsuite/tests/gadt/T7558.stderr8
-rw-r--r--testsuite/tests/gadt/rw.stderr48
-rw-r--r--testsuite/tests/ghc-api/annotations/all.T2
-rw-r--r--testsuite/tests/ghc-api/landmines/landmines.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr267
-rw-r--r--testsuite/tests/ghci/scripts/T10248.stderr16
-rw-r--r--testsuite/tests/ghci/scripts/T7873.stdout13
-rw-r--r--testsuite/tests/ghci/scripts/ghci050.stderr1
-rw-r--r--testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr51
-rw-r--r--testsuite/tests/indexed-types/should_compile/Records.hs4
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple14.stderr35
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3208b.stderr44
-rw-r--r--testsuite/tests/indexed-types/should_fail/BadSock.hs6
-rw-r--r--testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr30
-rw-r--r--testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr21
-rw-r--r--testsuite/tests/indexed-types/should_fail/Overlap6.stderr23
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr11
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr21
-rw-r--r--testsuite/tests/indexed-types/should_fail/T1897b.stderr7
-rw-r--r--testsuite/tests/indexed-types/should_fail/T1900.stderr5
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2693.stderr74
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3330a.stderr84
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3440.stderr39
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4093a.stderr24
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4093b.stderr75
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4174.stderr52
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4272.stderr29
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7194.stderr25
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9036.stderr24
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9171.stderr33
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9433.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9662.stderr144
-rw-r--r--testsuite/tests/module/mod98.stderr8
-rw-r--r--testsuite/tests/monadfail/MonadFailErrors.stderr2
-rw-r--r--testsuite/tests/monadfail/MonadFailWarnings.stderr104
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr8
-rw-r--r--testsuite/tests/parser/should_fail/T3811.stderr8
-rw-r--r--testsuite/tests/parser/should_fail/T7848.stderr78
-rw-r--r--testsuite/tests/parser/should_fail/readFail031.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ExprSigLocal.hs12
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr19
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr3
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr182
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10403.hs1
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10403.stderr91
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10438.stderr55
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10519.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr119
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T1
-rw-r--r--testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr13
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr16
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr12
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr12
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr11
-rw-r--r--testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr33
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr15
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr28
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr44
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr18
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr12
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr28
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10045.stderr43
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10615.stderr70
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10999.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10999.stderr24
-rw-r--r--testsuite/tests/partial-sigs/should_fail/TidyClash.stderr36
-rw-r--r--testsuite/tests/partial-sigs/should_fail/Trac10045.hs8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/Trac10045.stderr46
-rw-r--r--testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr11
-rw-r--r--testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr11
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr115
-rw-r--r--testsuite/tests/partial-sigs/should_fail/all.T5
-rw-r--r--testsuite/tests/patsyn/should_fail/T9161-1.stderr9
-rw-r--r--testsuite/tests/patsyn/should_fail/T9161-2.stderr10
-rw-r--r--testsuite/tests/perf/compiler/T5837.stderr8
-rw-r--r--testsuite/tests/perf/compiler/all.T4
-rw-r--r--testsuite/tests/polykinds/PolyKinds02.stderr10
-rw-r--r--testsuite/tests/polykinds/T10503.stderr31
-rw-r--r--testsuite/tests/polykinds/T10516.stderr2
-rw-r--r--testsuite/tests/polykinds/T6021.stderr9
-rw-r--r--testsuite/tests/polykinds/T6068.hs4
-rw-r--r--testsuite/tests/polykinds/T7224.stderr11
-rw-r--r--testsuite/tests/polykinds/T7230.stderr54
-rw-r--r--testsuite/tests/polykinds/T7278.stderr10
-rw-r--r--testsuite/tests/polykinds/T7328.stderr15
-rw-r--r--testsuite/tests/polykinds/T7438.stderr1
-rw-r--r--testsuite/tests/polykinds/T9222.stderr15
-rw-r--r--testsuite/tests/rename/should_compile/T4426.hs8
-rw-r--r--testsuite/tests/rename/should_compile/T4426.stderr53
-rw-r--r--testsuite/tests/rename/should_compile/T5331.stderr25
-rw-r--r--testsuite/tests/rename/should_compile/all.T2
-rw-r--r--testsuite/tests/rename/should_fail/T2901.stderr3
-rw-r--r--testsuite/tests/rename/should_fail/T5372.hs8
-rw-r--r--testsuite/tests/rename/should_fail/T5372.stderr14
-rw-r--r--testsuite/tests/rename/should_fail/rnfail026.stderr18
-rw-r--r--testsuite/tests/roles/should_fail/RolesIArray.stderr8
-rw-r--r--testsuite/tests/simplCore/should_compile/T8848.stderr4
-rw-r--r--testsuite/tests/simplCore/should_compile/T8848a.stderr12
-rw-r--r--testsuite/tests/simplCore/should_compile/rule2.stderr2
-rw-r--r--testsuite/tests/th/T10267.stderr68
-rw-r--r--testsuite/tests/th/T3177a.stderr18
-rw-r--r--testsuite/tests/th/T8625.stdout4
-rw-r--r--testsuite/tests/th/TH_pragma.stderr32
-rw-r--r--testsuite/tests/typecheck/should_compile/FD1.stderr19
-rw-r--r--testsuite/tests/typecheck/should_compile/FD2.stderr38
-rw-r--r--testsuite/tests/typecheck/should_compile/FD3.stderr23
-rw-r--r--testsuite/tests/typecheck/should_compile/T10632.stderr9
-rw-r--r--testsuite/tests/typecheck/should_compile/T7220a.stderr28
-rw-r--r--testsuite/tests/typecheck/should_compile/T9834.stderr46
-rw-r--r--testsuite/tests/typecheck/should_compile/T9939.stderr38
-rw-r--r--testsuite/tests/typecheck/should_compile/tc141.stderr86
-rw-r--r--testsuite/tests/typecheck/should_compile/tc166.hs4
-rw-r--r--testsuite/tests/typecheck/should_compile/tc168.stderr22
-rw-r--r--testsuite/tests/typecheck/should_compile/tc182.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc244.hs62
-rw-r--r--testsuite/tests/typecheck/should_fail/ContextStack2.stderr25
-rw-r--r--testsuite/tests/typecheck/should_fail/CustomTypeErrors02.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/CustomTypeErrors03.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr35
-rw-r--r--testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr25
-rw-r--r--testsuite/tests/typecheck/should_fail/IPFail.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T10285.stderr34
-rw-r--r--testsuite/tests/typecheck/should_fail/T10351.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T10534.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/T10715.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/T11112.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T1897a.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/T1899.stderr21
-rw-r--r--testsuite/tests/typecheck/should_fail/T2538.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/T2714.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/T3102.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/T3540.stderr25
-rw-r--r--testsuite/tests/typecheck/should_fail/T4875.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T5236.stderr19
-rw-r--r--testsuite/tests/typecheck/should_fail/T5300.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/T5957.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/T6022.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T7279.stderr21
-rw-r--r--testsuite/tests/typecheck/should_fail/T7410.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T7453.stderr81
-rw-r--r--testsuite/tests/typecheck/should_fail/T7609.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/T7645.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T7696.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/T7697.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/T7748a.stderr34
-rw-r--r--testsuite/tests/typecheck/should_fail/T7778.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T7809.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T7869.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/T8030.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/T8034.stderr23
-rw-r--r--testsuite/tests/typecheck/should_fail/T8142.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T8392a.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T8450.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/T8603.stderr43
-rw-r--r--testsuite/tests/typecheck/should_fail/T8806.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/T8883.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T9196.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/T9201.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/mc19.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/mc21.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/mc22.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail032.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail034.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail057.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail058.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail063.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail065.stderr27
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail067.stderr155
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail068.stderr159
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail072.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail076.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail078.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail080.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail097.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail098.stderr21
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail101.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail102.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail103.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail107.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail110.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail113.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail116.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail127.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail131.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail134.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail135.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail142.stderr23
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail153.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail158.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail160.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail161.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail174.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail175.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail179.stderr36
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail181.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail191.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail193.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail196.stderr9
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail197.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail201.stderr23
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail206.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail208.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail209a.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail212.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail215.stderr8
-rwxr-xr-xtestsuite/tests/typecheck/should_run/Defer01.hs5
-rw-r--r--testsuite/tests/typecheck/should_run/T7861.stderr6
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun008.hs11
-rw-r--r--testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr2
250 files changed, 2841 insertions, 2690 deletions
diff --git a/testsuite/tests/ado/ado005.stderr b/testsuite/tests/ado/ado005.stderr
index 7203392d60..4bfc79eca4 100644
--- a/testsuite/tests/ado/ado005.stderr
+++ b/testsuite/tests/ado/ado005.stderr
@@ -1,14 +1,14 @@
-ado005.hs:8:3:
+ado005.hs:8:3: error:
Could not deduce (Monad f) arising from a do statement
from the context: Applicative f
bound by the type signature for:
- test :: Applicative f => (Int -> f Int) -> f Int
- at ado005.hs:6:9-48
+ test :: Applicative f => (Int -> f Int) -> f Int
+ at ado005.hs:6:1-48
Possible fix:
add (Monad f) to the context of
the type signature for:
- test :: Applicative f => (Int -> f Int) -> f Int
+ test :: Applicative f => (Int -> f Int) -> f Int
In a stmt of a 'do' block: x <- f 3
In the expression:
do { x <- f 3;
diff --git a/testsuite/tests/arrows/should_fail/T5380.stderr b/testsuite/tests/arrows/should_fail/T5380.stderr
index 177183225c..2aeb01f1c0 100644
--- a/testsuite/tests/arrows/should_fail/T5380.stderr
+++ b/testsuite/tests/arrows/should_fail/T5380.stderr
@@ -1,27 +1,29 @@
-T5380.hs:7:27:
- Couldn't match expected type ‘Bool’ with actual type ‘not_bool’
+T5380.hs:7:27: error:
+ • Couldn't match expected type ‘Bool’ with actual type ‘not_bool’
‘not_bool’ is a rigid type variable bound by
- the type signature for:
- testB :: not_bool -> (() -> ()) -> () -> not_unit
- at T5380.hs:6:10
- In the expression: b
- In the expression: proc () -> if b then f -< () else f -< ()
- Relevant bindings include
- b :: not_bool (bound at T5380.hs:7:7)
- testB :: not_bool -> (() -> ()) -> () -> not_unit
- (bound at T5380.hs:7:1)
+ the type signature for:
+ testB :: forall not_bool not_unit.
+ not_bool -> (() -> ()) -> () -> not_unit
+ at T5380.hs:6:10
+ • In the expression: b
+ In the expression: proc () -> if b then f -< () else f -< ()
+ • Relevant bindings include
+ b :: not_bool (bound at T5380.hs:7:7)
+ testB :: not_bool -> (() -> ()) -> () -> not_unit
+ (bound at T5380.hs:7:1)
-T5380.hs:7:34:
- Couldn't match type ‘not_unit’ with ‘()’
+T5380.hs:7:34: error:
+ • Couldn't match type ‘not_unit’ with ‘()’
‘not_unit’ is a rigid type variable bound by
- the type signature for:
- testB :: not_bool -> (() -> ()) -> () -> not_unit
- at T5380.hs:6:10
- Expected type: () -> not_unit
- Actual type: () -> ()
- In the expression: f
- In the command: f -< ()
- Relevant bindings include
- testB :: not_bool -> (() -> ()) -> () -> not_unit
- (bound at T5380.hs:7:1)
+ the type signature for:
+ testB :: forall not_bool not_unit.
+ not_bool -> (() -> ()) -> () -> not_unit
+ at T5380.hs:6:10
+ Expected type: () -> not_unit
+ Actual type: () -> ()
+ • In the expression: f
+ In the command: f -< ()
+ • Relevant bindings include
+ testB :: not_bool -> (() -> ()) -> () -> not_unit
+ (bound at T5380.hs:7:1)
diff --git a/testsuite/tests/deriving/should_fail/T5287.stderr b/testsuite/tests/deriving/should_fail/T5287.stderr
index 529751c2d3..3fb3e283d9 100644
--- a/testsuite/tests/deriving/should_fail/T5287.stderr
+++ b/testsuite/tests/deriving/should_fail/T5287.stderr
@@ -1,11 +1,11 @@
-
-T5287.hs:6:10:
- Could not deduce (A a oops0)
- from the context: A a oops
- bound by an instance declaration: A a oops => Read (D a)
- at T5287.hs:6:10-31
- The type variable ‘oops0’ is ambiguous
- In the ambiguity check for an instance declaration:
- forall a oops. A a oops => Read (D a)
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the instance declaration for ‘Read (D a)’
+
+T5287.hs:6:10: error:
+ Could not deduce (A a oops0)
+ from the context: A a oops
+ bound by an instance declaration:
+ A a oops => Read (D a)
+ at T5287.hs:6:10-31
+ The type variable ‘oops0’ is ambiguous
+ In the ambiguity check for an instance declaration
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the instance declaration for ‘Read (D a)’
diff --git a/testsuite/tests/gadt/T3169.stderr b/testsuite/tests/gadt/T3169.stderr
index 12a39ebe51..0ec531c526 100644
--- a/testsuite/tests/gadt/T3169.stderr
+++ b/testsuite/tests/gadt/T3169.stderr
@@ -1,16 +1,16 @@
-T3169.hs:13:22:
- Couldn't match type ‘elt’ with ‘Map b elt’
+T3169.hs:13:22: error:
+ • Couldn't match type ‘elt’ with ‘Map b elt’
‘elt’ is a rigid type variable bound by
- the type signature for:
- lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
- at T3169.hs:12:3
- Expected type: Map a (Map b elt)
- Actual type: Map (a, b) elt
- In the second argument of ‘lookup’, namely ‘m’
- In the expression: lookup a m :: Maybe (Map b elt)
- Relevant bindings include
- m :: Map (a, b) elt (bound at T3169.hs:12:17)
- b :: b (bound at T3169.hs:12:13)
- lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
- (bound at T3169.hs:12:3)
+ the type signature for:
+ lookup :: forall elt. (a, b) -> Map (a, b) elt -> Maybe elt
+ at T3169.hs:12:3
+ Expected type: Map a (Map b elt)
+ Actual type: Map (a, b) elt
+ • In the second argument of ‘lookup’, namely ‘m’
+ In the expression: lookup a m :: Maybe (Map b elt)
+ • Relevant bindings include
+ m :: Map (a, b) elt (bound at T3169.hs:12:17)
+ b :: b (bound at T3169.hs:12:13)
+ lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
+ (bound at T3169.hs:12:3)
diff --git a/testsuite/tests/gadt/T7558.stderr b/testsuite/tests/gadt/T7558.stderr
index 3d09467402..15b9476af4 100644
--- a/testsuite/tests/gadt/T7558.stderr
+++ b/testsuite/tests/gadt/T7558.stderr
@@ -1,8 +1,10 @@
-T7558.hs:8:4:
+T7558.hs:8:4: error:
Couldn't match type ‘a’ with ‘Maybe a’
- ‘a’ is a rigid type variable bound by
- the type signature for: f :: T a a -> Bool at T7558.hs:7:6
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ f :: forall a. T a a -> Bool
+ at T7558.hs:7:6
Inaccessible code in
a pattern with constructor:
MkT :: forall a b. (a ~ Maybe b) => a -> Maybe b -> T a b,
diff --git a/testsuite/tests/gadt/rw.stderr b/testsuite/tests/gadt/rw.stderr
index dcd3e10397..39529a7003 100644
--- a/testsuite/tests/gadt/rw.stderr
+++ b/testsuite/tests/gadt/rw.stderr
@@ -1,27 +1,29 @@
-rw.hs:14:47:
- Couldn't match expected type ‘a’ with actual type ‘Int’
+rw.hs:14:47: error:
+ • Couldn't match expected type ‘a’ with actual type ‘Int’
‘a’ is a rigid type variable bound by
- the type signature for: writeInt :: T a -> IORef a -> IO ()
- at rw.hs:12:12
- In the second argument of ‘writeIORef’, namely ‘(1 :: Int)’
- In the expression: writeIORef ref (1 :: Int)
- In a case alternative: ~(Li x) -> writeIORef ref (1 :: Int)
- Relevant bindings include
- ref :: IORef a (bound at rw.hs:13:12)
- v :: T a (bound at rw.hs:13:10)
- writeInt :: T a -> IORef a -> IO () (bound at rw.hs:13:1)
+ the type signature for:
+ writeInt :: forall a. T a -> IORef a -> IO ()
+ at rw.hs:12:12
+ • In the second argument of ‘writeIORef’, namely ‘(1 :: Int)’
+ In the expression: writeIORef ref (1 :: Int)
+ In a case alternative: ~(Li x) -> writeIORef ref (1 :: Int)
+ • Relevant bindings include
+ ref :: IORef a (bound at rw.hs:13:12)
+ v :: T a (bound at rw.hs:13:10)
+ writeInt :: T a -> IORef a -> IO () (bound at rw.hs:13:1)
-rw.hs:19:51:
- Couldn't match type ‘a’ with ‘Bool’
+rw.hs:19:51: error:
+ • Couldn't match type ‘a’ with ‘Bool’
‘a’ is a rigid type variable bound by
- the type signature for: readBool :: T a -> IORef a -> IO ()
- at rw.hs:16:12
- Expected type: a -> Bool
- Actual type: Bool -> Bool
- In the second argument of ‘(.)’, namely ‘not’
- In the second argument of ‘(>>=)’, namely ‘(print . not)’
- Relevant bindings include
- ref :: IORef a (bound at rw.hs:17:12)
- v :: T a (bound at rw.hs:17:10)
- readBool :: T a -> IORef a -> IO () (bound at rw.hs:17:1)
+ the type signature for:
+ readBool :: forall a. T a -> IORef a -> IO ()
+ at rw.hs:16:12
+ Expected type: a -> Bool
+ Actual type: Bool -> Bool
+ • In the second argument of ‘(.)’, namely ‘not’
+ In the second argument of ‘(>>=)’, namely ‘(print . not)’
+ • Relevant bindings include
+ ref :: IORef a (bound at rw.hs:17:12)
+ v :: T a (bound at rw.hs:17:10)
+ readBool :: T a -> IORef a -> IO () (bound at rw.hs:17:1)
diff --git a/testsuite/tests/ghc-api/annotations/all.T b/testsuite/tests/ghc-api/annotations/all.T
index c7c8542a11..4104bceebf 100644
--- a/testsuite/tests/ghc-api/annotations/all.T
+++ b/testsuite/tests/ghc-api/annotations/all.T
@@ -16,7 +16,7 @@ test('T10358', normal, run_command, ['$MAKE -s --no-print-directory T10358'
test('T10278', normal, run_command, ['$MAKE -s --no-print-directory T10278'])
test('T10354', normal, run_command, ['$MAKE -s --no-print-directory T10354'])
test('T10396', normal, run_command, ['$MAKE -s --no-print-directory T10396'])
-test('T10399', normal, run_command, ['$MAKE -s --no-print-directory T10399'])
+test('T10399', expect_broken(11028), run_command, ['$MAKE -s --no-print-directory T10399'])
test('T10313', normal, run_command, ['$MAKE -s --no-print-directory T10313'])
test('T11018', normal, run_command, ['$MAKE -s --no-print-directory T11018'])
test('bundle-export', normal, run_command, ['$MAKE -s --no-print-directory bundle-export'])
diff --git a/testsuite/tests/ghc-api/landmines/landmines.stdout b/testsuite/tests/ghc-api/landmines/landmines.stdout
index 63070b28e5..db0b651dfa 100644
--- a/testsuite/tests/ghc-api/landmines/landmines.stdout
+++ b/testsuite/tests/ghc-api/landmines/landmines.stdout
@@ -1,4 +1,4 @@
(12,12,7)
(66,62,0)
-(14,13,7)
+(13,13,7)
(10,10,7)
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index 48ddf4b598..83e9f7d157 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -1,195 +1,178 @@
../../typecheck/should_run/Defer01.hs:11:40: warning:
- Couldn't match type ‘Char’ with ‘[Char]’
- Expected type: String
- Actual type: Char
- In the first argument of ‘putStr’, namely ‘','’
- In the second argument of ‘(>>)’, namely ‘putStr ','’
- In the expression: putStr "Hello World" >> putStr ','
+ • Couldn't match type ‘Char’ with ‘[Char]’
+ Expected type: String
+ Actual type: Char
+ • In the first argument of ‘putStr’, namely ‘','’
+ In the second argument of ‘(>>)’, namely ‘putStr ','’
+ In the expression: putStr "Hello World" >> putStr ','
../../typecheck/should_run/Defer01.hs:14:5: warning:
- Couldn't match expected type ‘Int’ with actual type ‘Char’
- In the expression: 'p'
- In an equation for ‘a’: a = 'p'
-
-../../typecheck/should_run/Defer01.hs:18:9: warning:
- No instance for (Eq B) arising from a use of ‘==’
- In the expression: x == x
- In an equation for ‘b’: b x = x == x
+ • Couldn't match expected type ‘Int’ with actual type ‘Char’
+ • In the expression: 'p'
+ In an equation for ‘a’: a = 'p'
../../typecheck/should_run/Defer01.hs:25:4: warning:
- Couldn't match type ‘Int’ with ‘Bool’
- Inaccessible code in
- a pattern with constructor: C2 :: Bool -> C Bool,
- in an equation for ‘c’
- In the pattern: C2 x
- In an equation for ‘c’: c (C2 x) = True
+ • Couldn't match type ‘Int’ with ‘Bool’
+ Inaccessible code in
+ a pattern with constructor: C2 :: Bool -> C Bool,
+ in an equation for ‘c’
+ • In the pattern: C2 x
+ In an equation for ‘c’: c (C2 x) = True
../../typecheck/should_run/Defer01.hs:28:5: warning:
- No instance for (Num (a -> a)) arising from the literal ‘1’
- (maybe you haven't applied a function to enough arguments?)
- In the expression: 1
- In an equation for ‘d’: d = 1
+ • No instance for (Num (a -> a)) arising from the literal ‘1’
+ (maybe you haven't applied a function to enough arguments?)
+ • In the expression: 1
+ In an equation for ‘d’: d = 1
../../typecheck/should_run/Defer01.hs:31:5: warning:
- Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
- The function ‘e’ is applied to one argument,
- but its type ‘Char’ has none
- In the expression: e 'q'
- In an equation for ‘f’: f = e 'q'
- Relevant bindings include
- f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)
+ • Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
+ • The function ‘e’ is applied to one argument,
+ but its type ‘Char’ has none
+ In the expression: e 'q'
+ In an equation for ‘f’: f = e 'q'
+ • Relevant bindings include
+ f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)
../../typecheck/should_run/Defer01.hs:34:8: warning:
- Couldn't match expected type ‘Char’ with actual type ‘a’
- ‘a’ is a rigid type variable bound by
+ • Couldn't match expected type ‘Char’ with actual type ‘a’
+ ‘a’ is a rigid type variable bound by
the type signature for:
- h :: a -> (Char, Char)
+ h :: forall a. a -> (Char, Char)
at ../../typecheck/should_run/Defer01.hs:33:6
- In the expression: x
- In the expression: (x, 'c')
- Relevant bindings include
- x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
- h :: a -> (Char, Char)
- (bound at ../../typecheck/should_run/Defer01.hs:34:1)
+ • In the expression: x
+ In the expression: (x, 'c')
+ • Relevant bindings include
+ x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
+ h :: a -> (Char, Char)
+ (bound at ../../typecheck/should_run/Defer01.hs:34:1)
../../typecheck/should_run/Defer01.hs:39:17: warning:
- Couldn't match expected type ‘Bool’ with actual type ‘T a’
- In the first argument of ‘not’, namely ‘(K a)’
- In the expression: (not (K a))
- Relevant bindings include
- a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
- i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1)
+ • Couldn't match expected type ‘Bool’ with actual type ‘T a’
+ • In the first argument of ‘not’, namely ‘(K a)’
+ In the expression: (not (K a))
+ • Relevant bindings include
+ a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
+ i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1)
../../typecheck/should_run/Defer01.hs:43:5: warning:
- No instance for (MyClass a1) arising from a use of ‘myOp’
- In the expression: myOp 23
- In an equation for ‘j’: j = myOp 23
+ • No instance for (MyClass a1) arising from a use of ‘myOp’
+ • In the expression: myOp 23
+ In an equation for ‘j’: j = myOp 23
../../typecheck/should_run/Defer01.hs:43:10: warning:
- Ambiguous type variable ‘a1’ arising from the literal ‘23’
- prevents the constraint ‘(Num a1)’ from being solved.
- Probable fix: use a type annotation to specify what ‘a1’ should be.
- These potential instances exist:
- instance Num Integer -- Defined in ‘GHC.Num’
- instance Num Double -- Defined in ‘GHC.Float’
- instance Num Float -- Defined in ‘GHC.Float’
- ...plus two others
- (use -fprint-potential-instances to see them all)
- In the first argument of ‘myOp’, namely ‘23’
- In the expression: myOp 23
- In an equation for ‘j’: j = myOp 23
-
-../../typecheck/should_run/Defer01.hs:45:6: warning:
+ • Ambiguous type variable ‘a1’ arising from the literal ‘23’
+ prevents the constraint ‘(Num a1)’ from being solved.
+ Probable fix: use a type annotation to specify what ‘a1’ should be.
+ These potential instances exist:
+ instance Num Integer -- Defined in ‘GHC.Num’
+ instance Num Double -- Defined in ‘GHC.Float’
+ instance Num Float -- Defined in ‘GHC.Float’
+ ...plus two others
+ (use -fprint-potential-instances to see them all)
+ • In the first argument of ‘myOp’, namely ‘23’
+ In the expression: myOp 23
+ In an equation for ‘j’: j = myOp 23
+
+../../typecheck/should_run/Defer01.hs:45:1: warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
the type signature for:
k :: (Int ~ Bool) => Int -> Bool
- In the ambiguity check for the type signature for ‘k’:
- k :: (Int ~ Bool) => Int -> Bool
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool
-
-../../typecheck/should_run/Defer01.hs:45:6: warning:
- Couldn't match expected type ‘Bool’ with actual type ‘Int’
- In the ambiguity check for the type signature for ‘k’:
- k :: (Int ~ Bool) => Int -> Bool
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool
../../typecheck/should_run/Defer01.hs:45:6: warning:
- Couldn't match type ‘Int’ with ‘Bool’
- Inaccessible code in
- the type signature for:
+ • Couldn't match type ‘Int’ with ‘Bool’
+ Inaccessible code in
+ the type signature for:
+ k :: (Int ~ Bool) => Int -> Bool
+ • In the ambiguity check for ‘k’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature:
k :: (Int ~ Bool) => Int -> Bool
-../../typecheck/should_run/Defer01.hs:46:7: warning:
- Couldn't match expected type ‘Bool’ with actual type ‘Int’
- In the expression: x
- In an equation for ‘k’: k x = x
-
../../typecheck/should_run/Defer01.hs:49:5: warning:
- Couldn't match expected type ‘IO a0’
- with actual type ‘Char -> IO ()’
- Probable cause: ‘putChar’ is applied to too few arguments
- In the first argument of ‘(>>)’, namely ‘putChar’
- In the expression: putChar >> putChar 'p'
+ • Couldn't match expected type ‘IO a0’
+ with actual type ‘Char -> IO ()’
+ • Probable cause: ‘putChar’ is applied to too few arguments
+ In the first argument of ‘(>>)’, namely ‘putChar’
+ In the expression: putChar >> putChar 'p'
*** Exception: ../../typecheck/should_run/Defer01.hs:11:40: error:
- Couldn't match type ‘Char’ with ‘[Char]’
- Expected type: String
- Actual type: Char
- In the first argument of ‘putStr’, namely ‘','’
- In the second argument of ‘(>>)’, namely ‘putStr ','’
- In the expression: putStr "Hello World" >> putStr ','
+ • Couldn't match type ‘Char’ with ‘[Char]’
+ Expected type: String
+ Actual type: Char
+ • In the first argument of ‘putStr’, namely ‘','’
+ In the second argument of ‘(>>)’, namely ‘putStr ','’
+ In the expression: putStr "Hello World" >> putStr ','
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:14:5: error:
- Couldn't match expected type ‘Int’ with actual type ‘Char’
- In the expression: 'p'
- In an equation for ‘a’: a = 'p'
+ • Couldn't match expected type ‘Int’ with actual type ‘Char’
+ • In the expression: 'p'
+ In an equation for ‘a’: a = 'p'
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:18:9: error:
- No instance for (Eq B) arising from a use of ‘==’
- In the expression: x == x
- In an equation for ‘b’: b x = x == x
+ • No instance for (Eq B) arising from a use of ‘==’
+ • In the expression: x == x
+ In an equation for ‘b’: b x = x == x
(deferred type error)
<interactive>:7:11: error:
- Couldn't match type ‘Bool’ with ‘Int’
- Expected type: C Int
- Actual type: C Bool
- In the first argument of ‘c’, namely ‘(C2 True)’
- In the first argument of ‘print’, namely ‘(c (C2 True))’
+ • Couldn't match type ‘Bool’ with ‘Int’
+ Expected type: C Int
+ Actual type: C Bool
+ • In the first argument of ‘c’, namely ‘(C2 True)’
+ In the first argument of ‘print’, namely ‘(c (C2 True))’
*** Exception: ../../typecheck/should_run/Defer01.hs:28:5: error:
- No instance for (Num (a -> a)) arising from the literal ‘1’
- (maybe you haven't applied a function to enough arguments?)
- In the expression: 1
- In an equation for ‘d’: d = 1
+ • No instance for (Num (a -> a)) arising from the literal ‘1’
+ (maybe you haven't applied a function to enough arguments?)
+ • In the expression: 1
+ In an equation for ‘d’: d = 1
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:31:5: error:
- Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
- The function ‘e’ is applied to one argument,
- but its type ‘Char’ has none
- In the expression: e 'q'
- In an equation for ‘f’: f = e 'q'
- Relevant bindings include
- f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)
+ • Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
+ • The function ‘e’ is applied to one argument,
+ but its type ‘Char’ has none
+ In the expression: e 'q'
+ In an equation for ‘f’: f = e 'q'
+ • Relevant bindings include
+ f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:34:8: error:
- Couldn't match expected type ‘Char’ with actual type ‘a’
- ‘a’ is a rigid type variable bound by
+ • Couldn't match expected type ‘Char’ with actual type ‘a’
+ ‘a’ is a rigid type variable bound by
the type signature for:
- h :: a -> (Char, Char)
+ h :: forall a. a -> (Char, Char)
at ../../typecheck/should_run/Defer01.hs:33:6
- In the expression: x
- In the expression: (x, 'c')
- Relevant bindings include
- x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
- h :: a -> (Char, Char)
- (bound at ../../typecheck/should_run/Defer01.hs:34:1)
+ • In the expression: x
+ In the expression: (x, 'c')
+ • Relevant bindings include
+ x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
+ h :: a -> (Char, Char)
+ (bound at ../../typecheck/should_run/Defer01.hs:34:1)
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:39:17: error:
- Couldn't match expected type ‘Bool’ with actual type ‘T a’
- In the first argument of ‘not’, namely ‘(K a)’
- In the expression: (not (K a))
- Relevant bindings include
- a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
- i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1)
+ • Couldn't match expected type ‘Bool’ with actual type ‘T a’
+ • In the first argument of ‘not’, namely ‘(K a)’
+ In the expression: (not (K a))
+ • Relevant bindings include
+ a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
+ i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1)
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:43:5: error:
- No instance for (MyClass a1) arising from a use of ‘myOp’
- In the expression: myOp 23
- In an equation for ‘j’: j = myOp 23
+ • No instance for (MyClass a1) arising from a use of ‘myOp’
+ • In the expression: myOp 23
+ In an equation for ‘j’: j = myOp 23
(deferred type error)
<interactive>:13:8: error:
- Couldn't match expected type ‘Bool’ with actual type ‘Int’
- In the first argument of ‘print’, namely ‘(k 2)’
- In the expression: print (k 2)
- In an equation for ‘it’: it = print (k 2)
+ • Couldn't match expected type ‘Bool’ with actual type ‘Int’
+ • In the first argument of ‘print’, namely ‘(k 2)’
+ In the expression: print (k 2)
+ In an equation for ‘it’: it = print (k 2)
*** Exception: ../../typecheck/should_run/Defer01.hs:49:5: error:
- Couldn't match expected type ‘IO a0’
- with actual type ‘Char -> IO ()’
- Probable cause: ‘putChar’ is applied to too few arguments
- In the first argument of ‘(>>)’, namely ‘putChar’
- In the expression: putChar >> putChar 'p'
+ • Couldn't match expected type ‘IO a0’
+ with actual type ‘Char -> IO ()’
+ • Probable cause: ‘putChar’ is applied to too few arguments
+ In the first argument of ‘(>>)’, namely ‘putChar’
+ In the expression: putChar >> putChar 'p'
(deferred type error)
diff --git a/testsuite/tests/ghci/scripts/T10248.stderr b/testsuite/tests/ghci/scripts/T10248.stderr
index 86b8c8d688..c9df22b056 100644
--- a/testsuite/tests/ghci/scripts/T10248.stderr
+++ b/testsuite/tests/ghci/scripts/T10248.stderr
@@ -1,14 +1,14 @@
<interactive>:2:10: error:
- Found hole: _ :: f a
- Where: ‘f’ is a rigid type variable bound by
+ • Found hole: _ :: f a
+ Where: ‘f’ is a rigid type variable bound by
the inferred type of it :: Functor f => f (Maybe a)
at <interactive>:2:1
- ‘a’ is a rigid type variable bound by
+ ‘a’ is a rigid type variable bound by
the inferred type of it :: Functor f => f (Maybe a)
at <interactive>:2:1
- In the second argument of ‘(<$>)’, namely ‘_’
- In the expression: Just <$> _
- In an equation for ‘it’: it = Just <$> _
- Relevant bindings include
- it :: f (Maybe a) (bound at <interactive>:2:1)
+ • In the second argument of ‘(<$>)’, namely ‘_’
+ In the expression: Just <$> _
+ In an equation for ‘it’: it = Just <$> _
+ • Relevant bindings include
+ it :: f (Maybe a) (bound at <interactive>:2:1)
diff --git a/testsuite/tests/ghci/scripts/T7873.stdout b/testsuite/tests/ghci/scripts/T7873.stdout
index 79a75ec7ea..84f3117958 100644
--- a/testsuite/tests/ghci/scripts/T7873.stdout
+++ b/testsuite/tests/ghci/scripts/T7873.stdout
@@ -1,7 +1,6 @@
-data D1 where
- MkD1 :: (forall (k1 :: BOX) (p :: k1 -> *) (a :: k1). p a -> Int)
- -> D1
- -- Defined at <interactive>:2:1
-data D2 where
- MkD2 :: (forall (p :: k -> *) (a :: k). p a -> Int) -> D2
- -- Defined at <interactive>:3:1
+data D1 where
+ MkD1 :: (forall (p :: k -> *) (a :: k). p a -> Int) -> D1
+ -- Defined at <interactive>:2:1
+data D2 where
+ MkD2 :: (forall (p :: k -> *) (a :: k). p a -> Int) -> D2
+ -- Defined at <interactive>:3:1
diff --git a/testsuite/tests/ghci/scripts/ghci050.stderr b/testsuite/tests/ghci/scripts/ghci050.stderr
index 31232b6b0b..e8cc7971db 100644
--- a/testsuite/tests/ghci/scripts/ghci050.stderr
+++ b/testsuite/tests/ghci/scripts/ghci050.stderr
@@ -11,3 +11,4 @@
a :: a (bound at <interactive>:5:41)
asList :: (a, a) -> [ListableElem (a, a)]
(bound at <interactive>:5:33)
+
diff --git a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
index 66b24174ae..68412759e7 100644
--- a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
+++ b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
@@ -1,27 +1,28 @@
-PushedInAsGivens.hs:10:31:
- Couldn't match expected type ‘a1’ with actual type ‘a’
- because type variable ‘a1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for: foo :: (F Int ~ [a1]) => a1 -> Int
- at PushedInAsGivens.hs:9:20-44
- In the expression: y
- In the first argument of ‘length’, namely ‘[x, y]’
- Relevant bindings include
- x :: a1 (bound at PushedInAsGivens.hs:10:17)
- foo :: a1 -> Int (bound at PushedInAsGivens.hs:10:13)
- y :: a (bound at PushedInAsGivens.hs:9:5)
- bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1)
+PushedInAsGivens.hs:10:31: error:
+ • Couldn't match expected type ‘a1’ with actual type ‘a’
+ because type variable ‘a1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ foo :: (F Int ~ [a1]) => a1 -> Int
+ at PushedInAsGivens.hs:9:13-44
+ • In the expression: y
+ In the first argument of ‘length’, namely ‘[x, y]’
+ • Relevant bindings include
+ x :: a1 (bound at PushedInAsGivens.hs:10:17)
+ foo :: a1 -> Int (bound at PushedInAsGivens.hs:10:13)
+ y :: a (bound at PushedInAsGivens.hs:9:5)
+ bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1)
-PushedInAsGivens.hs:11:15:
- Couldn't match expected type ‘[a]’ with actual type ‘F Int’
- In the expression: foo y
- In the expression: (y, foo y)
- In the expression:
- let
- foo :: (F Int ~ [a]) => a -> Int
- foo x = length [...]
- in (y, foo y)
- Relevant bindings include
- y :: a (bound at PushedInAsGivens.hs:9:5)
- bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1)
+PushedInAsGivens.hs:11:15: error:
+ • Couldn't match expected type ‘[a]’ with actual type ‘F Int’
+ • In the expression: foo y
+ In the expression: (y, foo y)
+ In the expression:
+ let
+ foo :: (F Int ~ [a]) => a -> Int
+ foo x = length [...]
+ in (y, foo y)
+ • Relevant bindings include
+ y :: a (bound at PushedInAsGivens.hs:9:5)
+ bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1)
diff --git a/testsuite/tests/indexed-types/should_compile/Records.hs b/testsuite/tests/indexed-types/should_compile/Records.hs
index 4a08125e30..8508c66f65 100644
--- a/testsuite/tests/indexed-types/should_compile/Records.hs
+++ b/testsuite/tests/indexed-types/should_compile/Records.hs
@@ -26,7 +26,7 @@ f r = r { moo = 3 }
class D c where
data D1 c
works :: Int -> D1 c -> D1 c
- buggy :: Int -> D1 c -> D1 c
+ buggy :: Int -> D1 c -> D1 c
buggy2 :: Int -> D1 c -> D1 c
instance D FooC where
@@ -34,7 +34,7 @@ instance D FooC where
works x d = d -- d unchanged, so OK
- buggy x d@(D1F { noo = k }) =
+ buggy x d@(D1F { noo = k }) =
d { noo = k + x }
buggy2 x d@(D1F { noo = k }) =
diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.stderr b/testsuite/tests/indexed-types/should_compile/Simple14.stderr
index 861013259c..395149121e 100644
--- a/testsuite/tests/indexed-types/should_compile/Simple14.stderr
+++ b/testsuite/tests/indexed-types/should_compile/Simple14.stderr
@@ -1,17 +1,18 @@
-
-Simple14.hs:8:8:
- Couldn't match type ‘z0’ with ‘z’
- ‘z0’ is untouchable
- inside the constraints: x ~ y
- bound by the type signature for: eqE :: (x ~ y) => EQ_ z0 z0
- at Simple14.hs:8:8-39
- ‘z’ is a rigid type variable bound by
- the type signature for: eqE :: EQ_ x y -> ((x ~ y) => EQ_ z z) -> p
- at Simple14.hs:8:8
- Expected type: EQ_ z0 z0
- Actual type: EQ_ z z
- In the ambiguity check for the type signature for ‘eqE’:
- eqE :: forall x y z p. EQ_ x y -> ((x ~ y) => EQ_ z z) -> p
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘eqE’:
- eqE :: EQ_ x y -> (x ~ y => EQ_ z z) -> p
+
+Simple14.hs:8:8: error:
+ Couldn't match type ‘z0’ with ‘z’
+ ‘z0’ is untouchable
+ inside the constraints: x ~ y
+ bound by the type signature for:
+ eqE :: (x ~ y) => EQ_ z0 z0
+ at Simple14.hs:8:8-39
+ ‘z’ is a rigid type variable bound by
+ the type signature for:
+ eqE :: forall x y z p. EQ_ x y -> ((x ~ y) => EQ_ z z) -> p
+ at Simple14.hs:8:8
+ Expected type: EQ_ z0 z0
+ Actual type: EQ_ z z
+ In the ambiguity check for ‘eqE’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature:
+ eqE :: EQ_ x y -> (x ~ y => EQ_ z z) -> p
diff --git a/testsuite/tests/indexed-types/should_compile/T3208b.stderr b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
index 10f3d2a26d..b40942a5a9 100644
--- a/testsuite/tests/indexed-types/should_compile/T3208b.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
@@ -1,24 +1,24 @@
-T3208b.hs:15:10:
- Could not deduce: OTerm o0 ~ STerm o0
- from the context: (OTerm a ~ STerm a, OBJECT a, SUBST a)
- bound by the type signature for:
- fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
- at T3208b.hs:14:9-56
- The type variable ‘o0’ is ambiguous
- In the expression: fce (apply f)
- In an equation for ‘fce'’: fce' f = fce (apply f)
+T3208b.hs:15:10: error:
+ • Could not deduce: OTerm o0 ~ STerm o0
+ from the context: (OTerm a ~ STerm a, OBJECT a, SUBST a)
+ bound by the type signature for:
+ fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
+ at T3208b.hs:14:1-56
+ The type variable ‘o0’ is ambiguous
+ • In the expression: fce (apply f)
+ In an equation for ‘fce'’: fce' f = fce (apply f)
-T3208b.hs:15:15:
- Could not deduce: OTerm o0 ~ STerm a
- from the context: (OTerm a ~ STerm a, OBJECT a, SUBST a)
- bound by the type signature for:
- fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
- at T3208b.hs:14:9-56
- The type variable ‘o0’ is ambiguous
- In the first argument of ‘fce’, namely ‘(apply f)’
- In the expression: fce (apply f)
- In an equation for ‘fce'’: fce' f = fce (apply f)
- Relevant bindings include
- f :: a (bound at T3208b.hs:15:6)
- fce' :: a -> c (bound at T3208b.hs:15:1)
+T3208b.hs:15:15: error:
+ • Could not deduce: OTerm o0 ~ STerm a
+ from the context: (OTerm a ~ STerm a, OBJECT a, SUBST a)
+ bound by the type signature for:
+ fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
+ at T3208b.hs:14:1-56
+ The type variable ‘o0’ is ambiguous
+ • In the first argument of ‘fce’, namely ‘(apply f)’
+ In the expression: fce (apply f)
+ In an equation for ‘fce'’: fce' f = fce (apply f)
+ • Relevant bindings include
+ f :: a (bound at T3208b.hs:15:6)
+ fce' :: a -> c (bound at T3208b.hs:15:1)
diff --git a/testsuite/tests/indexed-types/should_fail/BadSock.hs b/testsuite/tests/indexed-types/should_fail/BadSock.hs
index 3e72817b8d..c34c1657e6 100644
--- a/testsuite/tests/indexed-types/should_fail/BadSock.hs
+++ b/testsuite/tests/indexed-types/should_fail/BadSock.hs
@@ -27,8 +27,8 @@ data Socket :: SocketType -> * where
-> Socket sock
type family Foo (op :: SocketOperation) :: SocketType -> Constraint where
- Foo 'Read = Readable
- Foo Write = Writable
+ Foo 'Read = Readable
+ Foo Write = Writable
type family Operation (op :: SocketOperation) :: * where
Operation 'Read = IO Message
@@ -54,4 +54,4 @@ pull = undefined
readSocket :: forall sock . Readable sock => Socket sock -> IO Message
readSocket (Socket _ f) = f (SRead :: SockOp sock 'Read)
--} \ No newline at end of file
+-}
diff --git a/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr b/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
index 694a7832ad..7f806db271 100644
--- a/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
+++ b/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
@@ -1,14 +1,16 @@
-
-GADTwrong1.hs:12:21:
- Couldn't match expected type ‘b’ with actual type ‘c’
- ‘c’ is a rigid type variable bound by
- a pattern with constructor: T :: forall c. c -> T (Const c),
- in a case alternative
- at GADTwrong1.hs:12:14
- ‘b’ is a rigid type variable bound by
- the type signature for: coerce :: a -> b at GADTwrong1.hs:10:20
- In the expression: y
- In a case alternative: T y -> y
- Relevant bindings include
- y :: c (bound at GADTwrong1.hs:12:16)
- coerce :: a -> b (bound at GADTwrong1.hs:11:1)
+
+GADTwrong1.hs:12:21: error:
+ • Couldn't match expected type ‘b’ with actual type ‘c’
+ ‘c’ is a rigid type variable bound by
+ a pattern with constructor: T :: forall c. c -> T (Const c),
+ in a case alternative
+ at GADTwrong1.hs:12:14
+ ‘b’ is a rigid type variable bound by
+ the type signature for:
+ coerce :: forall a b. a -> b
+ at GADTwrong1.hs:10:20
+ • In the expression: y
+ In a case alternative: T y -> y
+ • Relevant bindings include
+ y :: c (bound at GADTwrong1.hs:12:16)
+ coerce :: a -> b (bound at GADTwrong1.hs:11:1)
diff --git a/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr b/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
index 5a0443bfa1..73f1cbc157 100644
--- a/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
+++ b/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
@@ -1,11 +1,10 @@
-
-NoMatchErr.hs:19:7:
- Couldn't match type ‘Memo d0’ with ‘Memo d’
- NB: ‘Memo’ is a type function, and may not be injective
- The type variable ‘d0’ is ambiguous
- Expected type: Memo d a -> Memo d a
- Actual type: Memo d0 a -> Memo d0 a
- In the ambiguity check for the type signature for ‘f’:
- f :: forall d a. Fun d => Memo d a -> Memo d a
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f’: f :: (Fun d) => Memo d a -> Memo d a
+
+NoMatchErr.hs:19:7: error:
+ Couldn't match type ‘Memo d0’ with ‘Memo d’
+ NB: ‘Memo’ is a type function, and may not be injective
+ The type variable ‘d0’ is ambiguous
+ Expected type: Memo d a -> Memo d a
+ Actual type: Memo d0 a -> Memo d0 a
+ In the ambiguity check for ‘f’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature: f :: (Fun d) => Memo d a -> Memo d a
diff --git a/testsuite/tests/indexed-types/should_fail/Overlap6.stderr b/testsuite/tests/indexed-types/should_fail/Overlap6.stderr
index b2dc99251f..6ffcda02ce 100644
--- a/testsuite/tests/indexed-types/should_fail/Overlap6.stderr
+++ b/testsuite/tests/indexed-types/should_fail/Overlap6.stderr
@@ -1,13 +1,14 @@
-Overlap6.hs:15:7:
- Couldn't match type ‘x’ with ‘And x 'True’
+Overlap6.hs:15:7: error:
+ • Couldn't match type ‘x’ with ‘And x 'True’
‘x’ is a rigid type variable bound by
- the type signature for: g :: Proxy x -> Proxy (And x 'True)
- at Overlap6.hs:14:6
- Expected type: Proxy (And x 'True)
- Actual type: Proxy x
- In the expression: x
- In an equation for ‘g’: g x = x
- Relevant bindings include
- x :: Proxy x (bound at Overlap6.hs:15:3)
- g :: Proxy x -> Proxy (And x 'True) (bound at Overlap6.hs:15:1)
+ the type signature for:
+ g :: forall (x :: Bool). Proxy x -> Proxy (And x 'True)
+ at Overlap6.hs:14:6
+ Expected type: Proxy (And x 'True)
+ Actual type: Proxy x
+ • In the expression: x
+ In an equation for ‘g’: g x = x
+ • Relevant bindings include
+ x :: Proxy x (bound at Overlap6.hs:15:3)
+ g :: Proxy x -> Proxy (And x 'True) (bound at Overlap6.hs:15:1)
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr
index 133eccf642..9a10408997 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr
@@ -1,6 +1,5 @@
-
-SimpleFail15.hs:5:8:
- Illegal polymorphic or qualified type: (a ~ b) => t
- Perhaps you intended to use RankNTypes or Rank2Types
- In the type signature for ‘foo’:
- foo :: (a, b) -> (a ~ b => t) -> (a, b)
+
+SimpleFail15.hs:5:8: error:
+ Illegal polymorphic or qualified type: (a ~ b) => t
+ Perhaps you intended to use RankNTypes or Rank2Types
+ In the type signature: foo :: (a, b) -> (a ~ b => t) -> (a, b)
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr
index 74db7b1dcf..fa635378a4 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr
@@ -1,5 +1,5 @@
-SimpleFail16.hs:10:12:
+SimpleFail16.hs:10:12: error:
Couldn't match expected type ‘p0 a0’ with actual type ‘F ()’
The type variables ‘p0’, ‘a0’ are ambiguous
In the first argument of ‘foo’, namely ‘(undefined :: F ())’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr
index 8288d30619..4b9c3657db 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr
@@ -1,12 +1,13 @@
-SimpleFail5a.hs:31:11:
- Couldn't match type ‘a’ with ‘Int’
+SimpleFail5a.hs:31:11: error:
+ • Couldn't match type ‘a’ with ‘Int’
‘a’ is a rigid type variable bound by
- the type signature for: bar3wrong :: S3 a -> a
- at SimpleFail5a.hs:30:14
- Expected type: S3 a
- Actual type: S3 Int
- In the pattern: D3Int
- In an equation for ‘bar3wrong’: bar3wrong D3Int = 1
- Relevant bindings include
- bar3wrong :: S3 a -> a (bound at SimpleFail5a.hs:31:1)
+ the type signature for:
+ bar3wrong :: forall a. S3 a -> a
+ at SimpleFail5a.hs:30:14
+ Expected type: S3 a
+ Actual type: S3 Int
+ • In the pattern: D3Int
+ In an equation for ‘bar3wrong’: bar3wrong D3Int = 1
+ • Relevant bindings include
+ bar3wrong :: S3 a -> a (bound at SimpleFail5a.hs:31:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T1897b.stderr b/testsuite/tests/indexed-types/should_fail/T1897b.stderr
index 936aa26924..459f6c8a17 100644
--- a/testsuite/tests/indexed-types/should_fail/T1897b.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T1897b.stderr
@@ -1,12 +1,13 @@
-T1897b.hs:16:1:
+T1897b.hs:16:1: error:
Couldn't match type ‘Depend a’ with ‘Depend a0’
NB: ‘Depend’ is a type function, and may not be injective
The type variable ‘a0’ is ambiguous
Expected type: t (Depend a) -> Bool
Actual type: t (Depend a0) -> Bool
- When checking that ‘isValid’ has the inferred type
+ In the ambiguity check for the inferred type for ‘isValid’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the inferred type
isValid :: forall a (t :: * -> *).
(Foldable t, Bug a) =>
t (Depend a) -> Bool
- Probable cause: the inferred type is ambiguous
diff --git a/testsuite/tests/indexed-types/should_fail/T1900.stderr b/testsuite/tests/indexed-types/should_fail/T1900.stderr
index f986888cfd..ce7d51c5de 100644
--- a/testsuite/tests/indexed-types/should_fail/T1900.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T1900.stderr
@@ -1,12 +1,11 @@
-T1900.hs:7:3:
+T1900.hs:7:3: error:
Couldn't match type ‘Depend s0’ with ‘Depend s’
NB: ‘Depend’ is a type function, and may not be injective
The type variable ‘s0’ is ambiguous
Expected type: Depend s -> Depend s
Actual type: Depend s0 -> Depend s0
- In the ambiguity check for the type signature for ‘trans’:
- trans :: forall s. Bug s => Depend s -> Depend s
+ In the ambiguity check for ‘trans’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the class method:
trans :: forall s. Bug s => Depend s -> Depend s
diff --git a/testsuite/tests/indexed-types/should_fail/T2693.stderr b/testsuite/tests/indexed-types/should_fail/T2693.stderr
index 182bbde8ed..d3546c21ba 100644
--- a/testsuite/tests/indexed-types/should_fail/T2693.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2693.stderr
@@ -1,38 +1,36 @@
-
-T2693.hs:11:7:
- Couldn't match expected type ‘TFn a’ with actual type ‘TFn a0’
- NB: ‘TFn’ is a type function, and may not be injective
- The type variable ‘a0’ is ambiguous
- When checking that ‘x’ has the inferred type
- x :: forall a. TFn a
- Probable cause: the inferred type is ambiguous
- In the expression:
- do { let Just x = ...;
- let n = fst x + fst x;
- return () }
- In an equation for ‘f’:
- f = do { let Just x = ...;
- let n = ...;
- return () }
-
-T2693.hs:19:15:
- Couldn't match expected type ‘(a5, b0)’ with actual type ‘TFn a2’
- The type variables ‘b0’, ‘a2’, ‘a5’ are ambiguous
- In the first argument of ‘fst’, namely ‘x’
- In the first argument of ‘(+)’, namely ‘fst x’
- Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
-
-T2693.hs:19:23:
- Couldn't match expected type ‘(a3, a5)’ with actual type ‘TFn a4’
- The type variables ‘a3’, ‘a4’, ‘a5’ are ambiguous
- In the first argument of ‘snd’, namely ‘x’
- In the second argument of ‘(+)’, namely ‘snd x’
- Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
-
-T2693.hs:29:20:
- Couldn't match type ‘TFn a0’ with ‘PVR a1’
- The type variables ‘a0’, ‘a1’ are ambiguous
- Expected type: () -> Maybe (PVR a1)
- Actual type: () -> Maybe (TFn a0)
- In the first argument of ‘mapM’, namely ‘g’
- In a stmt of a 'do' block: pvs <- mapM g undefined
+
+T2693.hs:12:15: error:
+ • Couldn't match expected type ‘(a8, b1)’ with actual type ‘TFn a6’
+ The type variables ‘b1’, ‘a6’, ‘a8’ are ambiguous
+ • In the first argument of ‘fst’, namely ‘x’
+ In the first argument of ‘(+)’, namely ‘fst x’
+ • Relevant bindings include n :: a8 (bound at T2693.hs:12:7)
+
+T2693.hs:12:23: error:
+ • Couldn't match expected type ‘(a8, b2)’ with actual type ‘TFn a7’
+ The type variables ‘b2’, ‘a7’, ‘a8’ are ambiguous
+ • In the first argument of ‘fst’, namely ‘x’
+ In the second argument of ‘(+)’, namely ‘fst x’
+ • Relevant bindings include n :: a8 (bound at T2693.hs:12:7)
+
+T2693.hs:19:15: error:
+ • Couldn't match expected type ‘(a5, b0)’ with actual type ‘TFn a2’
+ The type variables ‘b0’, ‘a2’, ‘a5’ are ambiguous
+ • In the first argument of ‘fst’, namely ‘x’
+ In the first argument of ‘(+)’, namely ‘fst x’
+ • Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
+
+T2693.hs:19:23: error:
+ • Couldn't match expected type ‘(a3, a5)’ with actual type ‘TFn a4’
+ The type variables ‘a3’, ‘a4’, ‘a5’ are ambiguous
+ • In the first argument of ‘snd’, namely ‘x’
+ In the second argument of ‘(+)’, namely ‘snd x’
+ • Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
+
+T2693.hs:29:20: error:
+ • Couldn't match type ‘TFn a0’ with ‘PVR a1’
+ The type variables ‘a0’, ‘a1’ are ambiguous
+ Expected type: () -> Maybe (PVR a1)
+ Actual type: () -> Maybe (TFn a0)
+ • In the first argument of ‘mapM’, namely ‘g’
+ In a stmt of a 'do' block: pvs <- mapM g undefined
diff --git a/testsuite/tests/indexed-types/should_fail/T3330a.stderr b/testsuite/tests/indexed-types/should_fail/T3330a.stderr
index a114158938..acefda7253 100644
--- a/testsuite/tests/indexed-types/should_fail/T3330a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3330a.stderr
@@ -1,44 +1,52 @@
-T3330a.hs:19:34:
- Couldn't match type ‘s’ with ‘(->) (s0 ix0 -> ix1)’
+T3330a.hs:19:34: error:
+ • Couldn't match type ‘s’ with ‘(->) (s0 ix0 -> ix1)’
‘s’ is a rigid type variable bound by
- the type signature for: children :: s ix -> PF s r ix -> [AnyF s]
- at T3330a.hs:18:13
- Expected type: (s0 ix0 -> ix1)
- -> r ix1 -> Writer [AnyF s] (r'0 ix1)
- Actual type: s ix
- In the first argument of ‘hmapM’, namely ‘p’
- In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’
- Relevant bindings include
- x :: PF s r ix (bound at T3330a.hs:19:12)
- p :: s ix (bound at T3330a.hs:19:10)
- children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1)
+ the type signature for:
+ children :: forall (s :: * -> *) ix (r :: * -> *).
+ s ix -> PF s r ix -> [AnyF s]
+ at T3330a.hs:18:13
+ Expected type: (s0 ix0 -> ix1)
+ -> r ix1 -> Writer [AnyF s] (r'0 ix1)
+ Actual type: s ix
+ • In the first argument of ‘hmapM’, namely ‘p’
+ In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’
+ • Relevant bindings include
+ x :: PF s r ix (bound at T3330a.hs:19:12)
+ p :: s ix (bound at T3330a.hs:19:10)
+ children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1)
-T3330a.hs:19:34:
- Couldn't match type ‘ix’ with ‘r ix1 -> Writer [AnyF s] (r'0 ix1)’
+T3330a.hs:19:34: error:
+ • Couldn't match type ‘ix’
+ with ‘r ix1 -> Writer [AnyF s] (r'0 ix1)’
‘ix’ is a rigid type variable bound by
- the type signature for: children :: s ix -> PF s r ix -> [AnyF s]
- at T3330a.hs:18:13
- Expected type: (s0 ix0 -> ix1)
- -> r ix1 -> Writer [AnyF s] (r'0 ix1)
- Actual type: s ix
- In the first argument of ‘hmapM’, namely ‘p’
- In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’
- Relevant bindings include
- x :: PF s r ix (bound at T3330a.hs:19:12)
- p :: s ix (bound at T3330a.hs:19:10)
- children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1)
+ the type signature for:
+ children :: forall (s :: * -> *) ix (r :: * -> *).
+ s ix -> PF s r ix -> [AnyF s]
+ at T3330a.hs:18:13
+ Expected type: (s0 ix0 -> ix1)
+ -> r ix1 -> Writer [AnyF s] (r'0 ix1)
+ Actual type: s ix
+ • In the first argument of ‘hmapM’, namely ‘p’
+ In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’
+ • Relevant bindings include
+ x :: PF s r ix (bound at T3330a.hs:19:12)
+ p :: s ix (bound at T3330a.hs:19:10)
+ children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1)
-T3330a.hs:19:44:
- Couldn't match type ‘ix’ with ‘r0 ix0 -> Writer [AnyF s0] (r0 ix0)’
+T3330a.hs:19:44: error:
+ • Couldn't match type ‘ix’
+ with ‘r0 ix0 -> Writer [AnyF s0] (r0 ix0)’
‘ix’ is a rigid type variable bound by
- the type signature for: children :: s ix -> PF s r ix -> [AnyF s]
- at T3330a.hs:18:13
- Expected type: PF s r (r0 ix0 -> Writer [AnyF s0] (r0 ix0))
- Actual type: PF s r ix
- In the third argument of ‘hmapM’, namely ‘x’
- In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’
- Relevant bindings include
- x :: PF s r ix (bound at T3330a.hs:19:12)
- p :: s ix (bound at T3330a.hs:19:10)
- children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1)
+ the type signature for:
+ children :: forall (s :: * -> *) ix (r :: * -> *).
+ s ix -> PF s r ix -> [AnyF s]
+ at T3330a.hs:18:13
+ Expected type: PF s r (r0 ix0 -> Writer [AnyF s0] (r0 ix0))
+ Actual type: PF s r ix
+ • In the third argument of ‘hmapM’, namely ‘x’
+ In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’
+ • Relevant bindings include
+ x :: PF s r ix (bound at T3330a.hs:19:12)
+ p :: s ix (bound at T3330a.hs:19:10)
+ children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T3440.stderr b/testsuite/tests/indexed-types/should_fail/T3440.stderr
index cfc5570c66..7b29bb6f52 100644
--- a/testsuite/tests/indexed-types/should_fail/T3440.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3440.stderr
@@ -1,22 +1,23 @@
-T3440.hs:11:22:
- Could not deduce: a1 ~ a
- from the context: Fam a ~ Fam a1
- bound by a pattern with constructor:
- GADT :: forall a. a -> Fam a -> GADT (Fam a),
- in an equation for ‘unwrap’
- at T3440.hs:11:9-16
+T3440.hs:11:22: error:
+ • Could not deduce: a1 ~ a
+ from the context: Fam a ~ Fam a1
+ bound by a pattern with constructor:
+ GADT :: forall a. a -> Fam a -> GADT (Fam a),
+ in an equation for ‘unwrap’
+ at T3440.hs:11:9-16
‘a1’ is a rigid type variable bound by
- a pattern with constructor:
- GADT :: forall a. a -> Fam a -> GADT (Fam a),
- in an equation for ‘unwrap’
- at T3440.hs:11:9
+ a pattern with constructor:
+ GADT :: forall a. a -> Fam a -> GADT (Fam a),
+ in an equation for ‘unwrap’
+ at T3440.hs:11:9
‘a’ is a rigid type variable bound by
- the type signature for: unwrap :: GADT (Fam a) -> (a, Fam a)
- at T3440.hs:10:11
- In the expression: x
- In the expression: (x, y)
- Relevant bindings include
- y :: Fam a1 (bound at T3440.hs:11:16)
- x :: a1 (bound at T3440.hs:11:14)
- unwrap :: GADT (Fam a) -> (a, Fam a) (bound at T3440.hs:11:1)
+ the type signature for:
+ unwrap :: forall a. GADT (Fam a) -> (a, Fam a)
+ at T3440.hs:10:11
+ • In the expression: x
+ In the expression: (x, y)
+ • Relevant bindings include
+ y :: Fam a1 (bound at T3440.hs:11:16)
+ x :: a1 (bound at T3440.hs:11:14)
+ unwrap :: GADT (Fam a) -> (a, Fam a) (bound at T3440.hs:11:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T4093a.stderr b/testsuite/tests/indexed-types/should_fail/T4093a.stderr
index efeb34a94a..8f46170339 100644
--- a/testsuite/tests/indexed-types/should_fail/T4093a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4093a.stderr
@@ -1,14 +1,16 @@
T4093a.hs:8:8: error:
- Could not deduce: e ~ ()
- from the context: Foo e ~ Maybe e
- bound by the type signature for: hang :: (Foo e ~ Maybe e) => Foo e
- at T4093a.hs:7:9-34
+ • Could not deduce: e ~ ()
+ from the context: Foo e ~ Maybe e
+ bound by the type signature for:
+ hang :: (Foo e ~ Maybe e) => Foo e
+ at T4093a.hs:7:1-34
‘e’ is a rigid type variable bound by
- the type signature for: hang :: (Foo e ~ Maybe e) => Foo e
- at T4093a.hs:7:9
- Expected type: Foo e
- Actual type: Maybe ()
- In the expression: Just ()
- In an equation for ‘hang’: hang = Just ()
- Relevant bindings include hang :: Foo e (bound at T4093a.hs:8:1)
+ the type signature for:
+ hang :: forall e. (Foo e ~ Maybe e) => Foo e
+ at T4093a.hs:7:9
+ Expected type: Foo e
+ Actual type: Maybe ()
+ • In the expression: Just ()
+ In an equation for ‘hang’: hang = Just ()
+ • Relevant bindings include hang :: Foo e (bound at T4093a.hs:8:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T4093b.stderr b/testsuite/tests/indexed-types/should_fail/T4093b.stderr
index 53d7844f4f..0950de8c66 100644
--- a/testsuite/tests/indexed-types/should_fail/T4093b.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4093b.stderr
@@ -1,41 +1,42 @@
-T4093b.hs:31:13:
- Could not deduce: e ~ C
- from the context: (EitherCO e (A C O n) (A O O n) ~ A e O n,
- EitherCO x (A C C n) (A C O n) ~ A C x n)
- bound by the type signature for:
- blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n,
- EitherCO x (A C C n) (A C O n) ~ A C x n) =>
- Block n e x -> A e x n
- at T4093b.hs:(20,3)-(22,26)
+T4093b.hs:31:13: error:
+ • Could not deduce: e ~ C
+ from the context: (EitherCO e (A C O n) (A O O n) ~ A e O n,
+ EitherCO x (A C C n) (A C O n) ~ A C x n)
+ bound by the type signature for:
+ blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n,
+ EitherCO x (A C C n) (A C O n) ~ A C x n) =>
+ Block n e x -> A e x n
+ at T4093b.hs:(19,1)-(22,26)
‘e’ is a rigid type variable bound by
- the type signature for:
- blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n,
+ the type signature for:
+ blockToNodeList :: forall (n :: * -> * -> *) e x.
+ (EitherCO e (A C O n) (A O O n) ~ A e O n,
EitherCO x (A C C n) (A C O n) ~ A C x n) =>
Block n e x -> A e x n
- at T4093b.hs:20:12
- Expected type: EitherCO e (A C O n) (A O O n)
- Actual type: (MaybeC C (n C O), MaybeC O (n O C))
- In the expression: (JustC n, NothingC)
- In an equation for ‘f’: f n _ = (JustC n, NothingC)
- In an equation for ‘blockToNodeList’:
- blockToNodeList b
- = foldBlockNodesF (f, l) b z
- where
- z ::
- EitherCO e (EitherCO e (A C O n) (A O O n)) (EitherCO e (A C O n) (A O O n))
- z = undefined
- f ::
- n C O
- -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C O n) (A O O n)
- f n _ = (JustC n, NothingC)
- ....
- Relevant bindings include
- f :: n C O
- -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C O n) (A O O n)
- (bound at T4093b.hs:31:5)
- l :: n O C
- -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C C n) (A O C n)
- (bound at T4093b.hs:34:5)
- b :: Block n e x (bound at T4093b.hs:25:17)
- blockToNodeList :: Block n e x -> A e x n (bound at T4093b.hs:25:1)
+ at T4093b.hs:20:12
+ Expected type: EitherCO e (A C O n) (A O O n)
+ Actual type: (MaybeC C (n C O), MaybeC O (n O C))
+ • In the expression: (JustC n, NothingC)
+ In an equation for ‘f’: f n _ = (JustC n, NothingC)
+ In an equation for ‘blockToNodeList’:
+ blockToNodeList b
+ = foldBlockNodesF (f, l) b z
+ where
+ z ::
+ EitherCO e (EitherCO e (A C O n) (A O O n)) (EitherCO e (A C O n) (A O O n))
+ z = undefined
+ f ::
+ n C O
+ -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C O n) (A O O n)
+ f n _ = (JustC n, NothingC)
+ ....
+ • Relevant bindings include
+ f :: n C O
+ -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C O n) (A O O n)
+ (bound at T4093b.hs:31:5)
+ l :: n O C
+ -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C C n) (A O C n)
+ (bound at T4093b.hs:34:5)
+ b :: Block n e x (bound at T4093b.hs:25:17)
+ blockToNodeList :: Block n e x -> A e x n (bound at T4093b.hs:25:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T4174.stderr b/testsuite/tests/indexed-types/should_fail/T4174.stderr
index 872004519e..60ae24ccfa 100644
--- a/testsuite/tests/indexed-types/should_fail/T4174.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4174.stderr
@@ -1,28 +1,32 @@
-T4174.hs:42:12:
- Couldn't match type ‘a’ with ‘SmStep’
+T4174.hs:42:12: error:
+ • Couldn't match type ‘a’ with ‘SmStep’
‘a’ is a rigid type variable bound by
- the type signature for:
- testcase :: Monad m => m (Field (Way (GHC6'8 minor) n t p) a b)
- at T4174.hs:41:13
- Expected type: m (Field (Way (GHC6'8 minor) n t p) a b)
- Actual type: m (Field (WayOf m) SmStep RtsSpinLock)
- In the expression: sync_large_objects
- In an equation for ‘testcase’: testcase = sync_large_objects
- Relevant bindings include
- testcase :: m (Field (Way (GHC6'8 minor) n t p) a b)
- (bound at T4174.hs:42:1)
+ the type signature for:
+ testcase :: forall (m :: * -> *) minor n t p a b.
+ Monad m =>
+ m (Field (Way (GHC6'8 minor) n t p) a b)
+ at T4174.hs:41:13
+ Expected type: m (Field (Way (GHC6'8 minor) n t p) a b)
+ Actual type: m (Field (WayOf m) SmStep RtsSpinLock)
+ • In the expression: sync_large_objects
+ In an equation for ‘testcase’: testcase = sync_large_objects
+ • Relevant bindings include
+ testcase :: m (Field (Way (GHC6'8 minor) n t p) a b)
+ (bound at T4174.hs:42:1)
-T4174.hs:42:12:
- Couldn't match type ‘b’ with ‘RtsSpinLock’
+T4174.hs:42:12: error:
+ • Couldn't match type ‘b’ with ‘RtsSpinLock’
‘b’ is a rigid type variable bound by
- the type signature for:
- testcase :: Monad m => m (Field (Way (GHC6'8 minor) n t p) a b)
- at T4174.hs:41:13
- Expected type: m (Field (Way (GHC6'8 minor) n t p) a b)
- Actual type: m (Field (WayOf m) SmStep RtsSpinLock)
- In the expression: sync_large_objects
- In an equation for ‘testcase’: testcase = sync_large_objects
- Relevant bindings include
- testcase :: m (Field (Way (GHC6'8 minor) n t p) a b)
- (bound at T4174.hs:42:1)
+ the type signature for:
+ testcase :: forall (m :: * -> *) minor n t p a b.
+ Monad m =>
+ m (Field (Way (GHC6'8 minor) n t p) a b)
+ at T4174.hs:41:13
+ Expected type: m (Field (Way (GHC6'8 minor) n t p) a b)
+ Actual type: m (Field (WayOf m) SmStep RtsSpinLock)
+ • In the expression: sync_large_objects
+ In an equation for ‘testcase’: testcase = sync_large_objects
+ • Relevant bindings include
+ testcase :: m (Field (Way (GHC6'8 minor) n t p) a b)
+ (bound at T4174.hs:42:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T4272.stderr b/testsuite/tests/indexed-types/should_fail/T4272.stderr
index 84d50dc69f..a3b750a459 100644
--- a/testsuite/tests/indexed-types/should_fail/T4272.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4272.stderr
@@ -1,16 +1,17 @@
-T4272.hs:15:26:
- Couldn't match type ‘a’ with ‘TermFamily a a’
+T4272.hs:15:26: error:
+ • Couldn't match type ‘a’ with ‘TermFamily a a’
‘a’ is a rigid type variable bound by
- the type signature for: laws :: TermLike a => TermFamily a a -> b
- at T4272.hs:14:16
- Expected type: TermFamily a (TermFamily a a)
- Actual type: TermFamily a a
- In the first argument of ‘terms’, namely
- ‘(undefined :: TermFamily a a)’
- In the second argument of ‘prune’, namely
- ‘(terms (undefined :: TermFamily a a))’
- In the expression: prune t (terms (undefined :: TermFamily a a))
- Relevant bindings include
- t :: TermFamily a a (bound at T4272.hs:15:6)
- laws :: TermFamily a a -> b (bound at T4272.hs:15:1)
+ the type signature for:
+ laws :: forall a b. TermLike a => TermFamily a a -> b
+ at T4272.hs:14:16
+ Expected type: TermFamily a (TermFamily a a)
+ Actual type: TermFamily a a
+ • In the first argument of ‘terms’, namely
+ ‘(undefined :: TermFamily a a)’
+ In the second argument of ‘prune’, namely
+ ‘(terms (undefined :: TermFamily a a))’
+ In the expression: prune t (terms (undefined :: TermFamily a a))
+ • Relevant bindings include
+ t :: TermFamily a a (bound at T4272.hs:15:6)
+ laws :: TermFamily a a -> b (bound at T4272.hs:15:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T7194.stderr b/testsuite/tests/indexed-types/should_fail/T7194.stderr
index b28868abdb..d8655f0146 100644
--- a/testsuite/tests/indexed-types/should_fail/T7194.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7194.stderr
@@ -1,13 +1,14 @@
-T7194.hs:18:35:
- Couldn't match expected type ‘b0’ with actual type ‘F a’
- because type variable ‘a’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for: g :: C (F a) => a -> Int
- at T7194.hs:17:23-41
- In the expression: foo y
- In the first argument of ‘length’, namely ‘[x, foo y]’
- Relevant bindings include
- y :: a (bound at T7194.hs:18:20)
- g :: a -> Int (bound at T7194.hs:18:18)
- x :: b0 (bound at T7194.hs:17:9)
+T7194.hs:18:35: error:
+ • Couldn't match expected type ‘b0’ with actual type ‘F a’
+ because type variable ‘a’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ g :: C (F a) => a -> Int
+ at T7194.hs:17:18-41
+ • In the expression: foo y
+ In the first argument of ‘length’, namely ‘[x, foo y]’
+ • Relevant bindings include
+ y :: a (bound at T7194.hs:18:20)
+ g :: a -> Int (bound at T7194.hs:18:18)
+ x :: b0 (bound at T7194.hs:17:9)
diff --git a/testsuite/tests/indexed-types/should_fail/T9036.stderr b/testsuite/tests/indexed-types/should_fail/T9036.stderr
index 2fdf9c6557..3bae5a6ef2 100644
--- a/testsuite/tests/indexed-types/should_fail/T9036.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9036.stderr
@@ -1,13 +1,11 @@
-
-T9036.hs:17:17:
- Couldn't match type ‘Curried t0 [t0]’ with ‘Curried t [t]’
- NB: ‘Curried’ is a type function, and may not be injective
- The type variable ‘t0’ is ambiguous
- Expected type: Maybe (GetMonad t after) -> Curried t [t]
- Actual type: Maybe (GetMonad t0 after) -> Curried t0 [t0]
- In the ambiguity check for the type signature for ‘simpleLogger’:
- simpleLogger :: forall t after.
- Maybe (GetMonad t after) -> Curried t [t]
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘simpleLogger’:
- simpleLogger :: Maybe (GetMonad t after) -> t `Curried` [t]
+
+T9036.hs:17:17: error:
+ Couldn't match type ‘Curried t0 [t0]’ with ‘Curried t [t]’
+ NB: ‘Curried’ is a type function, and may not be injective
+ The type variable ‘t0’ is ambiguous
+ Expected type: Maybe (GetMonad t after) -> Curried t [t]
+ Actual type: Maybe (GetMonad t0 after) -> Curried t0 [t0]
+ In the ambiguity check for ‘simpleLogger’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature:
+ simpleLogger :: Maybe (GetMonad t after) -> t `Curried` [t]
diff --git a/testsuite/tests/indexed-types/should_fail/T9171.stderr b/testsuite/tests/indexed-types/should_fail/T9171.stderr
index 28c1a2373f..9a618c50bf 100644
--- a/testsuite/tests/indexed-types/should_fail/T9171.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9171.stderr
@@ -1,22 +1,11 @@
-
-T9171.hs:10:1:
- Couldn't match expected type ‘GetParam Base (GetParam Base Int)’
- with actual type ‘GetParam Base (GetParam Base Int)’
- NB: ‘GetParam’ is a type function, and may not be injective
- The kind variable ‘k0’ is ambiguous
- Use -fprint-explicit-kinds to see the kind arguments
- When checking that ‘foo’ has the inferred type
- foo :: forall (k :: BOX). GetParam Base (GetParam Base Int)
- Probable cause: the inferred type is ambiguous
-
-T9171.hs:10:20:
- Couldn't match expected type ‘GetParam Base (GetParam Base Int)’
- with actual type ‘GetParam Base (GetParam Base Int)’
- NB: ‘GetParam’ is a type function, and may not be injective
- The kind variable ‘k0’ is ambiguous
- Use -fprint-explicit-kinds to see the kind arguments
- In the ambiguity check for an expression type signature:
- forall (k :: BOX). GetParam Base (GetParam Base Int)
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In an expression type signature: GetParam Base (GetParam Base Int)
- In the expression: undefined :: GetParam Base (GetParam Base Int)
+
+T9171.hs:10:20: error:
+ Couldn't match expected type ‘GetParam Base (GetParam Base Int)’
+ with actual type ‘GetParam Base (GetParam Base Int)’
+ NB: ‘GetParam’ is a type function, and may not be injective
+ The kind variable ‘k0’ is ambiguous
+ Use -fprint-explicit-kinds to see the kind arguments
+ In the ambiguity check for an expression type signature
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In an expression type signature: GetParam Base (GetParam Base Int)
+ In the expression: undefined :: GetParam Base (GetParam Base Int)
diff --git a/testsuite/tests/indexed-types/should_fail/T9433.stderr b/testsuite/tests/indexed-types/should_fail/T9433.stderr
index bd4ab42878..73dfe9e900 100644
--- a/testsuite/tests/indexed-types/should_fail/T9433.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9433.stderr
@@ -1,4 +1,4 @@
T9433.hs:14:6: error:
The type family ‘Id’ should have 1 argument, but has been given none
- In the type signature for ‘x’: x :: Map Id [Bool]
+ In the type signature: x :: Map Id [Bool]
diff --git a/testsuite/tests/indexed-types/should_fail/T9662.stderr b/testsuite/tests/indexed-types/should_fail/T9662.stderr
index 3c800183a1..2d55f9dcea 100644
--- a/testsuite/tests/indexed-types/should_fail/T9662.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9662.stderr
@@ -1,84 +1,84 @@
T9662.hs:49:7: error:
- Couldn't match type ‘k’ with ‘n’
+ • Couldn't match type ‘k’ with ‘n’
‘k’ is a rigid type variable bound by
- the type signature for:
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
- at T9662.hs:44:9
+ the type signature for:
+ test :: forall sh k m n.
+ Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k)
+ at T9662.hs:44:9
‘n’ is a rigid type variable bound by
- the type signature for:
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
- at T9662.hs:44:9
- Expected type: Exp (((sh :. m) :. n) :. k)
- -> Exp (((sh :. k) :. m) :. n)
- Actual type: Exp (((sh :. k) :. m) :. n)
- -> Exp (((sh :. k) :. m) :. n)
- In the second argument of ‘backpermute’, namely ‘id’
- In the expression:
- backpermute
- (modify
- (atom :. atom :. atom :. atom)
- (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k)))
- id
- Relevant bindings include
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
- (bound at T9662.hs:45:1)
+ the type signature for:
+ test :: forall sh k m n.
+ Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k)
+ at T9662.hs:44:9
+ Expected type: Exp (((sh :. m) :. n) :. k)
+ -> Exp (((sh :. k) :. m) :. n)
+ Actual type: Exp (((sh :. k) :. m) :. n)
+ -> Exp (((sh :. k) :. m) :. n)
+ • In the second argument of ‘backpermute’, namely ‘id’
+ In the expression:
+ backpermute
+ (modify
+ (atom :. atom :. atom :. atom)
+ (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k)))
+ id
+ • Relevant bindings include
+ test :: Shape (((sh :. k) :. m) :. n)
+ -> Shape (((sh :. m) :. n) :. k)
+ (bound at T9662.hs:45:1)
T9662.hs:49:7: error:
- Couldn't match type ‘m’ with ‘k’
+ • Couldn't match type ‘m’ with ‘k’
‘m’ is a rigid type variable bound by
- the type signature for:
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
- at T9662.hs:44:9
+ the type signature for:
+ test :: forall sh k m n.
+ Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k)
+ at T9662.hs:44:9
‘k’ is a rigid type variable bound by
- the type signature for:
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
- at T9662.hs:44:9
- Expected type: Exp (((sh :. m) :. n) :. k)
- -> Exp (((sh :. k) :. m) :. n)
- Actual type: Exp (((sh :. k) :. m) :. n)
- -> Exp (((sh :. k) :. m) :. n)
- In the second argument of ‘backpermute’, namely ‘id’
- In the expression:
- backpermute
- (modify
- (atom :. atom :. atom :. atom)
- (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k)))
- id
- Relevant bindings include
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
- (bound at T9662.hs:45:1)
+ the type signature for:
+ test :: forall sh k m n.
+ Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k)
+ at T9662.hs:44:9
+ Expected type: Exp (((sh :. m) :. n) :. k)
+ -> Exp (((sh :. k) :. m) :. n)
+ Actual type: Exp (((sh :. k) :. m) :. n)
+ -> Exp (((sh :. k) :. m) :. n)
+ • In the second argument of ‘backpermute’, namely ‘id’
+ In the expression:
+ backpermute
+ (modify
+ (atom :. atom :. atom :. atom)
+ (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k)))
+ id
+ • Relevant bindings include
+ test :: Shape (((sh :. k) :. m) :. n)
+ -> Shape (((sh :. m) :. n) :. k)
+ (bound at T9662.hs:45:1)
T9662.hs:49:7: error:
- Couldn't match type ‘n’ with ‘m’
+ • Couldn't match type ‘n’ with ‘m’
‘n’ is a rigid type variable bound by
- the type signature for:
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
- at T9662.hs:44:9
+ the type signature for:
+ test :: forall sh k m n.
+ Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k)
+ at T9662.hs:44:9
‘m’ is a rigid type variable bound by
- the type signature for:
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
- at T9662.hs:44:9
- Expected type: Exp (((sh :. m) :. n) :. k)
- -> Exp (((sh :. k) :. m) :. n)
- Actual type: Exp (((sh :. k) :. m) :. n)
- -> Exp (((sh :. k) :. m) :. n)
- In the second argument of ‘backpermute’, namely ‘id’
- In the expression:
- backpermute
- (modify
- (atom :. atom :. atom :. atom)
- (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k)))
- id
- Relevant bindings include
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
- (bound at T9662.hs:45:1)
+ the type signature for:
+ test :: forall sh k m n.
+ Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k)
+ at T9662.hs:44:9
+ Expected type: Exp (((sh :. m) :. n) :. k)
+ -> Exp (((sh :. k) :. m) :. n)
+ Actual type: Exp (((sh :. k) :. m) :. n)
+ -> Exp (((sh :. k) :. m) :. n)
+ • In the second argument of ‘backpermute’, namely ‘id’
+ In the expression:
+ backpermute
+ (modify
+ (atom :. atom :. atom :. atom)
+ (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k)))
+ id
+ • Relevant bindings include
+ test :: Shape (((sh :. k) :. m) :. n)
+ -> Shape (((sh :. m) :. n) :. k)
+ (bound at T9662.hs:45:1)
diff --git a/testsuite/tests/module/mod98.stderr b/testsuite/tests/module/mod98.stderr
index 0a6a23d124..86a970ccdf 100644
--- a/testsuite/tests/module/mod98.stderr
+++ b/testsuite/tests/module/mod98.stderr
@@ -1,4 +1,4 @@
-
-mod98.hs:3:1:
- Invalid type signature: M.x :: Char
- Should be of form <variable> :: <type>
+
+mod98.hs:3:1: error:
+ Invalid type signature: M.x :: ...
+ Should be of form <variable> :: <type>
diff --git a/testsuite/tests/monadfail/MonadFailErrors.stderr b/testsuite/tests/monadfail/MonadFailErrors.stderr
index 8a478eecf3..84334b980b 100644
--- a/testsuite/tests/monadfail/MonadFailErrors.stderr
+++ b/testsuite/tests/monadfail/MonadFailErrors.stderr
@@ -6,7 +6,7 @@ MonadFailErrors.hs:16:5: error:
from the context: Monad m
bound by the type signature for:
general :: Monad m => m a
- at MonadFailErrors.hs:14:12-25
+ at MonadFailErrors.hs:14:1-25
Possible fix:
add (MonadFail m) to the context of
the type signature for:
diff --git a/testsuite/tests/monadfail/MonadFailWarnings.stderr b/testsuite/tests/monadfail/MonadFailWarnings.stderr
index 94858c1945..3d05126623 100644
--- a/testsuite/tests/monadfail/MonadFailWarnings.stderr
+++ b/testsuite/tests/monadfail/MonadFailWarnings.stderr
@@ -1,60 +1,60 @@
MonadFailWarnings.hs:19:5: warning:
- Could not deduce (MonadFail m)
- arising from the failable pattern ‘Just x’
- (this will become an error a future GHC release)
- from the context: Monad m
- bound by the type signature for:
- general :: Monad m => m a
- at MonadFailWarnings.hs:17:12-25
- Possible fix:
- add (MonadFail m) to the context of
- the type signature for:
- general :: Monad m => m a
- In a stmt of a 'do' block: Just x <- undefined
- In the expression:
- do { Just x <- undefined;
- undefined }
- In an equation for ‘general’:
- general
- = do { Just x <- undefined;
- undefined }
+ • Could not deduce (MonadFail m)
+ arising from the failable pattern ‘Just x’
+ (this will become an error a future GHC release)
+ from the context: Monad m
+ bound by the type signature for:
+ general :: Monad m => m a
+ at MonadFailWarnings.hs:17:1-25
+ Possible fix:
+ add (MonadFail m) to the context of
+ the type signature for:
+ general :: Monad m => m a
+ • In a stmt of a 'do' block: Just x <- undefined
+ In the expression:
+ do { Just x <- undefined;
+ undefined }
+ In an equation for ‘general’:
+ general
+ = do { Just x <- undefined;
+ undefined }
MonadFailWarnings.hs:35:5: warning:
- No instance for (MonadFail Identity)
- arising from the failable pattern ‘Just x’
- (this will become an error a future GHC release)
- In a stmt of a 'do' block: Just x <- undefined
- In the expression:
- do { Just x <- undefined;
- undefined }
- In an equation for ‘identity’:
- identity
- = do { Just x <- undefined;
- undefined }
+ • No instance for (MonadFail Identity)
+ arising from the failable pattern ‘Just x’
+ (this will become an error a future GHC release)
+ • In a stmt of a 'do' block: Just x <- undefined
+ In the expression:
+ do { Just x <- undefined;
+ undefined }
+ In an equation for ‘identity’:
+ identity
+ = do { Just x <- undefined;
+ undefined }
MonadFailWarnings.hs:51:5: warning:
- No instance for (MonadFail (ST s))
- arising from the failable pattern ‘Just x’
- (this will become an error a future GHC release)
- In a stmt of a 'do' block: Just x <- undefined
- In the expression:
- do { Just x <- undefined;
- undefined }
- In an equation for ‘st’:
- st
- = do { Just x <- undefined;
- undefined }
+ • No instance for (MonadFail (ST s))
+ arising from the failable pattern ‘Just x’
+ (this will become an error a future GHC release)
+ • In a stmt of a 'do' block: Just x <- undefined
+ In the expression:
+ do { Just x <- undefined;
+ undefined }
+ In an equation for ‘st’:
+ st
+ = do { Just x <- undefined;
+ undefined }
MonadFailWarnings.hs:59:5: warning:
- No instance for (MonadFail ((->) r))
- arising from the failable pattern ‘Just x’
- (this will become an error a future GHC release)
- In a stmt of a 'do' block: Just x <- undefined
- In the expression:
- do { Just x <- undefined;
- undefined }
- In an equation for ‘reader’:
- reader
- = do { Just x <- undefined;
- undefined }
+ • No instance for (MonadFail ((->) r))
+ arising from the failable pattern ‘Just x’
+ (this will become an error a future GHC release)
+ • In a stmt of a 'do' block: Just x <- undefined
+ In the expression:
+ do { Just x <- undefined;
+ undefined }
+ In an equation for ‘reader’:
+ reader
+ = do { Just x <- undefined;
+ undefined }
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr
index 1631c6de6d..b9d3bba31b 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr
@@ -26,6 +26,6 @@ overloadedlabelsfail01.hs:13:5: error:
from the context: IsLabel "x" t
bound by the type signature for:
c :: IsLabel "x" t => t
- at overloadedlabelsfail01.hs:12:6-23
+ at overloadedlabelsfail01.hs:12:1-23
In the expression: #y
In an equation for ‘c’: c = #y
diff --git a/testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr b/testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr
index b31ec8319e..ebb15492a1 100644
--- a/testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr
+++ b/testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr
@@ -1,4 +1,4 @@
-
-NoPatternSynonyms.hs:3:1: error:
- Invalid type signature: pattern P :: G Int
- Perhaps you meant to use PatternSynonyms?
+
+NoPatternSynonyms.hs:3:1: error:
+ Invalid type signature: pattern P :: ...
+ Perhaps you meant to use PatternSynonyms?
diff --git a/testsuite/tests/parser/should_fail/T3811.stderr b/testsuite/tests/parser/should_fail/T3811.stderr
index afdead696e..e945f51e5e 100644
--- a/testsuite/tests/parser/should_fail/T3811.stderr
+++ b/testsuite/tests/parser/should_fail/T3811.stderr
@@ -1,4 +1,4 @@
-
-T3811.hs:4:1:
- Invalid type signature: f x :: Char
- Should be of form <variable> :: <type>
+
+T3811.hs:4:1: error:
+ Invalid type signature: f x :: ...
+ Should be of form <variable> :: <type>
diff --git a/testsuite/tests/parser/should_fail/T7848.stderr b/testsuite/tests/parser/should_fail/T7848.stderr
index 902f303649..402dc642b0 100644
--- a/testsuite/tests/parser/should_fail/T7848.stderr
+++ b/testsuite/tests/parser/should_fail/T7848.stderr
@@ -1,43 +1,45 @@
T7848.hs:6:57: error:
- Occurs check: cannot construct the infinite type:
- t2 ~ t0 -> t -> t1 -> A -> A -> A -> A -> t2
- In the expression: y
- In an equation for ‘x’:
- x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
- = y
- where
- infixl 3 `y`
- y _ = (&)
- {-# INLINE (&) #-}
- {-# SPECIALIZE (&) :: a #-}
- (&) = x
- Relevant bindings include
- y :: forall t4. t4 -> t -> t1 -> A -> A -> A -> A -> t2
- (bound at T7848.hs:8:9)
- (&) :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:11:9)
- z :: t1 (bound at T7848.hs:6:12)
- (&) :: t1 (bound at T7848.hs:6:8)
- (+) :: t (bound at T7848.hs:6:3)
- x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
+ • Occurs check: cannot construct the infinite type:
+ t2 ~ t0 -> t -> t1 -> A -> A -> A -> A -> t2
+ • In the expression: y
+ In an equation for ‘x’:
+ x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
+ = y
+ where
+ infixl 3 `y`
+ y _ = (&)
+ {-# INLINE (&) #-}
+ {-# SPECIALIZE (&) :: a #-}
+ (&) = x
+ • Relevant bindings include
+ y :: forall t4. t4 -> t -> t1 -> A -> A -> A -> A -> t2
+ (bound at T7848.hs:8:9)
+ (&) :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:11:9)
+ z :: t1 (bound at T7848.hs:6:12)
+ (&) :: t1 (bound at T7848.hs:6:8)
+ (+) :: t (bound at T7848.hs:6:3)
+ x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
T7848.hs:10:9: error:
- Couldn't match expected type ‘t -> t1 -> A -> A -> A -> A -> t2’
- with actual type ‘a’
+ • Couldn't match expected type ‘t -> t1 -> A -> A -> A -> A -> t2’
+ with actual type ‘a’
‘a’ is a rigid type variable bound by
- the type signature for: (&) :: a at T7848.hs:10:9
- In the SPECIALISE pragma {-# SPECIALIZE (&) :: a #-}
- In an equation for ‘x’:
- x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
- = y
- where
- infixl 3 `y`
- y _ = (&)
- {-# INLINE (&) #-}
- {-# SPECIALIZE (&) :: a #-}
- (&) = x
- Relevant bindings include
- z :: t1 (bound at T7848.hs:6:12)
- (&) :: t1 (bound at T7848.hs:6:8)
- (+) :: t (bound at T7848.hs:6:3)
- x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
+ the type signature for:
+ (&) :: forall a. a
+ at T7848.hs:10:9
+ • In the SPECIALISE pragma {-# SPECIALIZE (&) :: a #-}
+ In an equation for ‘x’:
+ x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
+ = y
+ where
+ infixl 3 `y`
+ y _ = (&)
+ {-# INLINE (&) #-}
+ {-# SPECIALIZE (&) :: a #-}
+ (&) = x
+ • Relevant bindings include
+ z :: t1 (bound at T7848.hs:6:12)
+ (&) :: t1 (bound at T7848.hs:6:8)
+ (+) :: t (bound at T7848.hs:6:3)
+ x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
diff --git a/testsuite/tests/parser/should_fail/readFail031.stderr b/testsuite/tests/parser/should_fail/readFail031.stderr
index 628c8352f6..1ab3923256 100644
--- a/testsuite/tests/parser/should_fail/readFail031.stderr
+++ b/testsuite/tests/parser/should_fail/readFail031.stderr
@@ -1,4 +1,4 @@
-
-readFail031.hs:4:3:
- Invalid type signature: (:+) :: o -> o -> o
- Should be of form <variable> :: <type>
+
+readFail031.hs:4:3: error:
+ Invalid type signature: (:+) :: ...
+ Should be of form <variable> :: <type>
diff --git a/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr b/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
index 033dfab13d..7e40fd184b 100644
--- a/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
@@ -1,5 +1,5 @@
TYPE SIGNATURES
- bravo :: Integer
+ bravo :: forall t. Num t => t
TYPE CONSTRUCTORS
COERCION AXIOMS
Dependent modules: []
diff --git a/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.hs b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.hs
new file mode 100644
index 0000000000..a15ff5f774
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE PartialTypeSignatures, RankNTypes #-}
+
+module ExprSigLocal where
+
+-- We expect this to compile fine,
+-- reporting that '_' stands 'a'
+
+y :: forall b. b->b
+y = ((\x -> x) :: forall a. a -> _)
+
+g :: forall a. a -> _
+g x = x
diff --git a/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
new file mode 100644
index 0000000000..7e02028874
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
@@ -0,0 +1,19 @@
+
+ExprSigLocal.hs:9:35: warning:
+ • Found type wildcard ‘_’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of <expression> :: a -> a at ExprSigLocal.hs:9:27
+ • In an expression type signature: forall a. a -> _
+ In the expression: ((\ x -> x) :: forall a. a -> _)
+ In an equation for ‘y’: y = ((\ x -> x) :: forall a. a -> _)
+ • Relevant bindings include
+ y :: b -> b (bound at ExprSigLocal.hs:9:1)
+
+ExprSigLocal.hs:11:21: warning:
+ • Found type wildcard ‘_’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of g :: a -> a at ExprSigLocal.hs:11:13
+ • In the type signature:
+ g :: forall a. a -> _
+ • Relevant bindings include
+ g :: a -> a (bound at ExprSigLocal.hs:12:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr b/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
index 763cd73cb5..965d492754 100644
--- a/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
@@ -14,7 +14,7 @@ TYPE SIGNATURES
< :: forall a. Ord a => a -> a -> Bool
<= :: forall a. Ord a => a -> a -> Bool
=<< ::
- forall a (m :: * -> *) b. Monad m => (a -> m b) -> m a -> m b
+ forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
== :: forall a. Eq a => a -> a -> Bool
> :: forall a. Ord a => a -> a -> Bool
>= :: forall a. Ord a => a -> a -> Bool
@@ -27,10 +27,10 @@ TYPE SIGNATURES
acos :: forall a. Floating a => a -> a
acosh :: forall a. Floating a => a -> a
all ::
- forall a (t :: * -> *). Foldable t => (a -> Bool) -> t a -> Bool
+ forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
and :: forall (t :: * -> *). Foldable t => t Bool -> Bool
any ::
- forall a (t :: * -> *). Foldable t => (a -> Bool) -> t a -> Bool
+ forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
appendFile :: FilePath -> String -> IO ()
asTypeOf :: forall a. a -> a -> a
asin :: forall a. Floating a => a -> a
@@ -43,7 +43,7 @@ TYPE SIGNATURES
compare :: forall a. Ord a => a -> a -> Ordering
concat :: forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concatMap ::
- forall a b (t :: * -> *). Foldable t => (a -> [b]) -> t a -> [b]
+ forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
const :: forall a b. a -> b -> a
cos :: forall a. Floating a => a -> a
cosh :: forall a. Floating a => a -> a
@@ -117,11 +117,11 @@ TYPE SIGNATURES
lookup :: forall a b. Eq a => a -> [(a, b)] -> Maybe b
map :: forall a b. (a -> b) -> [a] -> [b]
mapM ::
- forall (t :: * -> *) a (m :: * -> *) b.
+ forall (t :: * -> *) (m :: * -> *) a b.
(Monad m, Traversable t) =>
(a -> m b) -> t a -> m (t b)
mapM_ ::
- forall a (m :: * -> *) b (t :: * -> *).
+ forall (t :: * -> *) (m :: * -> *) a b.
(Monad m, Foldable t) =>
(a -> m b) -> t a -> m ()
max :: forall a. Ord a => a -> a -> a
@@ -135,7 +135,7 @@ TYPE SIGNATURES
negate :: forall a. Num a => a -> a
not :: Bool -> Bool
notElem ::
- forall a (t :: * -> *). (Eq a, Foldable t) => a -> t a -> Bool
+ forall (t :: * -> *) a. (Eq a, Foldable t) => a -> t a -> Bool
null :: forall (t :: * -> *) a. Foldable t => t a -> Bool
odd :: forall a. Integral a => a -> Bool
or :: forall (t :: * -> *). Foldable t => t Bool -> Bool
diff --git a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs
index 338ae5cae8..393d1d12a4 100644
--- a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs
+++ b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-}
+{-# LANGUAGE FlexibleContexts, PartialTypeSignatures, NamedWildCards #-}
module SomethingShowable where
somethingShowable :: Show _x => _x -> _
diff --git a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr
index c087fda438..b0957a0b9b 100644
--- a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr
@@ -1,7 +1,8 @@
TYPE SIGNATURES
- somethingShowable :: Bool -> String
+ somethingShowable :: Show Bool => Bool -> String
TYPE CONSTRUCTORS
COERCION AXIOMS
Dependent modules: []
Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
integer-gmp-1.0.0.0]
+
diff --git a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
index 1df0b889fd..333a78f97b 100644
--- a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
@@ -1,82 +1,100 @@
-[1 of 2] Compiling Splices ( Splices.hs, Splices.o )
-[2 of 2] Compiling SplicesUsed ( SplicesUsed.hs, SplicesUsed.o )
-
-SplicesUsed.hs:7:16: warning:
- Found type wildcard ‘_’ standing for ‘Maybe Bool’
- In the type signature for:
- maybeBool :: _
-
-SplicesUsed.hs:8:15: warning:
- Found type wildcard ‘_a’ standing for ‘Maybe Bool’
- In an expression type signature: _a -> _a
- In the expression: id :: _a -> _a
- In the expression: (id :: _a -> _a) (Just True :: Maybe _)
- Relevant bindings include
- maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
-
-SplicesUsed.hs:8:27: warning:
- Found type wildcard ‘_’ standing for ‘Bool’
- In an expression type signature: Maybe _
- In the first argument of ‘id :: _a -> _a’, namely
- ‘(Just True :: Maybe _)’
- In the expression: (id :: _a -> _a) (Just True :: Maybe _)
- Relevant bindings include
- maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
-
-SplicesUsed.hs:10:17: warning:
- Found type wildcard ‘_’ standing for ‘(Char, a)’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of charA :: a -> (Char, a)
- at SplicesUsed.hs:10:10
- In the type signature for:
- charA :: a -> (_)
-
-SplicesUsed.hs:13:14: warning:
- Found type wildcard ‘_’ standing for ‘a -> Bool’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
- at SplicesUsed.hs:14:1
- In the type signature for:
- filter' :: _ -> _ -> _
-
-SplicesUsed.hs:13:14: warning:
- Found type wildcard ‘_’ standing for ‘[a]’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
- at SplicesUsed.hs:14:1
- In the type signature for:
- filter' :: _ -> _ -> _
-
-SplicesUsed.hs:13:14: warning:
- Found type wildcard ‘_’ standing for ‘[a]’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
- at SplicesUsed.hs:14:1
- In the type signature for:
- filter' :: _ -> _ -> _
-
-SplicesUsed.hs:16:3: warning:
- Found hole ‘_’ with inferred constraints: Eq a
- In the type signature for:
- foo :: _ => _
-
-SplicesUsed.hs:16:3: warning:
- Found type wildcard ‘_’ standing for ‘a -> a -> Bool’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of foo :: Eq a => a -> a -> Bool
- at SplicesUsed.hs:16:3
- In the type signature for:
- foo :: _ => _
-
-SplicesUsed.hs:18:3: warning:
- Found type wildcard ‘_a’ standing for ‘Bool’
- In the type signature for:
- bar :: _a -> _b -> (_a, _b)
-
-SplicesUsed.hs:18:3: warning:
- Found type wildcard ‘_b’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: Bool -> t -> (Bool, t)
- at SplicesUsed.hs:18:3
- In the type signature for:
- bar :: _a -> _b -> (_a, _b)
+[1 of 2] Compiling Splices ( Splices.hs, Splices.o )
+[2 of 2] Compiling SplicesUsed ( SplicesUsed.hs, SplicesUsed.o )
+
+SplicesUsed.hs:7:16: warning:
+ • Found type wildcard ‘_’ standing for ‘Maybe Bool’
+ • In the type signature:
+ maybeBool :: _
+ • Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+
+SplicesUsed.hs:8:15: warning:
+ • Found type wildcard ‘_a’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of <expression> :: t -> t at SplicesUsed.hs:8:15
+ • In an expression type signature: _a -> _a
+ In the expression: id :: _a -> _a
+ In the expression: (id :: _a -> _a) (Just True :: Maybe _)
+ • Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+
+SplicesUsed.hs:8:27: warning:
+ • Found type wildcard ‘_’ standing for ‘Bool’
+ • In an expression type signature: Maybe _
+ In the first argument of ‘id :: _a -> _a’, namely
+ ‘(Just True :: Maybe _)’
+ In the expression: (id :: _a -> _a) (Just True :: Maybe _)
+ • Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+
+SplicesUsed.hs:10:17: warning:
+ • Found type wildcard ‘_’ standing for ‘(Char, a)’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of charA :: a -> (Char, a)
+ at SplicesUsed.hs:10:10
+ • In the type signature:
+ charA :: a -> (_)
+ • Relevant bindings include
+ charA :: a -> (Char, a) (bound at SplicesUsed.hs:11:1)
+
+SplicesUsed.hs:13:14: warning:
+ • Found type wildcard ‘_’ standing for ‘a -> Bool’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
+ at SplicesUsed.hs:14:1
+ • In the type signature:
+ filter' :: _ -> _ -> _
+ • Relevant bindings include
+ filter' :: (a -> Bool) -> [a] -> [a] (bound at SplicesUsed.hs:14:1)
+
+SplicesUsed.hs:13:14: warning:
+ • Found type wildcard ‘_’ standing for ‘[a]’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
+ at SplicesUsed.hs:14:1
+ • In the type signature:
+ filter' :: _ -> _ -> _
+ • Relevant bindings include
+ filter' :: (a -> Bool) -> [a] -> [a] (bound at SplicesUsed.hs:14:1)
+
+SplicesUsed.hs:13:14: warning:
+ • Found type wildcard ‘_’ standing for ‘[a]’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
+ at SplicesUsed.hs:14:1
+ • In the type signature:
+ filter' :: _ -> _ -> _
+ • Relevant bindings include
+ filter' :: (a -> Bool) -> [a] -> [a] (bound at SplicesUsed.hs:14:1)
+
+SplicesUsed.hs:16:3: warning:
+ Found constraint wildcard ‘_’ standing for ‘Eq a’
+ In the type signature:
+ foo :: _ => _
+
+SplicesUsed.hs:16:3: warning:
+ • Found type wildcard ‘_’ standing for ‘a -> a -> Bool’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: Eq a => a -> a -> Bool
+ at SplicesUsed.hs:16:3
+ • In the type signature:
+ foo :: _ => _
+ • Relevant bindings include
+ foo :: a -> a -> Bool (bound at SplicesUsed.hs:16:3)
+
+SplicesUsed.hs:18:3: warning:
+ • Found type wildcard ‘_a’ standing for ‘Bool’
+ • In the type signature:
+ bar :: _a -> _b -> (_a, _b)
+ • Relevant bindings include
+ bar :: Bool -> t -> (Bool, t) (bound at SplicesUsed.hs:18:3)
+
+SplicesUsed.hs:18:3: warning:
+ • Found type wildcard ‘_b’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: Bool -> t -> (Bool, t)
+ at SplicesUsed.hs:18:3
+ • In the type signature:
+ bar :: _a -> _b -> (_a, _b)
+ • Relevant bindings include
+ bar :: Bool -> t -> (Bool, t) (bound at SplicesUsed.hs:18:3)
diff --git a/testsuite/tests/partial-sigs/should_compile/T10403.hs b/testsuite/tests/partial-sigs/should_compile/T10403.hs
index 97cda7ae2b..6610254805 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10403.hs
+++ b/testsuite/tests/partial-sigs/should_compile/T10403.hs
@@ -17,6 +17,7 @@ h1 :: _ => _
h1 f b = (H . fmap (const ())) (fmap f b)
h2 :: _
+-- MR applies
-- h2 :: Functor m => (a -> b) -> m a -> H m
h2 f b = (H . fmap (const ())) (fmap f b)
diff --git a/testsuite/tests/partial-sigs/should_compile/T10403.stderr b/testsuite/tests/partial-sigs/should_compile/T10403.stderr
index bfd5367bcd..1a71a3c803 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10403.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10403.stderr
@@ -1,39 +1,80 @@
T10403.hs:15:7: warning:
- Found hole ‘_’ with inferred constraints: Functor f
- In the type signature for:
+ Found constraint wildcard ‘_’ standing for ‘Functor f’
+ In the type signature:
h1 :: _ => _
T10403.hs:15:12: warning:
- Found type wildcard ‘_’ standing for ‘(a -> b) -> f a -> H f’
- Where: ‘b’ is a rigid type variable bound by
+ • Found type wildcard ‘_’ standing for ‘(a -> b) -> f a -> H f’
+ Where: ‘b’ is a rigid type variable bound by
the inferred type of h1 :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:17:1
- ‘a’ is a rigid type variable bound by
+ ‘a’ is a rigid type variable bound by
the inferred type of h1 :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:17:1
- ‘f’ is a rigid type variable bound by
+ ‘f’ is a rigid type variable bound by
the inferred type of h1 :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:17:1
- In the type signature for:
- h1 :: _ => _
+ • In the type signature:
+ h1 :: _ => _
+ • Relevant bindings include
+ h1 :: (a -> b) -> f a -> H f (bound at T10403.hs:17:1)
T10403.hs:19:7: warning:
- Found type wildcard ‘_’ standing for ‘(a -> b) -> f a -> H f’
- Where: ‘b’ is a rigid type variable bound by
- the inferred type of h2 :: Functor f => (a -> b) -> f a -> H f
- at T10403.hs:21:1
- ‘a’ is a rigid type variable bound by
- the inferred type of h2 :: Functor f => (a -> b) -> f a -> H f
- at T10403.hs:21:1
- ‘f’ is a rigid type variable bound by
- the inferred type of h2 :: Functor f => (a -> b) -> f a -> H f
- at T10403.hs:21:1
- In the type signature for:
- h2 :: _
+ • Found type wildcard ‘_’ standing for ‘(a -> b) -> f0 a -> H f0’
+ Where: ‘b’ is a rigid type variable bound by
+ the inferred type of h2 :: (a -> b) -> f0 a -> H f0
+ at T10403.hs:22:1
+ ‘a’ is a rigid type variable bound by
+ the inferred type of h2 :: (a -> b) -> f0 a -> H f0
+ at T10403.hs:22:1
+ ‘f0’ is an ambiguous type variable
+ • In the type signature:
+ h2 :: _
+ • Relevant bindings include
+ h2 :: (a -> b) -> f0 a -> H f0 (bound at T10403.hs:22:1)
+
+T10403.hs:22:15: warning:
+ • Ambiguous type variable ‘f0’ arising from a use of ‘fmap’
+ prevents the constraint ‘(Functor f0)’ from being solved.
+ Relevant bindings include
+ b :: f0 a (bound at T10403.hs:22:6)
+ h2 :: (a -> b) -> f0 a -> H f0 (bound at T10403.hs:22:1)
+ Probable fix: use a type annotation to specify what ‘f0’ should be.
+ These potential instances exist:
+ instance Functor IO -- Defined in ‘GHC.Base’
+ instance Functor (B t) -- Defined at T10403.hs:10:10
+ instance Functor I -- Defined at T10403.hs:6:10
+ ...plus four others
+ (use -fprint-potential-instances to see them all)
+ • In the second argument of ‘(.)’, namely ‘fmap (const ())’
+ In the expression: H . fmap (const ())
+ In the expression: (H . fmap (const ())) (fmap f b)
+
+T10403.hs:28:8: warning:
+ • Couldn't match type ‘f0’ with ‘B t’
+ because type variable ‘t’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ app2 :: H (B t)
+ at T10403.hs:27:1-15
+ Expected type: H (B t)
+ Actual type: H f0
+ • In the expression: h2 (H . I) (B ())
+ In an equation for ‘app2’: app2 = h2 (H . I) (B ())
+ • Relevant bindings include
+ app2 :: H (B t) (bound at T10403.hs:28:1)
-T10403.hs:21:1: warning:
- No instance for (Functor f)
- When checking that ‘h2’ has the inferred type
- h2 :: forall (f :: * -> *) b a. (a -> b) -> f a -> H f
- Probable cause: the inferred type is ambiguous
+T10403.hs:28:20: warning:
+ • Couldn't match type ‘f0’ with ‘B t’
+ because type variable ‘t’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ app2 :: H (B t)
+ at T10403.hs:27:1-15
+ Expected type: f0 ()
+ Actual type: B t ()
+ • In the second argument of ‘h2’, namely ‘(B ())’
+ In the expression: h2 (H . I) (B ())
+ • Relevant bindings include
+ app2 :: H (B t) (bound at T10403.hs:28:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/T10438.stderr b/testsuite/tests/partial-sigs/should_compile/T10438.stderr
index 2ae08675f2..f070b3b8a0 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10438.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10438.stderr
@@ -1,27 +1,28 @@
-
-T10438.hs:7:22: warning:
- Found type wildcard ‘_’ standing for ‘t2’
- Where: ‘t2’ is a rigid type variable bound by
- the inferred type of g :: t2 -> t2 at T10438.hs:6:9
- In the type signature for:
- x :: _
- In an equation for ‘g’:
- g r
- = x
- where
- x :: _
- x = r
- In an equation for ‘foo’:
- foo f
- = g
- where
- g r
- = x
- where
- x :: _
- x = r
- Relevant bindings include
- r :: t2 (bound at T10438.hs:6:11)
- g :: t2 -> t2 (bound at T10438.hs:6:9)
- f :: t (bound at T10438.hs:5:5)
- foo :: t -> t1 -> t1 (bound at T10438.hs:5:1)
+
+T10438.hs:7:22: warning:
+ • Found type wildcard ‘_’ standing for ‘t2’
+ Where: ‘t2’ is a rigid type variable bound by
+ the inferred type of g :: t2 -> t2 at T10438.hs:6:9
+ • In the type signature:
+ x :: _
+ In an equation for ‘g’:
+ g r
+ = x
+ where
+ x :: _
+ x = r
+ In an equation for ‘foo’:
+ foo f
+ = g
+ where
+ g r
+ = x
+ where
+ x :: _
+ x = r
+ • Relevant bindings include
+ x :: t2 (bound at T10438.hs:8:17)
+ r :: t2 (bound at T10438.hs:6:11)
+ g :: t2 -> t2 (bound at T10438.hs:6:9)
+ f :: t (bound at T10438.hs:5:5)
+ foo :: t -> t1 -> t1 (bound at T10438.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/T10519.stderr b/testsuite/tests/partial-sigs/should_compile/T10519.stderr
index de53da2d33..d34b06227a 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10519.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10519.stderr
@@ -1,5 +1,5 @@
T10519.hs:5:18: warning:
- Found hole ‘_’ with inferred constraints: Eq a
- In the type signature for:
+ Found constraint wildcard ‘_’ standing for ‘Eq a’
+ In the type signature:
foo :: forall a. _ => a -> a -> Bool
diff --git a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
index df7cbfcbac..def47612d3 100644
--- a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
@@ -1,53 +1,66 @@
-TYPE SIGNATURES
- bar :: forall t t1. t -> (t -> t1) -> t1
- foo :: forall a. (Show a, Enum a) => a -> String
-TYPE CONSTRUCTORS
-COERCION AXIOMS
-Dependent modules: []
-Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
- integer-gmp-1.0.0.0]
-
-WarningWildcardInstantiations.hs:5:14: warning:
- Found type wildcard ‘_a’ standing for ‘a’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of foo :: (Enum a, Show a) => a -> String
- at WarningWildcardInstantiations.hs:6:1
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WarningWildcardInstantiations.hs:5:18: warning:
- Found hole ‘_’ with inferred constraints: Enum a
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WarningWildcardInstantiations.hs:5:30: warning:
- Found type wildcard ‘_’ standing for ‘String’
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WarningWildcardInstantiations.hs:8:8: warning:
- Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WarningWildcardInstantiations.hs:9:1
- In the type signature for:
- bar :: _ -> _ -> _
-
-WarningWildcardInstantiations.hs:8:13: warning:
- Found type wildcard ‘_’ standing for ‘t -> t1’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WarningWildcardInstantiations.hs:9:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WarningWildcardInstantiations.hs:9:1
- In the type signature for:
- bar :: _ -> _ -> _
-
-WarningWildcardInstantiations.hs:8:18: warning:
- Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WarningWildcardInstantiations.hs:9:1
- In the type signature for:
- bar :: _ -> _ -> _
+TYPE SIGNATURES
+ bar :: forall t t1. t -> (t -> t1) -> t1
+ foo :: forall a. (Show a, Enum a) => a -> String
+TYPE CONSTRUCTORS
+COERCION AXIOMS
+Dependent modules: []
+Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
+ integer-gmp-1.0.0.0]
+
+WarningWildcardInstantiations.hs:5:14: warning:
+ • Found type wildcard ‘_a’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: (Enum a, Show a) => a -> String
+ at WarningWildcardInstantiations.hs:6:1
+ • In the type signature:
+ foo :: (Show _a, _) => _a -> _
+ • Relevant bindings include
+ foo :: a -> String (bound at WarningWildcardInstantiations.hs:6:1)
+
+WarningWildcardInstantiations.hs:5:18: warning:
+ Found constraint wildcard ‘_’ standing for ‘Enum a’
+ In the type signature:
+ foo :: (Show _a, _) => _a -> _
+
+WarningWildcardInstantiations.hs:5:30: warning:
+ • Found type wildcard ‘_’ standing for ‘String’
+ • In the type signature:
+ foo :: (Show _a, _) => _a -> _
+ • Relevant bindings include
+ foo :: a -> String (bound at WarningWildcardInstantiations.hs:6:1)
+
+WarningWildcardInstantiations.hs:8:8: warning:
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WarningWildcardInstantiations.hs:9:1)
+
+WarningWildcardInstantiations.hs:8:13: warning:
+ • Found type wildcard ‘_’ standing for ‘t -> t1’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WarningWildcardInstantiations.hs:9:1)
+
+WarningWildcardInstantiations.hs:8:18: warning:
+ • Found type wildcard ‘_’ standing for ‘t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WarningWildcardInstantiations.hs:9:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index e99a414b13..142d3318c8 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -56,3 +56,4 @@ test('T10403', normal, compile, [''])
test('T10438', normal, compile, [''])
test('T10519', normal, compile, [''])
test('T10463', normal, compile, [''])
+test('ExprSigLocal', normal, compile, [''])
diff --git a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs
index 0e101ff2c6..6adf8fc419 100644
--- a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs
+++ b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs
@@ -2,5 +2,7 @@
{-# LANGUAGE NoMonomorphismRestriction #-}
module Defaulting1MROff where
+-- Even without the MR, this signature forces monomorphism,
+-- because of the partial signature with no '=>'
alpha :: _
alpha = 3
diff --git a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr
index 43bd7b1938..6cc4f94d2f 100644
--- a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr
@@ -1,6 +1,7 @@
-
-Defaulting1MROff.hs:6:1: error:
- No instance for (Num t)
- When checking that ‘alpha’ has the inferred type
- alpha :: forall t. t
- Probable cause: the inferred type is ambiguous
+
+Defaulting1MROff.hs:7:10: warning:
+ • Found type wildcard ‘_’ standing for ‘Integer’
+ • In the type signature:
+ alpha :: _
+ • Relevant bindings include
+ alpha :: Integer (bound at Defaulting1MROff.hs:8:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
index 5432eafc4e..f08e1807c0 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
@@ -1,6 +1,4 @@
-
-ExtraConstraintsWildcardInExpressionSignature.hs:3:20: error:
- Invalid partial type: _ => _
- An extra-constraints wild card is only allowed
- in the top-level context
- In an expression type signature
+
+ExtraConstraintsWildcardInExpressionSignature.hs:3:20: error:
+ Extra-contraint wildcard ‘_’ not allowed
+ in an expression type signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
index 71b3132dc5..0e2a66a877 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
@@ -1,6 +1,4 @@
-
-ExtraConstraintsWildcardInPatternSignature.hs:4:11: error:
- Invalid partial type: _ => _
- An extra-constraints wild card is only allowed
- in the top-level context
- In a pattern type-signature
+
+ExtraConstraintsWildcardInPatternSignature.hs:4:11: error:
+ Extra-contraint wildcard ‘_’ not allowed
+ in a pattern type-signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
index 4f6822c7c4..801c37de36 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TemplateHaskell, PartialTypeSignatures #-}
module ExtraConstraintsWildcardInTypeSplice2 where
import Language.Haskell.TH.Lib (wildCardT)
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
index 30efa4d83f..05994d76f9 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
@@ -1,4 +1,5 @@
-
-ExtraConstraintsWildcardInTypeSplice2.hs:6:12: error:
- Unexpected wild card: ‘_’
- In the type signature for ‘show'’: show' :: (_) => a -> String
+
+ExtraConstraintsWildcardInTypeSplice2.hs:6:12: error:
+ Wildcard ‘_’ not allowed
+ in the spliced type ‘_’
+ In the untyped splice: $wildCardT
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
index c13fe94d89..31b90d9fc2 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
@@ -1,8 +1,8 @@
-[1 of 2] Compiling ExtraConstraintsWildcardInTypeSplice ( ExtraConstraintsWildcardInTypeSplice.hs, ExtraConstraintsWildcardInTypeSplice.o )
-[2 of 2] Compiling ExtraConstraintsWildcardInTypeSpliceUsed ( ExtraConstraintsWildcardInTypeSpliceUsed.hs, ExtraConstraintsWildcardInTypeSpliceUsed.o )
-
-ExtraConstraintsWildcardInTypeSpliceUsed.hs:7:9: error:
- Invalid partial type: _ => _
- An extra-constraints wild card is not allowed in a type splice
- In the spliced type _ => _
- In the untyped splice: $metaType
+[1 of 2] Compiling ExtraConstraintsWildcardInTypeSplice ( ExtraConstraintsWildcardInTypeSplice.hs, ExtraConstraintsWildcardInTypeSplice.o )
+
+ExtraConstraintsWildcardInTypeSplice.hs:7:16: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _ => _ |]
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
index a8ea30ecf7..3cd4150d02 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
@@ -1,6 +1,6 @@
ExtraConstraintsWildcardNotEnabled.hs:4:10: error:
- Found hole ‘_’ with inferred constraints: Show a
+ Found constraint wildcard ‘_’ standing for ‘Show a’
To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
+ In the type signature:
show' :: _ => a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr
index faf3ad1f84..3ffcb187ac 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr
@@ -1,6 +1,6 @@
-
-ExtraConstraintsWildcardNotLast.hs:4:9:
- Invalid partial type: (_, Eq a) => a -> a
- An extra-constraints wild card must occur
- at the end of the constraints
- In the type signature for ‘foo’
+
+ExtraConstraintsWildcardNotLast.hs:4:9: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr
index 43d559cbf6..3072da9b7e 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr
@@ -1,6 +1,8 @@
-ExtraConstraintsWildcardNotPresent.hs:6:1:
- No instance for (Show a)
- When checking that ‘show'’ has the inferred type
- show' :: forall a. a -> String
- Probable cause: the inferred type is ambiguous
+ExtraConstraintsWildcardNotPresent.hs:6:11: error:
+ No instance for (Show a) arising from a use of ‘show’
+ Possible fix:
+ add (Show a) to the context of
+ the inferred type of show' :: a -> String
+ In the expression: show x
+ In an equation for ‘show'’: show' x = show x
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr
index 7110de0ea9..eb17e6d20b 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr
@@ -1,5 +1,6 @@
-
-ExtraConstraintsWildcardTwice.hs:4:10:
- Invalid partial type: (_, _) => a -> a
- Only a single extra-constraints wild card is allowed
- In the type signature for ‘foo’
+
+ExtraConstraintsWildcardTwice.hs:4:10: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
index 2bdc01e8ef..2df15443c9 100644
--- a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
@@ -1,15 +1,18 @@
-
-InstantiatedNamedWildcardsInConstraints.hs:4:14: error:
- Found type wildcard ‘_a’ standing for ‘b’
- Where: ‘b’ is a rigid type variable bound by
- the inferred type of foo :: (Enum b, Show b) => b -> (String, b)
- at InstantiatedNamedWildcardsInConstraints.hs:4:8
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Enum _a, _) => _a -> (String, b)
-
-InstantiatedNamedWildcardsInConstraints.hs:4:18: error:
- Found hole ‘_’ with inferred constraints: Show b
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Enum _a, _) => _a -> (String, b)
+
+InstantiatedNamedWildcardsInConstraints.hs:4:14: error:
+ • Found type wildcard ‘_a’ standing for ‘b’
+ Where: ‘b’ is a rigid type variable bound by
+ the inferred type of foo :: (Enum b, Show b) => b -> (String, b)
+ at InstantiatedNamedWildcardsInConstraints.hs:4:8
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: (Enum _a, _) => _a -> (String, b)
+ • Relevant bindings include
+ foo :: b -> (String, b)
+ (bound at InstantiatedNamedWildcardsInConstraints.hs:5:1)
+
+InstantiatedNamedWildcardsInConstraints.hs:4:18: error:
+ Found constraint wildcard ‘_’ standing for ‘Show b’
+ To use the inferred type, enable PartialTypeSignatures
+ In the type signature:
+ foo :: (Enum _a, _) => _a -> (String, b)
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
index ca674c4a98..47e9b99135 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
@@ -1,5 +1,5 @@
-
-NamedExtraConstraintsWildcard.hs:4:15:
- Invalid partial type: (Eq a, _a) => a -> a
- An extra-constraints wild card cannot be named
- In the type signature for ‘foo’
+
+NamedExtraConstraintsWildcard.hs:4:15: error:
+ Named wildcard ‘_a’ not allowed as an extra-contraint
+ Use an anonymous wildcard instead
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr
index f97cdc3f4d..e07751d2f4 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr
@@ -1,4 +1,4 @@
-
-NamedWildcardInDataFamilyInstanceLHS.hs:8:21: error:
- Unexpected wild card: ‘_a’
- In the data type declaration for ‘Sing’
+
+NamedWildcardInDataFamilyInstanceLHS.hs:8:21: error:
+ Wildcard ‘_a’ not allowed
+ in a type pattern of family instance for ‘Sing’
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr
index 550f6ceb2e..f56d972172 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr
@@ -1,4 +1,4 @@
-
-NamedWildcardInTypeFamilyInstanceLHS.hs:5:5: error:
- Unexpected wild card: ‘_t’
- In the declaration for type synonym ‘F’
+
+NamedWildcardInTypeFamilyInstanceLHS.hs:5:5: error:
+ Wildcard ‘_t’ not allowed
+ in a type pattern of family instance for ‘F’
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
index 9071531a13..ba860445a3 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
@@ -1,5 +1,10 @@
-
-NamedWildcardInTypeSplice.hs:8:16: error:
- Unexpected wild card: ‘_a’
- In a Template-Haskell quoted type
- In the Template Haskell quotation [t| _a -> _a |]
+
+NamedWildcardInTypeSplice.hs:8:16: error:
+ Wildcard ‘_a’ not allowed
+ in a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _a -> _a |]
+
+NamedWildcardInTypeSplice.hs:8:22: error:
+ Wildcard ‘_a’ not allowed
+ in a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _a -> _a |]
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
index 6fa82994e4..805854a1f2 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
@@ -1,12 +1,16 @@
-
-NamedWildcardsEnabled.hs:4:8: error:
- Found type wildcard ‘_a’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _a -> _b
-
-NamedWildcardsEnabled.hs:4:14: error:
- Found type wildcard ‘_b’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _a -> _b
+
+NamedWildcardsEnabled.hs:4:8: error:
+ • Found type wildcard ‘_a’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: _a -> _b
+ • Relevant bindings include
+ foo :: Bool -> Bool (bound at NamedWildcardsEnabled.hs:5:1)
+
+NamedWildcardsEnabled.hs:4:14: error:
+ • Found type wildcard ‘_b’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: _a -> _b
+ • Relevant bindings include
+ foo :: Bool -> Bool (bound at NamedWildcardsEnabled.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
index 7029b0495c..0de48b4dcd 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
@@ -1,21 +1,23 @@
-
-NamedWildcardsNotEnabled.hs:4:9:
- Couldn't match expected type ‘_b’ with actual type ‘Bool’
- ‘_b’ is a rigid type variable bound by
- the type signature for: foo :: _a -> _b
- at NamedWildcardsNotEnabled.hs:3:8
- In the expression: not x
- In an equation for ‘foo’: foo x = not x
- Relevant bindings include
- foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
-
-NamedWildcardsNotEnabled.hs:4:13:
- Couldn't match expected type ‘Bool’ with actual type ‘_a’
- ‘_a’ is a rigid type variable bound by
- the type signature for: foo :: _a -> _b
- at NamedWildcardsNotEnabled.hs:3:8
- In the first argument of ‘not’, namely ‘x’
- In the expression: not x
- Relevant bindings include
- x :: _a (bound at NamedWildcardsNotEnabled.hs:4:5)
- foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
+
+NamedWildcardsNotEnabled.hs:4:9: error:
+ • Couldn't match expected type ‘_b’ with actual type ‘Bool’
+ ‘_b’ is a rigid type variable bound by
+ the type signature for:
+ foo :: forall _a _b. _a -> _b
+ at NamedWildcardsNotEnabled.hs:3:8
+ • In the expression: not x
+ In an equation for ‘foo’: foo x = not x
+ • Relevant bindings include
+ foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
+
+NamedWildcardsNotEnabled.hs:4:13: error:
+ • Couldn't match expected type ‘Bool’ with actual type ‘_a’
+ ‘_a’ is a rigid type variable bound by
+ the type signature for:
+ foo :: forall _a _b. _a -> _b
+ at NamedWildcardsNotEnabled.hs:3:8
+ • In the first argument of ‘not’, namely ‘x’
+ In the expression: not x
+ • Relevant bindings include
+ x :: _a (bound at NamedWildcardsNotEnabled.hs:4:5)
+ foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs
index 383115ef55..c2e57e71e3 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-}
+{-# LANGUAGE PartialTypeSignatures, TypeFamilies, NamedWildCards, ConstraintKinds #-}
module NamedWildcardsNotInMonotype where
foo :: (Show _a, Eq _c, Eq _b) => _a -> _b -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
index 8e644374c8..59f5b93b59 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
@@ -1,6 +1,12 @@
-
-NamedWildcardsNotInMonotype.hs:4:21:
- Invalid partial type: (Show _a, Eq _c, Eq _b) => _a -> _b -> String
- The named wild card ‘_c’ is only allowed in the constraints
- when it also occurs in the rest of the type
- In the type signature for ‘foo’
+
+NamedWildcardsNotInMonotype.hs:5:1: error:
+ Could not deduce (Eq t0)
+ from the context: (Show a, Eq t, Eq a)
+ bound by the inferred type for ‘foo’:
+ (Show a, Eq t, Eq a) => a -> a -> String
+ at NamedWildcardsNotInMonotype.hs:5:1-33
+ The type variable ‘t0’ is ambiguous
+ In the ambiguity check for the inferred type for ‘foo’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the inferred type
+ foo :: forall t a. (Show a, Eq t, Eq a) => a -> a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr
index 784b282b60..dc5ff5b091 100644
--- a/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr
@@ -1,6 +1,6 @@
-
-NestedExtraConstraintsWildcard.hs:4:23:
- Invalid partial type: Bool -> (Eq a, _) => a
- An extra-constraints wild card is only allowed
- in the top-level context
- In the type signature for ‘foo’
+
+NestedExtraConstraintsWildcard.hs:4:23: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr
index 07e5839fde..afd5bdc24f 100644
--- a/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr
@@ -1,5 +1,4 @@
-
-NestedNamedExtraConstraintsWildcard.hs:4:23:
- Invalid partial type: Bool -> (Eq a, _a) => a
- An extra-constraints wild card cannot be named
- In the type signature for ‘foo’
+
+NestedNamedExtraConstraintsWildcard.hs:4:23: error:
+ Wildcard ‘_a’ not allowed in a constraint
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr
index c3dcd7c71e..ebaf904a6f 100644
--- a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr
@@ -1,5 +1,4 @@
-
-PartialClassMethodSignature.hs:6:15:
- Unexpected wild card: ‘_’
- In the type ‘a -> _’
- In the class declaration for ‘Foo’
+
+PartialClassMethodSignature.hs:6:15: error:
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr
index 1dfa192e3b..0f89e33e8b 100644
--- a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr
@@ -1,5 +1,4 @@
-
-PartialClassMethodSignature2.hs:5:17:
- Unexpected wild card: ‘_’
- In the type ‘(Eq a, _) => a -> a’
- In the class declaration for ‘Foo’
+
+PartialClassMethodSignature2.hs:5:17: error:
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
index fbff3580d0..025379a67d 100644
--- a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
@@ -1,12 +1,16 @@
-
-PartialTypeSignaturesDisabled.hs:4:8: error:
- Found type wildcard ‘_’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _ -> _
-
-PartialTypeSignaturesDisabled.hs:4:13: error:
- Found type wildcard ‘_’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _ -> _
+
+PartialTypeSignaturesDisabled.hs:4:8: error:
+ • Found type wildcard ‘_’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: _ -> _
+ • Relevant bindings include
+ foo :: Bool -> Bool (bound at PartialTypeSignaturesDisabled.hs:5:1)
+
+PartialTypeSignaturesDisabled.hs:4:13: error:
+ • Found type wildcard ‘_’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: _ -> _
+ • Relevant bindings include
+ foo :: Bool -> Bool (bound at PartialTypeSignaturesDisabled.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/T10045.stderr b/testsuite/tests/partial-sigs/should_fail/T10045.stderr
index 959bc0f52c..556201cc04 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10045.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10045.stderr
@@ -1,24 +1,25 @@
T10045.hs:6:18: error:
- Found type wildcard ‘_’ standing for ‘t1 -> Bool -> t2’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
- ‘t2’ is a rigid type variable bound by
- the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- copy :: _
- In the expression:
- let
+ • Found type wildcard ‘_’ standing for ‘t1 -> Bool -> t2’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
+ ‘t2’ is a rigid type variable bound by
+ the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
copy :: _
- copy w from = copy w True
- in copy ws1 False
- In an equation for ‘foo’:
- foo (Meta ws1)
- = let
- copy :: _
- copy w from = copy w True
- in copy ws1 False
- Relevant bindings include
- ws1 :: () (bound at T10045.hs:5:11)
- foo :: Meta -> t (bound at T10045.hs:5:1)
+ In the expression:
+ let
+ copy :: _
+ copy w from = copy w True
+ in copy ws1 False
+ In an equation for ‘foo’:
+ foo (Meta ws1)
+ = let
+ copy :: _
+ copy w from = copy w True
+ in copy ws1 False
+ • Relevant bindings include
+ copy :: t1 -> Bool -> t2 (bound at T10045.hs:7:10)
+ ws1 :: () (bound at T10045.hs:5:11)
+ foo :: Meta -> t (bound at T10045.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.stderr b/testsuite/tests/partial-sigs/should_fail/T10615.stderr
index 3c2c2e9dab..842b2eb10a 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr
@@ -1,34 +1,36 @@
-
-T10615.hs:4:7: error:
- Found type wildcard ‘_’ standing for ‘a1’
- Where: ‘a1’ is an ambiguous type variable
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- f1 :: _ -> f
-
-T10615.hs:5:6: error:
- Couldn't match type ‘f’ with ‘b1 -> a1’
- ‘f’ is a rigid type variable bound by
- the inferred type of f1 :: a1 -> f at T10615.hs:4:7
- Expected type: a1 -> f
- Actual type: a1 -> b1 -> a1
- In the expression: const
- In an equation for ‘f1’: f1 = const
- Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1)
-
-T10615.hs:7:7: error:
- Found type wildcard ‘_’ standing for ‘a0’
- Where: ‘a0’ is an ambiguous type variable
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- f2 :: _ -> _f
-
-T10615.hs:8:6: error:
- Couldn't match type ‘_f’ with ‘b0 -> a0’
- ‘_f’ is a rigid type variable bound by
- the inferred type of f2 :: a0 -> _f at T10615.hs:7:7
- Expected type: a0 -> _f
- Actual type: a0 -> b0 -> a0
- In the expression: const
- In an equation for ‘f2’: f2 = const
- Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1)
+
+T10615.hs:4:7: error:
+ • Found type wildcard ‘_’ standing for ‘a1’
+ Where: ‘a1’ is an ambiguous type variable
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ f1 :: _ -> f
+ • Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1)
+
+T10615.hs:5:6: error:
+ • Couldn't match type ‘f’ with ‘b1 -> a1’
+ ‘f’ is a rigid type variable bound by
+ the inferred type of f1 :: a1 -> f at T10615.hs:4:7
+ Expected type: a1 -> f
+ Actual type: a1 -> b1 -> a1
+ • In the expression: const
+ In an equation for ‘f1’: f1 = const
+ • Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1)
+
+T10615.hs:7:7: error:
+ • Found type wildcard ‘_’ standing for ‘a0’
+ Where: ‘a0’ is an ambiguous type variable
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ f2 :: _ -> _f
+ • Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1)
+
+T10615.hs:8:6: error:
+ • Couldn't match type ‘_f’ with ‘b0 -> a0’
+ ‘_f’ is a rigid type variable bound by
+ the inferred type of f2 :: a0 -> _f at T10615.hs:7:7
+ Expected type: a0 -> _f
+ Actual type: a0 -> b0 -> a0
+ • In the expression: const
+ In an equation for ‘f2’: f2 = const
+ • Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/T10999.hs b/testsuite/tests/partial-sigs/should_fail/T10999.hs
index 07d86ffe96..4a46a96d8b 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10999.hs
+++ b/testsuite/tests/partial-sigs/should_fail/T10999.hs
@@ -2,7 +2,7 @@ module T10999 where
import qualified Data.Set as Set
-f :: () -> _
+f :: _ => () -> _
f _ = Set.fromList undefined
g = map fst $ Set.toList $ f ()
diff --git a/testsuite/tests/partial-sigs/should_fail/T10999.stderr b/testsuite/tests/partial-sigs/should_fail/T10999.stderr
index 2bf060b0aa..c74719addf 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10999.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10999.stderr
@@ -1,14 +1,16 @@
-T10999.hs:5:12: error:
- Found type wildcard ‘_’ standing for ‘Set.Set a’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of f :: Ord a => () -> Set.Set a at T10999.hs:6:1
+T10999.hs:5:6: error:
+ Found constraint wildcard ‘_’ standing for ‘Ord a’
To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- f :: () -> _
+ In the type signature:
+ f :: _ => () -> _
-T10999.hs:6:1: error:
- No instance for (Ord a)
- When checking that ‘f’ has the inferred type
- f :: forall a. () -> Set.Set a
- Probable cause: the inferred type is ambiguous
+T10999.hs:5:17: error:
+ • Found type wildcard ‘_’ standing for ‘Set.Set a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of f :: Ord a => () -> Set.Set a at T10999.hs:6:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ f :: _ => () -> _
+ • Relevant bindings include
+ f :: () -> Set.Set a (bound at T10999.hs:6:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
index 795789185e..0c3d1549db 100644
--- a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
@@ -1,16 +1,20 @@
-
-TidyClash.hs:8:19: error:
- Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: w_ -> (w_, _ -> _)
-
-TidyClash.hs:8:24: error:
- Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: w_ -> (w_, _ -> _)
+
+TidyClash.hs:8:19: error:
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: w_ -> (w_, _ -> _)
+ • Relevant bindings include
+ bar :: w_ -> (w_, t -> t1) (bound at TidyClash.hs:9:1)
+
+TidyClash.hs:8:24: error:
+ • Found type wildcard ‘_’ standing for ‘t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: w_ -> (w_, _ -> _)
+ • Relevant bindings include
+ bar :: w_ -> (w_, t -> t1) (bound at TidyClash.hs:9:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/Trac10045.hs b/testsuite/tests/partial-sigs/should_fail/Trac10045.hs
deleted file mode 100644
index e7c07470aa..0000000000
--- a/testsuite/tests/partial-sigs/should_fail/Trac10045.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Trac10045 where
-
-newtype Meta = Meta ()
-
-foo (Meta ws1) =
- let copy :: _
- copy w from = copy w 1
- in copy ws1 1
diff --git a/testsuite/tests/partial-sigs/should_fail/Trac10045.stderr b/testsuite/tests/partial-sigs/should_fail/Trac10045.stderr
deleted file mode 100644
index 045423ca0c..0000000000
--- a/testsuite/tests/partial-sigs/should_fail/Trac10045.stderr
+++ /dev/null
@@ -1,46 +0,0 @@
-
-Trac10045.hs:6:17: error:
- Found type wildcard ‘_’ standing for ‘t1 -> a -> t2’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of copy :: Num a => t1 -> a -> t2
- at Trac10045.hs:7:9
- ‘a’ is a rigid type variable bound by
- the inferred type of copy :: Num a => t1 -> a -> t2
- at Trac10045.hs:7:9
- ‘t2’ is a rigid type variable bound by
- the inferred type of copy :: Num a => t1 -> a -> t2
- at Trac10045.hs:7:9
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- copy :: _
- In the expression:
- let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
- In an equation for ‘foo’:
- foo (Meta ws1)
- = let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
- Relevant bindings include
- ws1 :: () (bound at Trac10045.hs:5:11)
- foo :: Meta -> t (bound at Trac10045.hs:5:1)
-
-Trac10045.hs:7:9: error:
- No instance for (Num a)
- When checking that ‘copy’ has the inferred type
- copy :: forall t t1 a. t -> a -> t1
- Probable cause: the inferred type is ambiguous
- In the expression:
- let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
- In an equation for ‘foo’:
- foo (Meta ws1)
- = let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
diff --git a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr
index cb3a6a99d3..1176d4e510 100644
--- a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr
@@ -1,5 +1,6 @@
-
-UnnamedConstraintWildcard1.hs:4:13:
- Invalid partial type: Show _ => a -> String
- Anonymous wild cards are not allowed in constraints
- In the type signature for ‘foo’
+
+UnnamedConstraintWildcard1.hs:4:13: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr
index 6af7534356..3e01a2e760 100644
--- a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr
@@ -1,5 +1,6 @@
-
-UnnamedConstraintWildcard2.hs:4:8:
- Invalid partial type: _ a => a -> String
- Anonymous wild cards are not allowed in constraints
- In the type signature for ‘foo’
+
+UnnamedConstraintWildcard2.hs:4:8: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr
index 851767ad05..d5e7c72298 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr
@@ -1,6 +1,4 @@
-
-WildcardInADT1.hs:4:26:
- Unexpected wild card: ‘_’
- In the type ‘Either _ a’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInADT1.hs:4:26: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr
index e96d385f73..ec1ddf7189 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr
@@ -1,6 +1,4 @@
-
-WildcardInADT2.hs:4:34:
- Unexpected wild card: ‘_’
- In the type ‘Either _ a’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInADT2.hs:4:34: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr
index 1c504f6d39..26a3f68316 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr
@@ -1,6 +1,4 @@
-
-WildcardInADT3.hs:4:27:
- Unexpected wild card: ‘_’
- In the type ‘_ => a’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInADT3.hs:4:27: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
index 419c63e608..02bcdfc504 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
@@ -1,7 +1,7 @@
-
-WildcardInADTContext1.hs:1:37: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-WildcardInADTContext1.hs:4:13:
- Unexpected wild card: ‘_’
- In the data declaration for ‘Foo’
+
+WildcardInADTContext1.hs:1:37: warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+WildcardInADTContext1.hs:4:13: error:
+ Wildcard ‘_’ not allowed
+ in the data type declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
index 20820848b9..ea145785e6 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
@@ -1,7 +1,7 @@
-
-WildcardInADTContext2.hs:1:53: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-WildcardInADTContext2.hs:4:10:
- Unexpected wild card: ‘_a’
- In the data type declaration for ‘Foo’
+
+WildcardInADTContext2.hs:1:53: warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+WildcardInADTContext2.hs:4:10: error:
+ Wildcard ‘_a’ not allowed
+ in the data type declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr
index e4c2b1ac68..a02f8a6144 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr
@@ -1,5 +1,4 @@
-
-WildcardInDefault.hs:4:10:
- Unexpected wild card: ‘_’
- In a type in a `default' declaration: _
- When checking the types in a default declaration
+
+WildcardInDefault.hs:4:10: error:
+ Wildcard ‘_’ not allowed
+ in a `default' declaration
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr
index 92e7c8fa95..0b15bd05fe 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr
@@ -1,5 +1,4 @@
-
-WildcardInDefaultSignature.hs:7:16:
- Unexpected wild card: ‘_’
- In the type ‘_’
- In the class declaration for ‘C’
+
+WildcardInDefaultSignature.hs:7:16: error:
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘f’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr
index 6c3f76ddff..6387f2a473 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr
@@ -1,4 +1,4 @@
-
-WildcardInDeriving.hs:5:22:
- Unexpected wild card: ‘_’
- In the data declaration for ‘Foo’
+
+WildcardInDeriving.hs:5:22: error:
+ Wildcard ‘_’ not allowed
+ in the data type declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr
index 00cdfa0282..812599b7c6 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr
@@ -1,6 +1,4 @@
-
-WildcardInForeignExport.hs:6:37:
- Unexpected wild card: ‘_’
- In the foreign declaration for ‘foo’: foo :: CInt -> _
- When checking declaration:
- foreign export ccall "foo" foo :: CInt -> _
+
+WildcardInForeignExport.hs:6:37: error:
+ Wildcard ‘_’ not allowed
+ in the foreign declaration for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr
index 5930e338bf..27f877a445 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr
@@ -1,6 +1,4 @@
-
-WildcardInForeignImport.hs:6:48:
- Unexpected wild card: ‘_’
- In the foreign declaration for ‘c_sin’: c_sin :: CDouble -> _
- When checking declaration:
- foreign import ccall safe "static sin" c_sin :: CDouble -> _
+
+WildcardInForeignImport.hs:6:48: error:
+ Wildcard ‘_’ not allowed
+ in the foreign declaration for ‘c_sin’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr
index f3a07de5bc..eb5e8414ee 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr
@@ -1,6 +1,4 @@
-
-WildcardInGADT1.hs:5:19:
- Unexpected wild card: ‘_’
- In the type ‘Either a _’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInGADT1.hs:5:19: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr
index d1839072fb..e338ae454f 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr
@@ -1,5 +1,4 @@
-
-WildcardInGADT2.hs:5:17:
- Unexpected wild card: ‘_’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInGADT2.hs:5:17: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr
index d85fd4d6ea..1bfeca73c3 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr
@@ -1,4 +1,4 @@
-
-WildcardInInstanceHead.hs:7:14:
- Unexpected wild card: ‘_’
- In the instance declaration for ‘Foo _’
+
+WildcardInInstanceHead.hs:7:14: error:
+ Wildcard ‘_’ not allowed
+ in an instance declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr
index 8e697bb322..e8e5e246f7 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr
@@ -1,5 +1,4 @@
WildcardInInstanceSig.hs:5:13: error:
- Unexpected wild card: ‘_’
- In the type signature for ‘negate’: negate :: _
- In the instance declaration for ‘Num Bool’
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘negate’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr
index a5f236cbff..b8d28fe528 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr
@@ -1,6 +1,4 @@
-
-WildcardInNewtype.hs:7:29:
- Unexpected wild card: ‘_’
- In the type ‘Either _ a’
- In the definition of data constructor ‘Foo’
- In the newtype declaration for ‘Foo’
+
+WildcardInNewtype.hs:7:29: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr
index 7dd2a20a77..dbe95a88d3 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr
@@ -1,5 +1,4 @@
WildcardInPatSynSig.hs:4:37: error:
- Unexpected wild card: ‘_’
- In the type signature for pattern synonym ‘Single’:
- Single :: _ -> [a]
+ Wildcard ‘_’ not allowed
+ in a pattern synonym signature for ‘Single’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
index d5b3dd1c2d..cbd06fdbcb 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
@@ -1,2 +1,6 @@
-
-WildcardInStandaloneDeriving.hs:4:19: Malformed instance: _
+
+WildcardInStandaloneDeriving.hs:4:19: error: Malformed instance: _
+
+WildcardInStandaloneDeriving.hs:4:19: error:
+ Wildcard ‘_’ not allowed
+ in In a deriving declaration
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr
index 46ca25b7f6..ae394f8a1d 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr
@@ -1,6 +1,4 @@
-
-WildcardInTypeFamilyInstanceRHS.hs:8:25:
- Unexpected wild card: ‘_’
- In the type ‘Maybe _’
- In the type instance declaration for ‘Dual’
- In the instance declaration for ‘Foo Int’
+
+WildcardInTypeFamilyInstanceRHS.hs:8:25: error:
+ Wildcard ‘_’ not allowed
+ in the declaration for type synonym ‘Dual’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr
index 929980e188..2ef322ff69 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr
@@ -1,5 +1,4 @@
-
-WildcardInTypeSynonymRHS.hs:4:18:
- Unexpected wild card: ‘_’
- In the type ‘Maybe _’
- In the type declaration for ‘Foo’
+
+WildcardInTypeSynonymRHS.hs:4:18: error:
+ Wildcard ‘_’ not allowed
+ in the declaration for type synonym ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
index d0d7dff480..ac44a19e4b 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
@@ -1,51 +1,64 @@
-
-WildcardInstantiations.hs:5:14: error:
- Found type wildcard ‘_a’ standing for ‘a’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of foo :: (Enum a, Show a) => a -> String
- at WildcardInstantiations.hs:6:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WildcardInstantiations.hs:5:18: error:
- Found hole ‘_’ with inferred constraints: Enum a
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WildcardInstantiations.hs:5:30: error:
- Found type wildcard ‘_’ standing for ‘String’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WildcardInstantiations.hs:8:8: error:
- Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: _ -> _ -> _
-
-WildcardInstantiations.hs:8:13: error:
- Found type wildcard ‘_’ standing for ‘t -> t1’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: _ -> _ -> _
-
-WildcardInstantiations.hs:8:18: error:
- Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: _ -> _ -> _
+
+WildcardInstantiations.hs:5:14: error:
+ • Found type wildcard ‘_a’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: (Enum a, Show a) => a -> String
+ at WildcardInstantiations.hs:6:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: (Show _a, _) => _a -> _
+ • Relevant bindings include
+ foo :: a -> String (bound at WildcardInstantiations.hs:6:1)
+
+WildcardInstantiations.hs:5:18: error:
+ Found constraint wildcard ‘_’ standing for ‘Enum a’
+ To use the inferred type, enable PartialTypeSignatures
+ In the type signature:
+ foo :: (Show _a, _) => _a -> _
+
+WildcardInstantiations.hs:5:30: error:
+ • Found type wildcard ‘_’ standing for ‘String’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: (Show _a, _) => _a -> _
+ • Relevant bindings include
+ foo :: a -> String (bound at WildcardInstantiations.hs:6:1)
+
+WildcardInstantiations.hs:8:8: error:
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WildcardInstantiations.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WildcardInstantiations.hs:9:1)
+
+WildcardInstantiations.hs:8:13: error:
+ • Found type wildcard ‘_’ standing for ‘t -> t1’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WildcardInstantiations.hs:9:1
+ ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WildcardInstantiations.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WildcardInstantiations.hs:9:1)
+
+WildcardInstantiations.hs:8:18: error:
+ • Found type wildcard ‘_’ standing for ‘t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WildcardInstantiations.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WildcardInstantiations.hs:9:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T
index 913b7d813a..dbbe9462db 100644
--- a/testsuite/tests/partial-sigs/should_fail/all.T
+++ b/testsuite/tests/partial-sigs/should_fail/all.T
@@ -1,6 +1,6 @@
test('AnnotatedConstraint', normal, compile_fail, [''])
test('AnnotatedConstraintNotForgotten', normal, compile_fail, [''])
-test('Defaulting1MROff', normal, compile_fail, [''])
+test('Defaulting1MROff', normal, compile, [''])
test('ExtraConstraintsWildcardInExpressionSignature', normal, compile_fail, [''])
test('ExtraConstraintsWildcardInPatternSignature', normal, compile_fail, [''])
test('ExtraConstraintsWildcardInPatternSplice', normal, compile_fail, [''])
@@ -9,7 +9,7 @@ test('ExtraConstraintsWildcardInTypeSpliceUsed',
extra_clean(['ExtraConstraintsWildcardInTypeSplice.o', 'ExtraConstraintsWildcardInTypeSplice.hi'])],
multimod_compile_fail, ['ExtraConstraintsWildcardInTypeSpliceUsed', config.ghc_th_way_flags])
test('ExtraConstraintsWildcardInTypeSplice2',
- req_interp,
+ [expect_broken(11101), req_interp],
compile_fail, [''])
test('ExtraConstraintsWildcardNotEnabled', normal, compile_fail, [''])
test('ExtraConstraintsWildcardNotLast', normal, compile_fail, [''])
@@ -33,7 +33,6 @@ test('ScopedNamedWildcardsBad', normal, compile_fail, [''])
test('TidyClash', normal, compile_fail, [''])
# Bug
test('TidyClash2', expect_broken(9478), compile_fail, [''])
-test('Trac10045', normal, compile_fail, [''])
test('UnnamedConstraintWildcard1', normal, compile_fail, [''])
test('UnnamedConstraintWildcard2', normal, compile_fail, [''])
test('WildcardInADT1', normal, compile_fail, [''])
diff --git a/testsuite/tests/patsyn/should_fail/T9161-1.stderr b/testsuite/tests/patsyn/should_fail/T9161-1.stderr
index 1f05196ebb..4e744694e2 100644
--- a/testsuite/tests/patsyn/should_fail/T9161-1.stderr
+++ b/testsuite/tests/patsyn/should_fail/T9161-1.stderr
@@ -1,4 +1,5 @@
-
-T9161-1.hs:6:14:
- Pattern synonym ‘PATTERN’ used as a type
- In the type signature for ‘wrongLift’: wrongLift :: PATTERN
+
+T9161-1.hs:6:14: error:
+ Pattern synonym ‘PATTERN’ used as a type
+ In the type signature:
+ wrongLift :: PATTERN
diff --git a/testsuite/tests/patsyn/should_fail/T9161-2.stderr b/testsuite/tests/patsyn/should_fail/T9161-2.stderr
index 8d21be5906..ebaea2d455 100644
--- a/testsuite/tests/patsyn/should_fail/T9161-2.stderr
+++ b/testsuite/tests/patsyn/should_fail/T9161-2.stderr
@@ -1,5 +1,5 @@
-
-T9161-2.hs:8:20:
- Pattern synonym ‘PATTERN’ used as a type
- In the type signature for ‘wrongLift’:
- wrongLift :: Proxy PATTERN ()
+
+T9161-2.hs:8:20: error:
+ Pattern synonym ‘PATTERN’ used as a type
+ In the type signature:
+ wrongLift :: Proxy PATTERN ()
diff --git a/testsuite/tests/perf/compiler/T5837.stderr b/testsuite/tests/perf/compiler/T5837.stderr
index 7add7e39bc..324e817947 100644
--- a/testsuite/tests/perf/compiler/T5837.stderr
+++ b/testsuite/tests/perf/compiler/T5837.stderr
@@ -1,5 +1,5 @@
-T5837.hs:8:6:
+T5837.hs:8:6: error:
Reduction stack overflow; size = 51
When simplifying the following type:
TF
@@ -86,6 +86,6 @@ T5837.hs:8:6:
(any upper bound you could choose might fail unpredictably with
minor updates to GHC, so disabling the check is recommended if
you're sure that type checking should terminate)
- In the ambiguity check for the type signature for ‘t’:
- t :: forall a. (a ~ TF (a, Int)) => Int
- In the type signature for ‘t’: t :: (a ~ TF (a, Int)) => Int
+ In the ambiguity check for ‘t’
+ In the type signature:
+ t :: (a ~ TF (a, Int)) => Int
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index bb43c47d9e..bbcb631f97 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -293,7 +293,7 @@ test('T3064',
# 2014-12-01: 162457940 (Windows)
# 2014-12-22: 122836340 (Windows) Death to silent superclasses
- (wordsize(64), 243670824, 5)]),
+ (wordsize(64), 264952256, 5)]),
# (amd64/Linux) (28/06/2011): 73259544
# (amd64/Linux) (07/02/2013): 224798696
# (amd64/Linux) (02/08/2013): 236404384, increase from roles
@@ -310,6 +310,8 @@ test('T3064',
# (Mac) (18/12/2014): 350418600, improvements to flattener
# (amd64/Linux) (22/12/2014): 243670824, Ha! Death to superclass constraints, makes
# much less code for Monad instances
+ # (amd64/Linux) (01/12/2015): 264952256, Regression due to Simon's wildcard refactor
+ # Tracked as #11151.
###################################
# deactivated for now, as this metric became too volatile recently
diff --git a/testsuite/tests/polykinds/PolyKinds02.stderr b/testsuite/tests/polykinds/PolyKinds02.stderr
index ab646d81c7..7c5716a65e 100644
--- a/testsuite/tests/polykinds/PolyKinds02.stderr
+++ b/testsuite/tests/polykinds/PolyKinds02.stderr
@@ -1,5 +1,5 @@
-
-PolyKinds02.hs:13:16:
- The second argument of ‘Vec’ should have kind ‘Nat’,
- but ‘Nat’ has kind ‘*’
- In the type signature for ‘vec’: vec :: Vec Nat Nat
+
+PolyKinds02.hs:13:16: error:
+ The second argument of ‘Vec’ should have kind ‘Nat’,
+ but ‘Nat’ has kind ‘*’
+ In the type signature: vec :: Vec Nat Nat
diff --git a/testsuite/tests/polykinds/T10503.stderr b/testsuite/tests/polykinds/T10503.stderr
index e2817fe776..071ab5e88e 100644
--- a/testsuite/tests/polykinds/T10503.stderr
+++ b/testsuite/tests/polykinds/T10503.stderr
@@ -1,16 +1,15 @@
-
-T10503.hs:8:6: error:
- Couldn't match kind ‘k’ with ‘*’
- ‘k’ is a rigid type variable bound by
- the type signature for:
- h :: ((Proxy 'KProxy ~ Proxy 'KProxy) => r) -> r
- at T10503.hs:8:6
- Expected type: Proxy 'KProxy
- Actual type: Proxy 'KProxy
- In the ambiguity check for the type signature for ‘h’:
- h :: forall (k :: BOX) r.
- ((Proxy 'KProxy ~ Proxy 'KProxy) => r) -> r
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘h’:
- h :: forall r.
- (Proxy (KProxy :: KProxy k) ~ Proxy (KProxy :: KProxy *) => r) -> r
+
+T10503.hs:8:6: error:
+ Couldn't match kind ‘k’ with ‘*’
+ ‘k’ is a rigid type variable bound by
+ the type signature for:
+ h :: forall (k :: BOX) r.
+ ((Proxy 'KProxy ~ Proxy 'KProxy) => r) -> r
+ at T10503.hs:8:6
+ Expected type: Proxy 'KProxy
+ Actual type: Proxy 'KProxy
+ In the ambiguity check for ‘h’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature:
+ h :: forall r.
+ (Proxy (KProxy :: KProxy k) ~ Proxy (KProxy :: KProxy *) => r) -> r
diff --git a/testsuite/tests/polykinds/T10516.stderr b/testsuite/tests/polykinds/T10516.stderr
index 0242722ea5..a6fa52471b 100644
--- a/testsuite/tests/polykinds/T10516.stderr
+++ b/testsuite/tests/polykinds/T10516.stderr
@@ -1,4 +1,4 @@
T10516.hs:8:6: error:
The type synonym ‘App’ should have 2 arguments, but has been given 1
- In the type signature for ‘f’: f :: f a -> X (App f) a
+ In the type signature: f :: f a -> X (App f) a
diff --git a/testsuite/tests/polykinds/T6021.stderr b/testsuite/tests/polykinds/T6021.stderr
index ea3b9e3427..0b7ce77439 100644
--- a/testsuite/tests/polykinds/T6021.stderr
+++ b/testsuite/tests/polykinds/T6021.stderr
@@ -1,4 +1,5 @@
-
-T6021.hs:5:10:
- Kind variable also used as type variable: ‘b’
- In an instance declaration
+
+T6021.hs:5:22: error:
+ Type variable ‘b’ used as a kind
+ In the kind ‘b’
+ In the instance declaration for ‘Panic (a :: b) b’
diff --git a/testsuite/tests/polykinds/T6068.hs b/testsuite/tests/polykinds/T6068.hs
index 0b414a87b9..7b90b4ebaf 100644
--- a/testsuite/tests/polykinds/T6068.hs
+++ b/testsuite/tests/polykinds/T6068.hs
@@ -1,5 +1,5 @@
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
-{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, GADTs, MultiParamTypeClasses,
+{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, GADTs, MultiParamTypeClasses, KindSignatures,
FunctionalDependencies, FlexibleInstances, UndecidableInstances, ExistentialQuantification #-}
module T6068 where
@@ -23,7 +23,7 @@ class HasSingleton a (kp :: KProxy k) | a -> kp where
class Floop a b | a -> b
-instance forall a (mp :: KProxy (Maybe ak)). Floop a mp => HasSingleton (Maybe a) mp where
+instance Floop a (mp :: KProxy (Maybe ak)) => HasSingleton (Maybe a) mp where
exists Nothing = Exists SNothing
-- instance forall (a ::*) (mp :: KProxy (Maybe ak)). HasSingleton (Maybe ak) (Maybe a) mp where
diff --git a/testsuite/tests/polykinds/T7224.stderr b/testsuite/tests/polykinds/T7224.stderr
index 90ebc0f3ec..b957a1ba65 100644
--- a/testsuite/tests/polykinds/T7224.stderr
+++ b/testsuite/tests/polykinds/T7224.stderr
@@ -1,5 +1,6 @@
-
-T7224.hs:6:19:
- Kind variable ‘i’ used as a type
- In the type ‘a -> m i i a’
- In the class declaration for ‘PMonad'’
+
+T7224.hs:6:19: error:
+ Kind variable ‘i’ used as a type
+ In the type signature:
+ ret' :: a -> m i i a
+ In the class declaration for ‘PMonad'’
diff --git a/testsuite/tests/polykinds/T7230.stderr b/testsuite/tests/polykinds/T7230.stderr
index 0756cd5284..92938bedb1 100644
--- a/testsuite/tests/polykinds/T7230.stderr
+++ b/testsuite/tests/polykinds/T7230.stderr
@@ -1,28 +1,28 @@
-T7230.hs:48:32:
- Could not deduce: (x :<<= x1) ~ 'True
- from the context: Increasing xs ~ 'True
- bound by the type signature for:
- crash :: (Increasing xs ~ 'True) =>
- SList xs -> SBool (Increasing xs)
- at T7230.hs:47:10-68
- or from: xs ~ (x : xs1)
- bound by a pattern with constructor:
- SCons :: forall (k :: BOX) (x :: k) (xs :: [k]).
- Sing x -> Sing xs -> Sing (x : xs),
- in an equation for ‘crash’
- at T7230.hs:48:8-27
- or from: xs1 ~ (x1 : xs2)
- bound by a pattern with constructor:
- SCons :: forall (k :: BOX) (x :: k) (xs :: [k]).
- Sing x -> Sing xs -> Sing (x : xs),
- in an equation for ‘crash’
- at T7230.hs:48:17-26
- Expected type: SBool (Increasing xs)
- Actual type: SBool (x :<<= x1)
- In the expression: x %:<<= y
- In an equation for ‘crash’:
- crash (SCons x (SCons y xs)) = x %:<<= y
- Relevant bindings include
- y :: Sing x1 (bound at T7230.hs:48:23)
- x :: Sing x (bound at T7230.hs:48:14)
+T7230.hs:48:32: error:
+ • Could not deduce: (x :<<= x1) ~ 'True
+ from the context: Increasing xs ~ 'True
+ bound by the type signature for:
+ crash :: (Increasing xs ~ 'True) =>
+ SList xs -> SBool (Increasing xs)
+ at T7230.hs:47:1-68
+ or from: xs ~ (x : xs1)
+ bound by a pattern with constructor:
+ SCons :: forall (k :: BOX) (x :: k) (xs :: [k]).
+ Sing x -> Sing xs -> Sing (x : xs),
+ in an equation for ‘crash’
+ at T7230.hs:48:8-27
+ or from: xs1 ~ (x1 : xs2)
+ bound by a pattern with constructor:
+ SCons :: forall (k :: BOX) (x :: k) (xs :: [k]).
+ Sing x -> Sing xs -> Sing (x : xs),
+ in an equation for ‘crash’
+ at T7230.hs:48:17-26
+ Expected type: SBool (Increasing xs)
+ Actual type: SBool (x :<<= x1)
+ • In the expression: x %:<<= y
+ In an equation for ‘crash’:
+ crash (SCons x (SCons y xs)) = x %:<<= y
+ • Relevant bindings include
+ y :: Sing x1 (bound at T7230.hs:48:23)
+ x :: Sing x (bound at T7230.hs:48:14)
diff --git a/testsuite/tests/polykinds/T7278.stderr b/testsuite/tests/polykinds/T7278.stderr
index 3d615c12f7..f8b2cfface 100644
--- a/testsuite/tests/polykinds/T7278.stderr
+++ b/testsuite/tests/polykinds/T7278.stderr
@@ -1,5 +1,5 @@
-
-T7278.hs:8:43:
- ‘t’ is applied to too many type arguments
- In the type signature for ‘f’:
- f :: (C (t :: k) (TF t)) => TF t p1 p0 -> t p1 p0
+
+T7278.hs:8:43: error:
+ ‘t’ is applied to too many type arguments
+ In the type signature:
+ f :: (C (t :: k) (TF t)) => TF t p1 p0 -> t p1 p0
diff --git a/testsuite/tests/polykinds/T7328.stderr b/testsuite/tests/polykinds/T7328.stderr
index 7fcd8edf90..9e7cbab03a 100644
--- a/testsuite/tests/polykinds/T7328.stderr
+++ b/testsuite/tests/polykinds/T7328.stderr
@@ -1,7 +1,8 @@
-
-T7328.hs:8:34:
- Kind occurs check
- The first argument of ‘Foo’ should have kind ‘k0’,
- but ‘f’ has kind ‘k1 -> k0’
- In the type ‘a ~ f i => Proxy (Foo f)’
- In the class declaration for ‘Foo’
+
+T7328.hs:8:34: error:
+ Kind occurs check
+ The first argument of ‘Foo’ should have kind ‘k0’,
+ but ‘f’ has kind ‘k1 -> k0’
+ In the type signature:
+ foo :: a ~ f i => Proxy (Foo f)
+ In the class declaration for ‘Foo’
diff --git a/testsuite/tests/polykinds/T7438.stderr b/testsuite/tests/polykinds/T7438.stderr
index d87e437b31..ca09383a2d 100644
--- a/testsuite/tests/polykinds/T7438.stderr
+++ b/testsuite/tests/polykinds/T7438.stderr
@@ -17,3 +17,4 @@ T7438.hs:6:14: error:
Relevant bindings include
acc :: t (bound at T7438.hs:6:8)
go :: Thrist t2 t3 -> t -> t1 (bound at T7438.hs:6:1)
+
diff --git a/testsuite/tests/polykinds/T9222.stderr b/testsuite/tests/polykinds/T9222.stderr
index a5b35ee2b1..6a45c4a7fb 100644
--- a/testsuite/tests/polykinds/T9222.stderr
+++ b/testsuite/tests/polykinds/T9222.stderr
@@ -7,18 +7,13 @@ T9222.hs:13:3: error:
(a ~ '(b0, c0)) => Proxy b0
at T9222.hs:13:3
‘b’ is a rigid type variable bound by
- the type of the constructor ‘Want’:
- ((a ~ '(b, c)) => Proxy b) -> Want a
- at T9222.hs:13:3
+ the type of the constructor ‘Want’:
+ forall (k :: BOX) (k1 :: BOX) (a :: (,) k k1) (b :: k) (c :: k1).
+ ((a ~ '(b, c)) => Proxy b) -> Want a
+ at T9222.hs:13:3
Expected type: '(b, c)
Actual type: a
- In the ambiguity check for the type of the constructor ‘Want’:
- Want :: forall (k :: BOX)
- (k1 :: BOX)
- (a :: (,) k k1)
- (b :: k)
- (c :: k1).
- ((a ~ '(b, c)) => Proxy b) -> Want a
+ In the ambiguity check for ‘Want’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the definition of data constructor ‘Want’
In the data type declaration for ‘Want’
diff --git a/testsuite/tests/rename/should_compile/T4426.hs b/testsuite/tests/rename/should_compile/T4426.hs
index b04f59cd03..610f670e44 100644
--- a/testsuite/tests/rename/should_compile/T4426.hs
+++ b/testsuite/tests/rename/should_compile/T4426.hs
@@ -1,8 +1,13 @@
{-# LANGUAGE RankNTypes #-}
-{-# OPTIONS_GHC -fwarn-context-quantification #-}
+{- # OPTIONS_GHC -fwarn-context-quantification #-}
module T4426 where
+-- GHC 8.0 no longer allows implicit quantification
+-- on the RHS. This is more consistent:
+-- type F a = a -> m a
+-- has always been rejected and hence so should
+-- these four. (It was already deprecated in 7.10.)
type F a = Monad m => a -> m a
data X a = X (Eq b => a -> b)
@@ -12,6 +17,7 @@ data Y a = Y { k :: Eq b => a -> b -> c }
f :: forall b. (Monad m => m b) -> b
f = undefined
+-- But these ones are fine:
type F' a = forall m. Monad m => a -> m a
data X' a = X' (forall b. Eq b => a -> b)
diff --git a/testsuite/tests/rename/should_compile/T4426.stderr b/testsuite/tests/rename/should_compile/T4426.stderr
index f4e0c471d6..f731f3544d 100644
--- a/testsuite/tests/rename/should_compile/T4426.stderr
+++ b/testsuite/tests/rename/should_compile/T4426.stderr
@@ -1,35 +1,18 @@
-
-T4426.hs:6:12: Warning:
- Variable ‘m’ is implicitly quantified due to a context
- Use explicit forall syntax instead.
- This will become an error in GHC 7.12.
- In the type ‘Monad m => a -> m a’
- In the declaration for type synonym ‘F’
-
-T4426.hs:8:15: Warning:
- Variable ‘b’ is implicitly quantified due to a context
- Use explicit forall syntax instead.
- This will become an error in GHC 7.12.
- In the type ‘Eq b => a -> b’
- In the definition of data constructor ‘X’
-
-T4426.hs:10:21: Warning:
- Variable ‘b’ is implicitly quantified due to a context
- Use explicit forall syntax instead.
- This will become an error in GHC 7.12.
- In the type ‘Eq b => a -> b -> c’
- In the definition of data constructor ‘Y’
-
-T4426.hs:10:21: Warning:
- Variable ‘c’ is implicitly quantified due to a context
- Use explicit forall syntax instead.
- This will become an error in GHC 7.12.
- In the type ‘Eq b => a -> b -> c’
- In the definition of data constructor ‘Y’
-
-T4426.hs:12:17: Warning:
- Variable ‘m’ is implicitly quantified due to a context
- Use explicit forall syntax instead.
- This will become an error in GHC 7.12.
- In the type ‘Monad m => m b’
- In the type signature for ‘f’
+
+T4426.hs:11:18: error: Not in scope: type variable ‘m’
+
+T4426.hs:11:28: error: Not in scope: type variable ‘m’
+
+T4426.hs:13:18: error: Not in scope: type variable ‘b’
+
+T4426.hs:13:28: error: Not in scope: type variable ‘b’
+
+T4426.hs:15:24: error: Not in scope: type variable ‘b’
+
+T4426.hs:15:34: error: Not in scope: type variable ‘b’
+
+T4426.hs:15:39: error: Not in scope: type variable ‘c’
+
+T4426.hs:17:23: error: Not in scope: type variable ‘m’
+
+T4426.hs:17:28: error: Not in scope: type variable ‘m’
diff --git a/testsuite/tests/rename/should_compile/T5331.stderr b/testsuite/tests/rename/should_compile/T5331.stderr
index 562aa69978..13249b0e17 100644
--- a/testsuite/tests/rename/should_compile/T5331.stderr
+++ b/testsuite/tests/rename/should_compile/T5331.stderr
@@ -1,13 +1,12 @@
-
-T5331.hs:8:17: Warning:
- Unused quantified type variable ‘a’
- In the definition of data constructor ‘S1’
-
-T5331.hs:11:16: Warning:
- Unused quantified type variable ‘a’
- In the definition of data constructor ‘W1’
-
-T5331.hs:13:13: Warning:
- Unused quantified type variable ‘a’
- In the type ‘forall a. Int’
- In the type signature for ‘f’
+
+T5331.hs:8:17: warning:
+ Unused quantified type variable ‘a’
+ In the definition of data constructor ‘S1’
+
+T5331.hs:11:16: warning:
+ Unused quantified type variable ‘a’
+ In the definition of data constructor ‘W1’
+
+T5331.hs:13:13: warning:
+ Unused quantified type variable ‘a’
+ In the type ‘forall a. Int’
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 8a597827fe..c501eccd56 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -224,5 +224,5 @@ test('T7969',
run_command,
['$MAKE -s --no-print-directory T7969'])
test('T9127', normal, compile, [''])
-test('T4426', normal, compile, [''])
+test('T4426', normal, compile_fail, [''])
test('T9778', normal, compile, ['-fwarn-unticked-promoted-constructors'])
diff --git a/testsuite/tests/rename/should_fail/T2901.stderr b/testsuite/tests/rename/should_fail/T2901.stderr
index d5a2247ce1..2128989b4c 100644
--- a/testsuite/tests/rename/should_fail/T2901.stderr
+++ b/testsuite/tests/rename/should_fail/T2901.stderr
@@ -4,4 +4,5 @@ T2901.hs:6:5: error:
No module named ‘F’ is imported.
T2901.hs:6:13: error:
- ‘F.field’ is not a (visible) constructor field name
+ Not in scope: ‘F.field’
+ No module named ‘F’ is imported.
diff --git a/testsuite/tests/rename/should_fail/T5372.hs b/testsuite/tests/rename/should_fail/T5372.hs
index b0f5906c10..2e937b7cba 100644
--- a/testsuite/tests/rename/should_fail/T5372.hs
+++ b/testsuite/tests/rename/should_fail/T5372.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DisambiguateRecordFields #-}
-module T5372 where
-import qualified T5372a
-notScope (MkS { x = n }) = n
+{-# LANGUAGE DisambiguateRecordFields #-}
+module T5372 where
+import qualified T5372a
+notScope (MkS { x = n }) = n
diff --git a/testsuite/tests/rename/should_fail/T5372.stderr b/testsuite/tests/rename/should_fail/T5372.stderr
index 9d3f06e7d4..5d7a9c4ead 100644
--- a/testsuite/tests/rename/should_fail/T5372.stderr
+++ b/testsuite/tests/rename/should_fail/T5372.stderr
@@ -1,6 +1,8 @@
-
-T5372.hs:4:11:
- Not in scope: data constructor ‘MkS’
- Perhaps you meant ‘T5372a.MkS’ (imported from T5372a)
-
-T5372.hs:4:17: ‘x’ is not a (visible) constructor field name
+
+T5372.hs:4:11: error:
+ Not in scope: data constructor ‘MkS’
+ Perhaps you meant ‘T5372a.MkS’ (imported from T5372a)
+
+T5372.hs:4:17: error:
+ Not in scope: ‘x’
+ Perhaps you meant ‘T5372a.x’ (imported from T5372a)
diff --git a/testsuite/tests/rename/should_fail/rnfail026.stderr b/testsuite/tests/rename/should_fail/rnfail026.stderr
index 22caa11c1d..f220f81812 100644
--- a/testsuite/tests/rename/should_fail/rnfail026.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail026.stderr
@@ -1,9 +1,9 @@
-
-rnfail026.hs:16:17:
- The first argument of ‘Monad’ should have kind ‘* -> *’,
- but ‘forall a. Eq a => Set a’ has kind ‘*’
- In the instance declaration for ‘Monad (forall a. Eq a => Set a)’
-
-rnfail026.hs:19:10:
- Illegal polymorphic or qualified type: forall a. [a]
- In the instance declaration for ‘Eq (forall a. [a])’
+
+rnfail026.hs:16:27: error:
+ The first argument of ‘Monad’ should have kind ‘* -> *’,
+ but ‘Eq a => Set a’ has kind ‘*’
+ In the instance declaration for ‘Monad (forall a. Eq a => Set a)’
+
+rnfail026.hs:19:10: error:
+ Illegal polymorphic or qualified type: forall a. [a]
+ In the instance declaration for ‘Eq (forall a. [a])’
diff --git a/testsuite/tests/roles/should_fail/RolesIArray.stderr b/testsuite/tests/roles/should_fail/RolesIArray.stderr
index 8b844dc3eb..ea9bb30c86 100644
--- a/testsuite/tests/roles/should_fail/RolesIArray.stderr
+++ b/testsuite/tests/roles/should_fail/RolesIArray.stderr
@@ -2,11 +2,11 @@
RolesIArray.hs:10:13: error:
Couldn't match type ‘Word64’ with ‘N’
arising from the coercion of the method ‘Data.Array.Base.unsafeAccumArray’
- from type ‘forall e' i.
+ from type ‘forall i e'.
Ix i =>
(Word64 -> e' -> Word64)
-> Word64 -> (i, i) -> [(Int, e')] -> UArray i Word64’
- to type ‘forall e' i.
+ to type ‘forall i e'.
Ix i =>
(N -> e' -> N) -> N -> (i, i) -> [(Int, e')] -> UArray i N’
When deriving the instance for (IArray UArray N)
@@ -14,11 +14,11 @@ RolesIArray.hs:10:13: error:
RolesIArray.hs:10:13: error:
Couldn't match type ‘Word64’ with ‘N’
arising from the coercion of the method ‘Data.Array.Base.unsafeAccum’
- from type ‘forall e' i.
+ from type ‘forall i e'.
Ix i =>
(Word64 -> e' -> Word64)
-> UArray i Word64 -> [(Int, e')] -> UArray i Word64’
- to type ‘forall e' i.
+ to type ‘forall i e'.
Ix i =>
(N -> e' -> N) -> UArray i N -> [(Int, e')] -> UArray i N’
When deriving the instance for (IArray UArray N)
diff --git a/testsuite/tests/simplCore/should_compile/T8848.stderr b/testsuite/tests/simplCore/should_compile/T8848.stderr
index abd6839db2..71d3708ab4 100644
--- a/testsuite/tests/simplCore/should_compile/T8848.stderr
+++ b/testsuite/tests/simplCore/should_compile/T8848.stderr
@@ -23,7 +23,7 @@ Rule fired: Class op <*>
Rule fired: Class op $p1Applicative
Rule fired: Class op fmap
Rule fired: Class op <*>
-Rule fired: SPEC/T8848 liftA2 _ _ _ @ (Shape 'Z)
+Rule fired: SPEC/T8848 liftA2 @ (Shape 'Z) _ _ _
Rule fired: Class op $p1Applicative
Rule fired: Class op $p1Applicative
Rule fired: SPEC $cfmap @ 'Z
@@ -71,7 +71,7 @@ Rule fired: Class op <*>
Rule fired: Class op $p1Applicative
Rule fired: Class op fmap
Rule fired: Class op <*>
-Rule fired: SPEC/T8848 liftA2 _ _ _ @ (Shape ('S 'Z))
+Rule fired: SPEC/T8848 liftA2 @ (Shape ('S 'Z)) _ _ _
Rule fired: SPEC $fFunctorShape @ 'Z
Rule fired: Class op fmap
Rule fired: Class op fmap
diff --git a/testsuite/tests/simplCore/should_compile/T8848a.stderr b/testsuite/tests/simplCore/should_compile/T8848a.stderr
index 9d06c08461..bd2e0cd6cc 100644
--- a/testsuite/tests/simplCore/should_compile/T8848a.stderr
+++ b/testsuite/tests/simplCore/should_compile/T8848a.stderr
@@ -1,6 +1,6 @@
-
-==================== Tidy Core rules ====================
-"SPEC f" [ALWAYS]
- forall (@ b) ($dOrd :: Ord [Int]). f @ b @ [Int] $dOrd = f_$sf @ b
-
-
+
+==================== Tidy Core rules ====================
+"SPEC f" [ALWAYS]
+ forall (@ b) ($dOrd :: Ord [Int]). f @ [Int] @ b $dOrd = f_$sf @ b
+
+
diff --git a/testsuite/tests/simplCore/should_compile/rule2.stderr b/testsuite/tests/simplCore/should_compile/rule2.stderr
index da97b8859c..f18696489c 100644
--- a/testsuite/tests/simplCore/should_compile/rule2.stderr
+++ b/testsuite/tests/simplCore/should_compile/rule2.stderr
@@ -23,9 +23,9 @@ Total ticks: 13
1 f
1 m
1 a
- 1 m
1 b
1 m
+ 1 m
1 b
9 SimplifierDone 9
diff --git a/testsuite/tests/th/T10267.stderr b/testsuite/tests/th/T10267.stderr
index 909479389d..0a86955e1a 100644
--- a/testsuite/tests/th/T10267.stderr
+++ b/testsuite/tests/th/T10267.stderr
@@ -1,46 +1,46 @@
T10267.hs:8:1: error:
- Found hole: _ :: a0
- Where: ‘a0’ is a rigid type variable bound by
- the type signature for:
- j :: a0 -> a0
- at T10267.hs:8:1
- In the expression: _
- In an equation for ‘j’: j x = _
- Relevant bindings include
- x :: a0 (bound at T10267.hs:8:1)
- j :: a0 -> a0 (bound at T10267.hs:8:1)
+ • Found hole: _ :: a0
+ Where: ‘a0’ is a rigid type variable bound by
+ the type signature for:
+ j :: forall a0. a0 -> a0
+ at T10267.hs:8:1
+ • In the expression: _
+ In an equation for ‘j’: j x = _
+ • Relevant bindings include
+ x :: a0 (bound at T10267.hs:8:1)
+ j :: a0 -> a0 (bound at T10267.hs:8:1)
T10267.hs:8:1: error:
- Found hole: _foo :: a0 -> a0
- Where: ‘a0’ is a rigid type variable bound by
- the type signature for:
- i :: a0 -> a0
- at T10267.hs:8:1
- Or perhaps ‘_foo’ is mis-spelled, or not in scope
- In the expression: _foo
- In an equation for ‘i’: i = _foo
- Relevant bindings include i :: a0 -> a0 (bound at T10267.hs:8:1)
+ • Found hole: _foo :: a0 -> a0
+ Where: ‘a0’ is a rigid type variable bound by
+ the type signature for:
+ i :: forall a0. a0 -> a0
+ at T10267.hs:8:1
+ Or perhaps ‘_foo’ is mis-spelled, or not in scope
+ • In the expression: _foo
+ In an equation for ‘i’: i = _foo
+ • Relevant bindings include i :: a0 -> a0 (bound at T10267.hs:8:1)
T10267.hs:14:3: error:
- Found hole: _foo :: a -> a
- Where: ‘a’ is a rigid type variable bound by
+ • Found hole: _foo :: a -> a
+ Where: ‘a’ is a rigid type variable bound by
the type signature for:
- k :: a -> a
+ k :: forall a. a -> a
at T10267.hs:14:3
- Or perhaps ‘_foo’ is mis-spelled, or not in scope
- In the expression: _foo
- In an equation for ‘k’: k = _foo
- Relevant bindings include k :: a -> a (bound at T10267.hs:14:3)
+ Or perhaps ‘_foo’ is mis-spelled, or not in scope
+ • In the expression: _foo
+ In an equation for ‘k’: k = _foo
+ • Relevant bindings include k :: a -> a (bound at T10267.hs:14:3)
T10267.hs:23:3: error:
- Found hole: _ :: a
- Where: ‘a’ is a rigid type variable bound by
+ • Found hole: _ :: a
+ Where: ‘a’ is a rigid type variable bound by
the type signature for:
- l :: a -> a
+ l :: forall a. a -> a
at T10267.hs:23:3
- In the expression: _
- In an equation for ‘l’: l x = _
- Relevant bindings include
- x :: a (bound at T10267.hs:23:3)
- l :: a -> a (bound at T10267.hs:23:3)
+ • In the expression: _
+ In an equation for ‘l’: l x = _
+ • Relevant bindings include
+ x :: a (bound at T10267.hs:23:3)
+ l :: a -> a (bound at T10267.hs:23:3)
diff --git a/testsuite/tests/th/T3177a.stderr b/testsuite/tests/th/T3177a.stderr
index d034e29430..33093fa2b1 100644
--- a/testsuite/tests/th/T3177a.stderr
+++ b/testsuite/tests/th/T3177a.stderr
@@ -1,8 +1,10 @@
-
-T3177a.hs:8:8:
- ‘Int’ is applied to too many type arguments
- In the type signature for ‘f’: f :: Int Int
-
-T3177a.hs:11:6:
- ‘Int’ is applied to too many type arguments
- In the type signature for ‘g’: g :: Int Int
+
+T3177a.hs:8:8: error:
+ ‘Int’ is applied to too many type arguments
+ In the type signature:
+ f :: Int Int
+
+T3177a.hs:11:6: error:
+ ‘Int’ is applied to too many type arguments
+ In the type signature:
+ g :: Int Int
diff --git a/testsuite/tests/th/T8625.stdout b/testsuite/tests/th/T8625.stdout
index 4453d692ba..000050bc97 100644
--- a/testsuite/tests/th/T8625.stdout
+++ b/testsuite/tests/th/T8625.stdout
@@ -1,2 +1,2 @@
-[InstanceD [AppT (AppT EqualityT (VarT y_0)) (AppT (AppT ArrowT (VarT t_1)) (VarT t_1))] (AppT (ConT Ghci1.Member) (ConT GHC.Types.Bool)) []]
-[SigD f_2 (ForallT [PlainTV y_3,PlainTV t_4] [AppT (AppT EqualityT (VarT y_3)) (AppT (AppT ArrowT (VarT t_4)) (VarT t_4))] (AppT (AppT ArrowT (VarT y_3)) (VarT t_4))),FunD f_2 [Clause [VarP x_5] (NormalB (VarE x_5)) []]]
+[InstanceD [AppT (AppT EqualityT (VarT y_0)) (AppT (AppT ArrowT (VarT t_1)) (VarT t_1))] (AppT (ConT Ghci1.Member) (ConT GHC.Types.Bool)) []]
+[SigD f_4 (ForallT [PlainTV y_2,PlainTV t_3] [AppT (AppT EqualityT (VarT y_2)) (AppT (AppT ArrowT (VarT t_3)) (VarT t_3))] (AppT (AppT ArrowT (VarT y_2)) (VarT t_3))),FunD f_4 [Clause [VarP x_5] (NormalB (VarE x_5)) []]]
diff --git a/testsuite/tests/th/TH_pragma.stderr b/testsuite/tests/th/TH_pragma.stderr
index 0fcd167aa4..07b56645cd 100644
--- a/testsuite/tests/th/TH_pragma.stderr
+++ b/testsuite/tests/th/TH_pragma.stderr
@@ -1,16 +1,16 @@
-TH_pragma.hs:(6,4)-(8,26): Splicing declarations
- [d| foo :: Int -> Int
- {-# NOINLINE foo #-}
- foo x = x + 1 |]
- ======>
- foo :: Int -> Int
- {-# NOINLINE foo #-}
- foo x = (x + 1)
-TH_pragma.hs:(10,4)-(12,31): Splicing declarations
- [d| bar :: Num a => a -> a
- {-# SPECIALIZE INLINE[~1] bar :: Float -> Float #-}
- bar x = x * 10 |]
- ======>
- bar :: forall a. Num a => a -> a
- {-# SPECIALIZE INLINE[~1] bar :: Float -> Float #-}
- bar x = (x * 10)
+TH_pragma.hs:(6,4)-(8,26): Splicing declarations
+ [d| foo :: Int -> Int
+ {-# NOINLINE foo #-}
+ foo x = x + 1 |]
+ ======>
+ foo :: Int -> Int
+ {-# NOINLINE foo #-}
+ foo x = (x + 1)
+TH_pragma.hs:(10,4)-(12,31): Splicing declarations
+ [d| bar :: Num a => a -> a
+ {-# SPECIALIZE INLINE[~1] bar :: Float -> Float #-}
+ bar x = x * 10 |]
+ ======>
+ bar :: forall a. Num a => a -> a
+ {-# SPECIALIZE INLINE[~1] bar :: Float -> Float #-}
+ bar x = (x * 10)
diff --git a/testsuite/tests/typecheck/should_compile/FD1.stderr b/testsuite/tests/typecheck/should_compile/FD1.stderr
index 661bbcd9aa..19d698294a 100644
--- a/testsuite/tests/typecheck/should_compile/FD1.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD1.stderr
@@ -1,9 +1,10 @@
-
-FD1.hs:16:1:
- Couldn't match expected type ‘Int -> Int’ with actual type ‘a’
- ‘a’ is a rigid type variable bound by
- the type signature for: plus :: E a (Int -> Int) => Int -> a
- at FD1.hs:15:9
- The equation(s) for ‘plus’ have two arguments,
- but its type ‘Int -> a’ has only one
- Relevant bindings include plus :: Int -> a (bound at FD1.hs:16:1)
+
+FD1.hs:16:1: error:
+ • Couldn't match expected type ‘Int -> Int’ with actual type ‘a’
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ plus :: forall a. E a (Int -> Int) => Int -> a
+ at FD1.hs:15:9
+ • The equation(s) for ‘plus’ have two arguments,
+ but its type ‘Int -> a’ has only one
+ • Relevant bindings include plus :: Int -> a (bound at FD1.hs:16:1)
diff --git a/testsuite/tests/typecheck/should_compile/FD2.stderr b/testsuite/tests/typecheck/should_compile/FD2.stderr
index 590c9b6520..93997c52ec 100644
--- a/testsuite/tests/typecheck/should_compile/FD2.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD2.stderr
@@ -1,19 +1,19 @@
-
-FD2.hs:26:34:
- Couldn't match expected type ‘e1’ with actual type ‘e’
- ‘e’ is a rigid type variable bound by
- the type signature for:
- foldr1 :: Elem a e => (e -> e -> e) -> a -> e
- at FD2.hs:21:13
- ‘e1’ is a rigid type variable bound by
- the type signature for:
- mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
- at FD2.hs:24:18
- In the first argument of ‘Just’, namely ‘(f x y)’
- In the expression: Just (f x y)
- Relevant bindings include
- y :: e1 (bound at FD2.hs:26:23)
- x :: e1 (bound at FD2.hs:26:15)
- mf :: e1 -> Maybe e1 -> Maybe e1 (bound at FD2.hs:25:12)
- f :: e -> e -> e (bound at FD2.hs:22:10)
- foldr1 :: (e -> e -> e) -> a -> e (bound at FD2.hs:22:3)
+
+FD2.hs:26:34: error:
+ • Couldn't match expected type ‘e1’ with actual type ‘e’
+ ‘e’ is a rigid type variable bound by
+ the type signature for:
+ foldr1 :: forall e. Elem a e => (e -> e -> e) -> a -> e
+ at FD2.hs:21:13
+ ‘e1’ is a rigid type variable bound by
+ the type signature for:
+ mf :: forall e1. Elem a e1 => e1 -> Maybe e1 -> Maybe e1
+ at FD2.hs:24:18
+ • In the first argument of ‘Just’, namely ‘(f x y)’
+ In the expression: Just (f x y)
+ • Relevant bindings include
+ y :: e1 (bound at FD2.hs:26:23)
+ x :: e1 (bound at FD2.hs:26:15)
+ mf :: e1 -> Maybe e1 -> Maybe e1 (bound at FD2.hs:25:12)
+ f :: e -> e -> e (bound at FD2.hs:22:10)
+ foldr1 :: (e -> e -> e) -> a -> e (bound at FD2.hs:22:3)
diff --git a/testsuite/tests/typecheck/should_compile/FD3.stderr b/testsuite/tests/typecheck/should_compile/FD3.stderr
index 8d3c33fcaf..f0dafbe47c 100644
--- a/testsuite/tests/typecheck/should_compile/FD3.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD3.stderr
@@ -1,14 +1,15 @@
FD3.hs:15:15: error:
- Couldn't match type ‘a’ with ‘(String, a)’
- arising from a functional dependency between:
- constraint ‘MkA (String, a) a’ arising from a use of ‘mkA’
- instance ‘MkA a1 a1’ at FD3.hs:12:10-16
- ‘a’ is a rigid type variable bound by
- the type signature for: translate :: (String, a) -> A a
+ • Couldn't match type ‘a’ with ‘(String, a)’
+ arising from a functional dependency between:
+ constraint ‘MkA (String, a) a’ arising from a use of ‘mkA’
+ instance ‘MkA a1 a1’ at FD3.hs:12:10-16
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ translate :: forall a. (String, a) -> A a
at FD3.hs:14:14
- In the expression: mkA a
- In an equation for ‘translate’: translate a = mkA a
- Relevant bindings include
- a :: (String, a) (bound at FD3.hs:15:11)
- translate :: (String, a) -> A a (bound at FD3.hs:15:1)
+ • In the expression: mkA a
+ In an equation for ‘translate’: translate a = mkA a
+ • Relevant bindings include
+ a :: (String, a) (bound at FD3.hs:15:11)
+ translate :: (String, a) -> A a (bound at FD3.hs:15:1)
diff --git a/testsuite/tests/typecheck/should_compile/T10632.stderr b/testsuite/tests/typecheck/should_compile/T10632.stderr
index 81377b3364..5a6809de5c 100644
--- a/testsuite/tests/typecheck/should_compile/T10632.stderr
+++ b/testsuite/tests/typecheck/should_compile/T10632.stderr
@@ -1,4 +1,5 @@
-
-T10632.hs:3:6: warning:
- Redundant constraint: ?file1::String
- In the type signature for: f :: (?file1::String) => IO ()
+
+T10632.hs:3:1: warning:
+ Redundant constraint: ?file1::String
+ In the type signature for:
+ f :: (?file1::String) => IO ()
diff --git a/testsuite/tests/typecheck/should_compile/T7220a.stderr b/testsuite/tests/typecheck/should_compile/T7220a.stderr
index ea0331b3dc..b728a1e8d9 100644
--- a/testsuite/tests/typecheck/should_compile/T7220a.stderr
+++ b/testsuite/tests/typecheck/should_compile/T7220a.stderr
@@ -1,14 +1,14 @@
-
-T7220a.hs:17:6:
- Could not deduce (C a b)
- from the context: (C a0 b, TF b ~ Y)
- bound by the type signature for: f :: (C a0 b, TF b ~ Y) => b
- at T7220a.hs:17:6-44
- Possible fix:
- add (C a b) to the context of
- the type signature for: f :: (C a0 b, TF b ~ Y) => b
- In the ambiguity check for the type signature for ‘f’:
- f :: forall a. (forall b. (C a b, TF b ~ Y) => b) -> X
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f’:
- f :: (forall b. (C a b, TF b ~ Y) => b) -> X
+
+T7220a.hs:17:6: error:
+ Could not deduce (C a b)
+ from the context: (C a0 b, TF b ~ Y)
+ bound by the type signature for:
+ f :: (C a0 b, TF b ~ Y) => b
+ at T7220a.hs:17:6-44
+ Possible fix:
+ add (C a b) to the context of
+ the type signature for:
+ f :: (C a0 b, TF b ~ Y) => b
+ In the ambiguity check for ‘f’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature: f :: (forall b. (C a b, TF b ~ Y) => b) -> X
diff --git a/testsuite/tests/typecheck/should_compile/T9834.stderr b/testsuite/tests/typecheck/should_compile/T9834.stderr
index c49e49bb9d..3ce53a0c51 100644
--- a/testsuite/tests/typecheck/should_compile/T9834.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9834.stderr
@@ -1,8 +1,8 @@
-T9834.hs:23:10: Warning:
+T9834.hs:23:10: warning:
Couldn't match type ‘p’ with ‘(->) (p a0)’
- ‘p’ is a rigid type variable bound by
- the class declaration for ‘ApplicativeFix’ at T9834.hs:21:39
+ ‘p’ is a rigid type variable bound by
+ the class declaration for ‘ApplicativeFix’ at T9834.hs:21:39
Expected type: (forall (q :: * -> *).
Applicative q =>
Comp p q a -> Comp p q a)
@@ -20,15 +20,14 @@ T9834.hs:23:10: Warning:
-> p a
(bound at T9834.hs:23:3)
-T9834.hs:23:10: Warning:
+T9834.hs:23:10: warning:
Couldn't match type ‘a’ with ‘p a0’
- ‘a’ is a rigid type variable bound by
- the type signature for:
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- at T9834.hs:22:11
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ afix :: forall a.
+ (forall (q :: * -> *). Applicative q => Comp p q a -> Comp p q a)
+ -> p a
+ at T9834.hs:22:11
Expected type: (forall (q :: * -> *).
Applicative q =>
Comp p q a -> Comp p q a)
@@ -46,19 +45,20 @@ T9834.hs:23:10: Warning:
-> p a
(bound at T9834.hs:23:3)
-T9834.hs:23:10: Warning:
+T9834.hs:23:10: warning:
Couldn't match type ‘a’ with ‘a1’
- ‘a’ is a rigid type variable bound by
- the type signature for:
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- at T9834.hs:22:11
- ‘a1’ is a rigid type variable bound by
- a type expected by the context:
- Applicative q => Comp p q a1 -> Comp p q a1
- at T9834.hs:23:10
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ afix :: forall a.
+ (forall (q :: * -> *). Applicative q => Comp p q a -> Comp p q a)
+ -> p a
+ at T9834.hs:22:11
+ ‘a1’ is a rigid type variable bound by
+ a type expected by the context:
+ forall (q :: * -> *) a1.
+ Applicative q =>
+ Comp p q a1 -> Comp p q a1
+ at T9834.hs:23:10
Expected type: Comp p q a1 -> Comp p q a1
Actual type: Comp p q a -> Comp p q a
In the expression: wrapIdComp
diff --git a/testsuite/tests/typecheck/should_compile/T9939.stderr b/testsuite/tests/typecheck/should_compile/T9939.stderr
index eda780ae0e..86decf0a5e 100644
--- a/testsuite/tests/typecheck/should_compile/T9939.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9939.stderr
@@ -1,18 +1,20 @@
-
-T9939.hs:5:7: Warning:
- Redundant constraint: Eq a
- In the type signature for: f1 :: (Eq a, Ord a) => a -> a -> Bool
-
-T9939.hs:9:7: Warning:
- Redundant constraint: Eq a
- In the type signature for: f2 :: (Eq a, Ord a) => a -> a -> Bool
-
-T9939.hs:13:7: Warning:
- Redundant constraint: Eq b
- In the type signature for:
- f3 :: (Eq a, a ~ b, Eq b) => a -> b -> Bool
-
-T9939.hs:20:7: Warning:
- Redundant constraint: Eq b
- In the type signature for:
- f4 :: (Eq a, Eq b) => a -> b -> Equal a b -> Bool
+
+T9939.hs:5:1: warning:
+ Redundant constraint: Eq a
+ In the type signature for:
+ f1 :: (Eq a, Ord a) => a -> a -> Bool
+
+T9939.hs:9:1: warning:
+ Redundant constraint: Eq a
+ In the type signature for:
+ f2 :: (Eq a, Ord a) => a -> a -> Bool
+
+T9939.hs:13:1: warning:
+ Redundant constraint: Eq b
+ In the type signature for:
+ f3 :: (Eq a, a ~ b, Eq b) => a -> b -> Bool
+
+T9939.hs:20:1: warning:
+ Redundant constraint: Eq b
+ In the type signature for:
+ f4 :: (Eq a, Eq b) => a -> b -> Equal a b -> Bool
diff --git a/testsuite/tests/typecheck/should_compile/tc141.stderr b/testsuite/tests/typecheck/should_compile/tc141.stderr
index 933eb03f55..b5ee77b689 100644
--- a/testsuite/tests/typecheck/should_compile/tc141.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc141.stderr
@@ -1,46 +1,48 @@
-tc141.hs:11:12:
- You cannot bind scoped type variable ‘a’
- in a pattern binding signature
- In the pattern: p :: a
- In the pattern: (p :: a, q :: a)
- In a pattern binding: (p :: a, q :: a) = x
+tc141.hs:11:12: error:
+ • You cannot bind scoped type variable ‘a’
+ in a pattern binding signature
+ • In the pattern: p :: a
+ In the pattern: (p :: a, q :: a)
+ In a pattern binding: (p :: a, q :: a) = x
-tc141.hs:11:31:
- Couldn't match expected type ‘a1’ with actual type ‘a’
- because type variable ‘a1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- an expression type signature: a1
- at tc141.hs:11:31-34
- In the expression: q :: a
- In the expression: (q :: a, p)
- Relevant bindings include
- p :: a (bound at tc141.hs:11:12)
- q :: a (bound at tc141.hs:11:17)
- x :: (a, a) (bound at tc141.hs:11:3)
- f :: (a, a) -> (t, a) (bound at tc141.hs:11:1)
+tc141.hs:11:31: error:
+ • Couldn't match expected type ‘a1’ with actual type ‘a’
+ because type variable ‘a1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ an expression type signature:
+ a1
+ at tc141.hs:11:31-34
+ • In the expression: q :: a
+ In the expression: (q :: a, p)
+ • Relevant bindings include
+ p :: a (bound at tc141.hs:11:12)
+ q :: a (bound at tc141.hs:11:17)
+ x :: (a, a) (bound at tc141.hs:11:3)
+ f :: (a, a) -> (t, a) (bound at tc141.hs:11:1)
-tc141.hs:13:13:
- You cannot bind scoped type variable ‘a’
- in a pattern binding signature
- In the pattern: y :: a
- In a pattern binding: y :: a = a
- In the expression:
- let y :: a = a in
- let
- v :: a
- v = b
- in v
+tc141.hs:13:13: error:
+ • You cannot bind scoped type variable ‘a’
+ in a pattern binding signature
+ • In the pattern: y :: a
+ In a pattern binding: y :: a = a
+ In the expression:
+ let y :: a = a in
+ let
+ v :: a
+ v = b
+ in v
-tc141.hs:15:18:
- Couldn't match expected type ‘a2’ with actual type ‘t’
- because type variable ‘a2’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for: v :: a2
- at tc141.hs:14:19
- In the expression: b
- In an equation for ‘v’: v = b
- Relevant bindings include
- v :: a2 (bound at tc141.hs:15:14)
- b :: t (bound at tc141.hs:13:5)
- g :: a -> t -> a1 (bound at tc141.hs:13:1)
+tc141.hs:15:18: error:
+ • Couldn't match expected type ‘a2’ with actual type ‘t’
+ because type variable ‘a2’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ v :: a2
+ at tc141.hs:14:14-19
+ • In the expression: b
+ In an equation for ‘v’: v = b
+ • Relevant bindings include
+ v :: a2 (bound at tc141.hs:15:14)
+ b :: t (bound at tc141.hs:13:5)
+ g :: a -> t -> a1 (bound at tc141.hs:13:1)
diff --git a/testsuite/tests/typecheck/should_compile/tc166.hs b/testsuite/tests/typecheck/should_compile/tc166.hs
index 75ea65c650..5739a347c8 100644
--- a/testsuite/tests/typecheck/should_compile/tc166.hs
+++ b/testsuite/tests/typecheck/should_compile/tc166.hs
@@ -14,9 +14,9 @@ module ShouldCompile where
instance C Char a Bool
data P t a = forall b. (C t a b) => MkP b
-
+
data Q t = MkQ (forall a. P t a)
-
+
f1 :: Q Char
f1 = MkQ (MkP True)
diff --git a/testsuite/tests/typecheck/should_compile/tc168.stderr b/testsuite/tests/typecheck/should_compile/tc168.stderr
index 4eca08f17c..7d992a48a0 100644
--- a/testsuite/tests/typecheck/should_compile/tc168.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc168.stderr
@@ -1,10 +1,12 @@
-
-tc168.hs:17:1:
- Could not deduce (C a1 (a, b0))
- from the context: C a1 (a, b)
- bound by the inferred type for ‘g’: C a1 (a, b) => a1 -> a
- at tc168.hs:17:1-16
- The type variable ‘b0’ is ambiguous
- When checking that ‘g’ has the inferred type
- g :: forall a b a1. C a1 (a, b) => a1 -> a
- Probable cause: the inferred type is ambiguous
+
+tc168.hs:17:1: error:
+ Could not deduce (C a1 (a, b0))
+ from the context: C a1 (a, b)
+ bound by the inferred type for ‘g’:
+ C a1 (a, b) => a1 -> a
+ at tc168.hs:17:1-16
+ The type variable ‘b0’ is ambiguous
+ In the ambiguity check for the inferred type for ‘g’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the inferred type
+ g :: forall a b a1. C a1 (a, b) => a1 -> a
diff --git a/testsuite/tests/typecheck/should_compile/tc182.hs b/testsuite/tests/typecheck/should_compile/tc182.hs
index f6e9164f47..00b3f724de 100644
--- a/testsuite/tests/typecheck/should_compile/tc182.hs
+++ b/testsuite/tests/typecheck/should_compile/tc182.hs
@@ -9,5 +9,3 @@ data (Show a) => Obs a = forall b. LiftObs a b
f :: Show a => Obs a -> String
f (LiftObs _ _) = "yes"
-
-
diff --git a/testsuite/tests/typecheck/should_compile/tc244.hs b/testsuite/tests/typecheck/should_compile/tc244.hs
index 4c5468809a..196f6e0990 100644
--- a/testsuite/tests/typecheck/should_compile/tc244.hs
+++ b/testsuite/tests/typecheck/should_compile/tc244.hs
@@ -1,30 +1,32 @@
-{-# LANGUAGE TypeFamilies, GADTs #-}
-
--- Tests record update in the presence of
--- existentials, GADTs, type families
-
-module Rec where
-
------------------ Existential
-data S a where
- S1 :: { fs1 :: a, fs2 :: b } -> S a
- S2 :: { fs1 :: a } -> S a
-
-updS s x = s { fs1=x }
-
------------------- GADT
-data T a b where
- T1 :: { ft1 :: a, ft2 :: c, ft3 :: d } -> T a Int
- T2 :: { ft1 :: a, ft3 :: c } -> T a Int
- T3 :: T Int b
-
-f :: T a1 b -> a2 -> T a2 b
-f x v = x { ft1 = v }
-
------------------- Type family
-data family R a
-data instance R (a,b) where
- R1 :: { fr1 :: a, fr2 :: b, fr3 :: c } -> R (a,b)
- R2 :: { fr1 :: a, fr3 :: c } -> R (a,b)
-
-updR r x = r { fr1=x }
+{-# LANGUAGE TypeFamilies, GADTs #-}
+
+-- Tests record update in the presence of
+-- existentials, GADTs, type families
+
+module Rec where
+
+----------------- Existential
+data S a where
+ S1 :: { fs1 :: a, fs2 :: b } -> S a
+ S2 :: { fs1 :: a } -> S a
+
+updS s x = s { fs1=x }
+
+{-
+------------------ GADT
+data T a b where
+ T1 :: { ft1 :: a, ft2 :: c, ft3 :: d } -> T a Int
+ T2 :: { ft1 :: a, ft3 :: c } -> T a Int
+ T3 :: T Int b
+
+f :: T a1 b -> a2 -> T a2 b
+f x v = x { ft1 = v }
+
+------------------ Type family
+data family R a
+data instance R (a,b) where
+ R1 :: { fr1 :: a, fr2 :: b, fr3 :: c } -> R (a,b)
+ R2 :: { fr1 :: a, fr3 :: c } -> R (a,b)
+
+updR r x = r { fr1=x }
+-}
diff --git a/testsuite/tests/typecheck/should_fail/ContextStack2.stderr b/testsuite/tests/typecheck/should_fail/ContextStack2.stderr
index 1a6d1d26aa..4c92698f02 100644
--- a/testsuite/tests/typecheck/should_fail/ContextStack2.stderr
+++ b/testsuite/tests/typecheck/should_fail/ContextStack2.stderr
@@ -1,13 +1,12 @@
-
-ContextStack2.hs:8:6:
- Reduction stack overflow; size = 11
- When simplifying the following type:
- TF (TF (TF (TF (TF a))))
- ~ (TF (TF (TF (TF (TF (TF a))))), TF (TF (TF (TF (TF (TF Int))))))
- Use -freduction-depth=0 to disable this check
- (any upper bound you could choose might fail unpredictably with
- minor updates to GHC, so disabling the check is recommended if
- you're sure that type checking should terminate)
- In the ambiguity check for the type signature for ‘t’:
- t :: forall a. (a ~ TF (a, Int)) => Int
- In the type signature for ‘t’: t :: (a ~ TF (a, Int)) => Int
+
+ContextStack2.hs:8:6: error:
+ Reduction stack overflow; size = 11
+ When simplifying the following type:
+ TF (TF (TF (TF (TF a))))
+ ~ (TF (TF (TF (TF (TF (TF a))))), TF (TF (TF (TF (TF (TF Int))))))
+ Use -freduction-depth=0 to disable this check
+ (any upper bound you could choose might fail unpredictably with
+ minor updates to GHC, so disabling the check is recommended if
+ you're sure that type checking should terminate)
+ In the ambiguity check for ‘t’
+ In the type signature: t :: (a ~ TF (a, Int)) => Int
diff --git a/testsuite/tests/typecheck/should_fail/CustomTypeErrors02.stderr b/testsuite/tests/typecheck/should_fail/CustomTypeErrors02.stderr
index 02ae25931a..464c62d244 100644
--- a/testsuite/tests/typecheck/should_fail/CustomTypeErrors02.stderr
+++ b/testsuite/tests/typecheck/should_fail/CustomTypeErrors02.stderr
@@ -1,7 +1,7 @@
CustomTypeErrors02.hs:17:1: error:
• The type 'a_aEN -> a_aEN' cannot be represented as an integer.
- • When checking that ‘err’ has the inferred type
+ • When checking the inferred type
err :: (TypeError ...)
CustomTypeErrors02.hs:17:7: error:
diff --git a/testsuite/tests/typecheck/should_fail/CustomTypeErrors03.stderr b/testsuite/tests/typecheck/should_fail/CustomTypeErrors03.stderr
index 330fadb6fd..b1ceb26b5e 100644
--- a/testsuite/tests/typecheck/should_fail/CustomTypeErrors03.stderr
+++ b/testsuite/tests/typecheck/should_fail/CustomTypeErrors03.stderr
@@ -1,5 +1,5 @@
CustomTypeErrors03.hs:6:6: error:
This is a type error
- In the type signature for ‘f’:
+ In the type signature:
f :: TypeError (Text "This is a type error")
diff --git a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
index a2a9928181..a2cab99ae9 100644
--- a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
+++ b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
@@ -1,17 +1,18 @@
-
-FDsFromGivens.hs:9:7: error:
- Couldn't match type ‘[a]’ with ‘Bool’
- arising from a functional dependency between constraints:
- ‘C Char Bool’
- arising from the type signature for:
- g1 :: (C Char [a], C Char Bool) => a -> ()
- at FDsFromGivens.hs:9:7-42
- ‘C Char [a]’
- arising from the type signature for:
- g1 :: (C Char [a], C Char Bool) => a -> ()
- at FDsFromGivens.hs:9:7-42
- In the ambiguity check for the type signature for ‘g1’:
- g1 :: forall a. (C Char [a], C Char Bool) => a -> ()
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘g1’:
- g1 :: (C Char [a], C Char Bool) => a -> ()
+
+FDsFromGivens.hs:9:7: error:
+ Couldn't match type ‘[a]’ with ‘Bool’
+ arising from a functional dependency between constraints:
+ ‘C Char Bool’
+ arising from the type signature for:
+ g1 :: (C Char [a], C Char Bool) => a -> ()
+ at FDsFromGivens.hs:9:7-42
+ ‘C Char [a]’
+ arising from the type signature for:
+ g1 :: (C Char [a], C Char Bool) => a -> ()
+ at FDsFromGivens.hs:9:7-42
+ Inaccessible code in
+ the type signature for:
+ g1 :: (C Char [a], C Char Bool) => a -> ()
+ In the ambiguity check for ‘g1’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature: g1 :: (C Char [a], C Char Bool) => a -> ()
diff --git a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
index 62354d3f02..b9a2629e32 100644
--- a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
+++ b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
@@ -1,12 +1,13 @@
-
-FailDueToGivenOverlapping.hs:27:9:
- Overlapping instances for E [t0] arising from a use of ‘eop’
- Matching givens (or their superclasses):
- E [Int]
- bound by the type signature for: bar :: E [Int] => () -> ()
- at FailDueToGivenOverlapping.hs:26:8-26
- Matching instances:
- instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10
- (The choice depends on the instantiation of ‘t0’)
- In the expression: eop [undefined]
- In an equation for ‘bar’: bar _ = eop [undefined]
+
+FailDueToGivenOverlapping.hs:27:9: error:
+ Overlapping instances for E [t0] arising from a use of ‘eop’
+ Matching givens (or their superclasses):
+ E [Int]
+ bound by the type signature for:
+ bar :: E [Int] => () -> ()
+ at FailDueToGivenOverlapping.hs:26:1-26
+ Matching instances:
+ instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10
+ (The choice depends on the instantiation of ‘t0’)
+ In the expression: eop [undefined]
+ In an equation for ‘bar’: bar _ = eop [undefined]
diff --git a/testsuite/tests/typecheck/should_fail/IPFail.stderr b/testsuite/tests/typecheck/should_fail/IPFail.stderr
index 963ccd8b54..59aac31632 100644
--- a/testsuite/tests/typecheck/should_fail/IPFail.stderr
+++ b/testsuite/tests/typecheck/should_fail/IPFail.stderr
@@ -2,8 +2,9 @@
IPFail.hs:6:18: error:
Could not deduce (Num Bool) arising from the literal ‘5’
from the context: ?x::Int
- bound by the type signature for: f0 :: (?x::Int) => () -> Bool
- at IPFail.hs:5:7-31
+ bound by the type signature for:
+ f0 :: (?x::Int) => () -> Bool
+ at IPFail.hs:5:1-31
In the expression: 5
In the expression: let ?x = 5 in ?x
In an equation for ‘f0’: f0 () = let ?x = 5 in ?x
diff --git a/testsuite/tests/typecheck/should_fail/T10285.stderr b/testsuite/tests/typecheck/should_fail/T10285.stderr
index d14bc3b427..b7bba0f575 100644
--- a/testsuite/tests/typecheck/should_fail/T10285.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10285.stderr
@@ -1,20 +1,22 @@
T10285.hs:8:17: error:
- Could not deduce: Coercible a b arising from a use of ‘coerce’
- from the context: Coercible (N a) (N b)
- bound by a pattern with constructor:
- Coercion :: forall (k :: BOX) (a :: k) (b :: k).
- Coercible a b =>
- Coercion a b,
- in an equation for ‘oops’
- at T10285.hs:8:6-13
+ • Could not deduce: Coercible a b arising from a use of ‘coerce’
+ from the context: Coercible (N a) (N b)
+ bound by a pattern with constructor:
+ Coercion :: forall (k :: BOX) (a :: k) (b :: k).
+ Coercible a b =>
+ Coercion a b,
+ in an equation for ‘oops’
+ at T10285.hs:8:6-13
‘a’ is a rigid type variable bound by
- the type signature for: oops :: Coercion (N a) (N b) -> a -> b
- at T10285.hs:7:9
+ the type signature for:
+ oops :: forall a b. Coercion (N a) (N b) -> a -> b
+ at T10285.hs:7:9
‘b’ is a rigid type variable bound by
- the type signature for: oops :: Coercion (N a) (N b) -> a -> b
- at T10285.hs:7:9
- In the expression: coerce
- In an equation for ‘oops’: oops Coercion = coerce
- Relevant bindings include
- oops :: Coercion (N a) (N b) -> a -> b (bound at T10285.hs:8:1)
+ the type signature for:
+ oops :: forall a b. Coercion (N a) (N b) -> a -> b
+ at T10285.hs:7:9
+ • In the expression: coerce
+ In an equation for ‘oops’: oops Coercion = coerce
+ • Relevant bindings include
+ oops :: Coercion (N a) (N b) -> a -> b (bound at T10285.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/T10351.stderr b/testsuite/tests/typecheck/should_fail/T10351.stderr
index 58c28e463d..4a9e38eb3e 100644
--- a/testsuite/tests/typecheck/should_fail/T10351.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10351.stderr
@@ -2,5 +2,5 @@
T10351.hs:6:1: error:
Non type-variable argument in the constraint: C [t]
(Use FlexibleContexts to permit this)
- When checking that ‘f’ has the inferred type
+ When checking the inferred type
f :: forall t. C [t] => t -> ()
diff --git a/testsuite/tests/typecheck/should_fail/T10534.stderr b/testsuite/tests/typecheck/should_fail/T10534.stderr
index 41deac7063..ecdb6d2935 100644
--- a/testsuite/tests/typecheck/should_fail/T10534.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10534.stderr
@@ -1,17 +1,19 @@
T10534a.hs:10:9: error:
- Could not deduce: Coercible a b arising from a use of ‘coerce’
- from the context: Coercible (DF a) (DF b)
- bound by the type signature for:
- silly :: Coercible (DF a) (DF b) => a -> b
- at T10534a.hs:9:10-42
+ • Could not deduce: Coercible a b arising from a use of ‘coerce’
+ from the context: Coercible (DF a) (DF b)
+ bound by the type signature for:
+ silly :: Coercible (DF a) (DF b) => a -> b
+ at T10534a.hs:9:1-42
‘a’ is a rigid type variable bound by
- the type signature for: silly :: Coercible (DF a) (DF b) => a -> b
- at T10534a.hs:9:10
+ the type signature for:
+ silly :: forall a b. Coercible (DF a) (DF b) => a -> b
+ at T10534a.hs:9:10
‘b’ is a rigid type variable bound by
- the type signature for: silly :: Coercible (DF a) (DF b) => a -> b
- at T10534a.hs:9:10
- In the expression: coerce
- In an equation for ‘silly’: silly = coerce
- Relevant bindings include
- silly :: a -> b (bound at T10534a.hs:10:1)
+ the type signature for:
+ silly :: forall a b. Coercible (DF a) (DF b) => a -> b
+ at T10534a.hs:9:10
+ • In the expression: coerce
+ In an equation for ‘silly’: silly = coerce
+ • Relevant bindings include
+ silly :: a -> b (bound at T10534a.hs:10:1)
diff --git a/testsuite/tests/typecheck/should_fail/T10715.stderr b/testsuite/tests/typecheck/should_fail/T10715.stderr
index e6f85a5256..0bbaa35573 100644
--- a/testsuite/tests/typecheck/should_fail/T10715.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10715.stderr
@@ -2,14 +2,13 @@
T10715.hs:9:13: error:
Couldn't match representation of type ‘a’ with that of ‘X a’
‘a’ is a rigid type variable bound by
- the type signature for:
- doCoerce :: Coercible a (X a) => a -> X a
- at T10715.hs:9:13
+ the type signature for:
+ doCoerce :: forall a. Coercible a (X a) => a -> X a
+ at T10715.hs:9:13
Inaccessible code in
the type signature for:
doCoerce :: Coercible a (X a) => a -> X a
- In the ambiguity check for the type signature for ‘doCoerce’:
- doCoerce :: forall a. Coercible a (X a) => a -> X a
+ In the ambiguity check for ‘doCoerce’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘doCoerce’:
+ In the type signature:
doCoerce :: Coercible a (X a) => a -> X a
diff --git a/testsuite/tests/typecheck/should_fail/T11112.stderr b/testsuite/tests/typecheck/should_fail/T11112.stderr
index da0ab532a7..3534d33b51 100644
--- a/testsuite/tests/typecheck/should_fail/T11112.stderr
+++ b/testsuite/tests/typecheck/should_fail/T11112.stderr
@@ -1,4 +1,5 @@
T11112.hs:3:9: error:
- Constraint ‘Ord s’ used as a type
- In the type signature for ‘sort’: sort :: Ord s -> [s] -> [s]
+ • Constraint ‘Ord s’ used as a type
+ • In the type signature:
+ sort :: Ord s -> [s] -> [s]
diff --git a/testsuite/tests/typecheck/should_fail/T1897a.stderr b/testsuite/tests/typecheck/should_fail/T1897a.stderr
index 5e7a590fa5..101caab6e7 100644
--- a/testsuite/tests/typecheck/should_fail/T1897a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1897a.stderr
@@ -1,10 +1,12 @@
-
-T1897a.hs:9:1:
- Could not deduce (Wob a0 b)
- from the context: Wob a b
- bound by the inferred type for ‘foo’: Wob a b => b -> [b]
- at T1897a.hs:9:1-24
- The type variable ‘a0’ is ambiguous
- When checking that ‘foo’ has the inferred type
- foo :: forall a b. Wob a b => b -> [b]
- Probable cause: the inferred type is ambiguous
+
+T1897a.hs:9:1: error:
+ Could not deduce (Wob a0 b)
+ from the context: Wob a b
+ bound by the inferred type for ‘foo’:
+ Wob a b => b -> [b]
+ at T1897a.hs:9:1-24
+ The type variable ‘a0’ is ambiguous
+ In the ambiguity check for the inferred type for ‘foo’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the inferred type
+ foo :: forall a b. Wob a b => b -> [b]
diff --git a/testsuite/tests/typecheck/should_fail/T1899.stderr b/testsuite/tests/typecheck/should_fail/T1899.stderr
index d41c96a787..8c2964cfc6 100644
--- a/testsuite/tests/typecheck/should_fail/T1899.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1899.stderr
@@ -1,13 +1,14 @@
T1899.hs:14:36: error:
- Couldn't match type ‘a’ with ‘Proposition a0’
+ • Couldn't match type ‘a’ with ‘Proposition a0’
‘a’ is a rigid type variable bound by
- the type signature for: transRHS :: [a] -> Int -> Constraint a
- at T1899.hs:9:14
- Expected type: [Proposition a0]
- Actual type: [a]
- In the first argument of ‘Auxiliary’, namely ‘varSet’
- In the first argument of ‘Prop’, namely ‘(Auxiliary varSet)’
- Relevant bindings include
- varSet :: [a] (bound at T1899.hs:10:11)
- transRHS :: [a] -> Int -> Constraint a (bound at T1899.hs:10:2)
+ the type signature for:
+ transRHS :: forall a. [a] -> Int -> Constraint a
+ at T1899.hs:9:14
+ Expected type: [Proposition a0]
+ Actual type: [a]
+ • In the first argument of ‘Auxiliary’, namely ‘varSet’
+ In the first argument of ‘Prop’, namely ‘(Auxiliary varSet)’
+ • Relevant bindings include
+ varSet :: [a] (bound at T1899.hs:10:11)
+ transRHS :: [a] -> Int -> Constraint a (bound at T1899.hs:10:2)
diff --git a/testsuite/tests/typecheck/should_fail/T2538.stderr b/testsuite/tests/typecheck/should_fail/T2538.stderr
index 94583a42b4..a905d95b48 100644
--- a/testsuite/tests/typecheck/should_fail/T2538.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2538.stderr
@@ -1,14 +1,14 @@
-
-T2538.hs:6:6: error:
- Illegal polymorphic or qualified type: Eq a => a -> a
- Perhaps you intended to use RankNTypes or Rank2Types
- In the type signature for ‘f’: f :: (Eq a => a -> a) -> Int
-
-T2538.hs:9:6: error:
- Illegal polymorphic or qualified type: Eq a => a -> a
- GHC doesn't yet support impredicative polymorphism
- In the type signature for ‘g’: g :: [Eq a => a -> a] -> Int
-
-T2538.hs:12:6: error:
- Illegal polymorphic or qualified type: Eq a => a -> a
- In the type signature for ‘h’: h :: Ix (Eq a => a -> a) => Int
+
+T2538.hs:6:6: error:
+ Illegal polymorphic or qualified type: Eq a => a -> a
+ Perhaps you intended to use RankNTypes or Rank2Types
+ In the type signature: f :: (Eq a => a -> a) -> Int
+
+T2538.hs:9:6: error:
+ Illegal polymorphic or qualified type: Eq a => a -> a
+ GHC doesn't yet support impredicative polymorphism
+ In the type signature: g :: [Eq a => a -> a] -> Int
+
+T2538.hs:12:6: error:
+ Illegal polymorphic or qualified type: Eq a => a -> a
+ In the type signature: h :: Ix (Eq a => a -> a) => Int
diff --git a/testsuite/tests/typecheck/should_fail/T2714.stderr b/testsuite/tests/typecheck/should_fail/T2714.stderr
index 07a925cc10..0991ddeec0 100644
--- a/testsuite/tests/typecheck/should_fail/T2714.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2714.stderr
@@ -1,9 +1,10 @@
-T2714.hs:8:5:
+T2714.hs:8:5: error:
Couldn't match type ‘a’ with ‘f0 b’
- ‘a’ is a rigid type variable bound by
- the type signature for: f :: ((a -> b) -> b) -> forall c. c -> a
- at T2714.hs:7:6
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ f :: forall a b. ((a -> b) -> b) -> forall c. c -> a
+ at T2714.hs:7:6
Expected type: ((a -> b) -> b) -> c -> a
Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
In the expression: ffmap
@@ -11,11 +12,12 @@ T2714.hs:8:5:
Relevant bindings include
f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
-T2714.hs:8:5:
+T2714.hs:8:5: error:
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) -> c -> a
- at T2714.hs:8:1
+ ‘c’ is a rigid type variable bound by
+ the type signature for:
+ f :: forall c. ((a -> b) -> b) -> c -> a
+ at T2714.hs:8:1
Expected type: ((a -> b) -> b) -> c -> a
Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
In the expression: ffmap
diff --git a/testsuite/tests/typecheck/should_fail/T3102.stderr b/testsuite/tests/typecheck/should_fail/T3102.stderr
index d23a2729c1..925e80f7fc 100644
--- a/testsuite/tests/typecheck/should_fail/T3102.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3102.stderr
@@ -1,9 +1,11 @@
-
-T3102.hs:11:12:
- Couldn't match type ‘a’ with ‘(?p::Int) => a0’
- ‘a’ is a rigid type variable bound by
- a type expected by the context: a -> String at T3102.hs:11:10
- Expected type: a -> String
- Actual type: ((?p::Int) => a0) -> String
- In the first argument of ‘f’, namely ‘t’
- In the expression: f t
+
+T3102.hs:11:12: error:
+ Couldn't match type ‘a’ with ‘(?p::Int) => a0’
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context:
+ forall a. a -> String
+ at T3102.hs:11:10
+ Expected type: a -> String
+ Actual type: ((?p::Int) => a0) -> String
+ In the first argument of ‘f’, namely ‘t’
+ In the expression: f t
diff --git a/testsuite/tests/typecheck/should_fail/T3540.stderr b/testsuite/tests/typecheck/should_fail/T3540.stderr
index 9867b7401e..75c9dc2ea1 100644
--- a/testsuite/tests/typecheck/should_fail/T3540.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3540.stderr
@@ -1,20 +1,25 @@
T3540.hs:4:12: error:
- Constraint ‘a ~ Int’ used as a type
- In the type signature for ‘thing’: thing :: a ~ Int
+ • Constraint ‘a ~ Int’ used as a type
+ • In the type signature:
+ thing :: a ~ Int
T3540.hs:7:20: error:
- Constraint ‘a ~ Int’ used as a type
- In the type signature for ‘thing1’: thing1 :: Int -> (a ~ Int)
+ • Constraint ‘a ~ Int’ used as a type
+ • In the type signature:
+ thing1 :: Int -> (a ~ Int)
T3540.hs:10:13: error:
- Constraint ‘a ~ Int’ used as a type
- In the type signature for ‘thing2’: thing2 :: (a ~ Int) -> Int
+ • Constraint ‘a ~ Int’ used as a type
+ • In the type signature:
+ thing2 :: (a ~ Int) -> Int
T3540.hs:13:12: error:
- Constraint ‘?dude :: Int’ used as a type
- In the type signature for ‘thing3’: thing3 :: (?dude :: Int) -> Int
+ • Constraint ‘?dude :: Int’ used as a type
+ • In the type signature:
+ thing3 :: (?dude :: Int) -> Int
T3540.hs:16:11: error:
- Constraint ‘Eq a’ used as a type
- In the type signature for ‘thing4’: thing4 :: (Eq a) -> Int
+ • Constraint ‘Eq a’ used as a type
+ • In the type signature:
+ thing4 :: (Eq a) -> Int
diff --git a/testsuite/tests/typecheck/should_fail/T4875.stderr b/testsuite/tests/typecheck/should_fail/T4875.stderr
index 6f885d24fe..98584a44f0 100644
--- a/testsuite/tests/typecheck/should_fail/T4875.stderr
+++ b/testsuite/tests/typecheck/should_fail/T4875.stderr
@@ -1,5 +1,5 @@
-
-T4875.hs:27:24:
- ‘r’ is applied to too many type arguments
- In the type ‘r c -> [c]’
- In the class declaration for ‘Morphic’
+
+T4875.hs:27:24: error:
+ ‘r’ is applied to too many type arguments
+ In the type signature: multiplicities :: r c -> [c]
+ In the class declaration for ‘Morphic’
diff --git a/testsuite/tests/typecheck/should_fail/T5236.stderr b/testsuite/tests/typecheck/should_fail/T5236.stderr
index c1cbae3699..825218c926 100644
--- a/testsuite/tests/typecheck/should_fail/T5236.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5236.stderr
@@ -1,11 +1,14 @@
-T5236.hs:13:9:
+T5236.hs:13:9: error:
Couldn't match type ‘B’ with ‘A’
- arising from a functional dependency between:
- constraint ‘Id A B’
- arising from the type signature for: loop :: Id A B => Bool
- instance ‘Id B B’ at T5236.hs:11:10-15
- In the ambiguity check for the type signature for ‘loop’:
- loop :: Id A B => Bool
+ arising from a functional dependency between:
+ constraint ‘Id A B’
+ arising from the type signature for:
+ loop :: Id A B => Bool
+ instance ‘Id B B’ at T5236.hs:11:10-15
+ Inaccessible code in
+ the type signature for:
+ loop :: Id A B => Bool
+ In the ambiguity check for ‘loop’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘loop’: loop :: Id A B => Bool
+ In the type signature: loop :: Id A B => Bool
diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr
index 524edc4446..f751249677 100644
--- a/testsuite/tests/typecheck/should_fail/T5300.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5300.stderr
@@ -6,12 +6,9 @@ T5300.hs:11:7: error:
f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
at T5300.hs:11:7-50
The type variable ‘c0’ is ambiguous
- • In the ambiguity check for the type signature for ‘f1’:
- f1 :: forall a b (m :: * -> *) c.
- (Monad m, C1 a b c) =>
- a -> StateT (T b) m a
+ • In the ambiguity check for ‘f1’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f1’:
+ In the type signature:
f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
T5300.hs:14:7: error:
@@ -22,11 +19,8 @@ T5300.hs:14:7: error:
a1 -> StateT (T b2) m a2
at T5300.hs:14:7-69
The type variable ‘c20’ is ambiguous
- • In the ambiguity check for the type signature for ‘f2’:
- f2 :: forall a1 b2 (m :: * -> *) a2 b1 c1 c2.
- (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
- a1 -> StateT (T b2) m a2
+ • In the ambiguity check for ‘f2’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f2’:
+ In the type signature:
f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
a1 -> StateT (T b2) m a2
diff --git a/testsuite/tests/typecheck/should_fail/T5957.stderr b/testsuite/tests/typecheck/should_fail/T5957.stderr
index 1c457ad6fb..c960ba9689 100644
--- a/testsuite/tests/typecheck/should_fail/T5957.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5957.stderr
@@ -1,6 +1,5 @@
-
-T5957.hs:3:9:
- Illegal polymorphic or qualified type: Show a => a -> String
- Perhaps you intended to use RankNTypes or Rank2Types
- In the type signature for ‘flex’:
- flex :: Int -> Show a => a -> String
+
+T5957.hs:3:9: error:
+ Illegal polymorphic or qualified type: Show a => a -> String
+ Perhaps you intended to use RankNTypes or Rank2Types
+ In the type signature: flex :: Int -> Show a => a -> String
diff --git a/testsuite/tests/typecheck/should_fail/T6022.stderr b/testsuite/tests/typecheck/should_fail/T6022.stderr
index a3cd78e2e1..61d44b2497 100644
--- a/testsuite/tests/typecheck/should_fail/T6022.stderr
+++ b/testsuite/tests/typecheck/should_fail/T6022.stderr
@@ -2,5 +2,5 @@
T6022.hs:3:1: error:
Non type-variable argument in the constraint: Eq ([a] -> a)
(Use FlexibleContexts to permit this)
- When checking that ‘f’ has the inferred type
+ When checking the inferred type
f :: forall a. Eq ([a] -> a) => ([a] -> a) -> Bool
diff --git a/testsuite/tests/typecheck/should_fail/T7279.stderr b/testsuite/tests/typecheck/should_fail/T7279.stderr
index 33af730620..ca30f48069 100644
--- a/testsuite/tests/typecheck/should_fail/T7279.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7279.stderr
@@ -1,11 +1,10 @@
-
-T7279.hs:6:10:
- Could not deduce (Show b0)
- from the context: (Eq a, Show b)
- bound by an instance declaration: (Eq a, Show b) => Eq (T a)
- at T7279.hs:6:10-35
- The type variable ‘b0’ is ambiguous
- In the ambiguity check for an instance declaration:
- forall a b. (Eq a, Show b) => Eq (T a)
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the instance declaration for ‘Eq (T a)’
+
+T7279.hs:6:10: error:
+ Could not deduce (Show b0)
+ from the context: (Eq a, Show b)
+ bound by an instance declaration: (Eq a, Show b) => Eq (T a)
+ at T7279.hs:6:10-35
+ The type variable ‘b0’ is ambiguous
+ In the ambiguity check for an instance declaration
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the instance declaration for ‘Eq (T a)’
diff --git a/testsuite/tests/typecheck/should_fail/T7410.stderr b/testsuite/tests/typecheck/should_fail/T7410.stderr
index 8126362633..46c7a8c2fc 100644
--- a/testsuite/tests/typecheck/should_fail/T7410.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7410.stderr
@@ -1,6 +1,6 @@
-
-T7410.hs:3:9:
- Expecting one more argument to ‘Either Int’
- The first argument of a tuple should have kind ‘*’,
- but ‘Either Int’ has kind ‘* -> *’
- In the type signature for ‘foo’: foo :: (Either Int, Int)
+
+T7410.hs:3:9: error:
+ Expecting one more argument to ‘Either Int’
+ The first argument of a tuple should have kind ‘*’,
+ but ‘Either Int’ has kind ‘* -> *’
+ In the type signature: foo :: (Either Int, Int)
diff --git a/testsuite/tests/typecheck/should_fail/T7453.stderr b/testsuite/tests/typecheck/should_fail/T7453.stderr
index 4ca1218772..d3b76c54bf 100644
--- a/testsuite/tests/typecheck/should_fail/T7453.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7453.stderr
@@ -1,45 +1,48 @@
T7453.hs:10:30: error:
- Couldn't match expected type ‘t1’ with actual type ‘t’
- because type variable ‘t1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for: z :: Id t1
- at T7453.hs:8:16-19
- In the first argument of ‘Id’, namely ‘v’
- In the expression: Id v
- Relevant bindings include
- aux :: Id t1 (bound at T7453.hs:10:21)
- z :: Id t1 (bound at T7453.hs:9:11)
- v :: t (bound at T7453.hs:7:7)
- cast1 :: t -> a (bound at T7453.hs:7:1)
+ • Couldn't match expected type ‘t1’ with actual type ‘t’
+ because type variable ‘t1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ z :: Id t1
+ at T7453.hs:8:11-19
+ • In the first argument of ‘Id’, namely ‘v’
+ In the expression: Id v
+ • Relevant bindings include
+ aux :: Id t1 (bound at T7453.hs:10:21)
+ z :: Id t1 (bound at T7453.hs:9:11)
+ v :: t (bound at T7453.hs:7:7)
+ cast1 :: t -> a (bound at T7453.hs:7:1)
T7453.hs:16:33: error:
- Couldn't match expected type ‘t2’ with actual type ‘t’
- because type variable ‘t2’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for: z :: () -> t2
- at T7453.hs:14:16-22
- In the first argument of ‘const’, namely ‘v’
- In the expression: const v
- Relevant bindings include
- aux :: b -> t2 (bound at T7453.hs:16:21)
- z :: () -> t2 (bound at T7453.hs:15:11)
- v :: t (bound at T7453.hs:13:7)
- cast2 :: t -> t1 (bound at T7453.hs:13:1)
+ • Couldn't match expected type ‘t2’ with actual type ‘t’
+ because type variable ‘t2’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ z :: () -> t2
+ at T7453.hs:14:11-22
+ • In the first argument of ‘const’, namely ‘v’
+ In the expression: const v
+ • Relevant bindings include
+ aux :: b -> t2 (bound at T7453.hs:16:21)
+ z :: () -> t2 (bound at T7453.hs:15:11)
+ v :: t (bound at T7453.hs:13:7)
+ cast2 :: t -> t1 (bound at T7453.hs:13:1)
T7453.hs:21:15: error:
- Couldn't match expected type ‘t2’ with actual type ‘t’
- because type variable ‘t2’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for: z :: t2
- at T7453.hs:20:16
- In the expression: v
- In an equation for ‘z’:
- z = v
- where
- aux = const v
- Relevant bindings include
- aux :: forall b. b -> t2 (bound at T7453.hs:22:21)
- z :: t2 (bound at T7453.hs:21:11)
- v :: t (bound at T7453.hs:19:7)
- cast3 :: t -> t1 (bound at T7453.hs:19:1)
+ • Couldn't match expected type ‘t2’ with actual type ‘t’
+ because type variable ‘t2’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ z :: t2
+ at T7453.hs:20:11-16
+ • In the expression: v
+ In an equation for ‘z’:
+ z = v
+ where
+ aux = const v
+ • Relevant bindings include
+ aux :: forall b. b -> t2 (bound at T7453.hs:22:21)
+ z :: t2 (bound at T7453.hs:21:11)
+ v :: t (bound at T7453.hs:19:7)
+ cast3 :: t -> t1 (bound at T7453.hs:19:1)
diff --git a/testsuite/tests/typecheck/should_fail/T7609.stderr b/testsuite/tests/typecheck/should_fail/T7609.stderr
index b02dbe20f8..c5ed9fcad9 100644
--- a/testsuite/tests/typecheck/should_fail/T7609.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7609.stderr
@@ -1,10 +1,10 @@
-
-T7609.hs:7:16:
- Expecting one more argument to ‘Maybe’
- The second argument of a tuple should have kind ‘*’,
- but ‘Maybe’ has kind ‘* -> *’
- In the type signature for ‘f’: f :: (a `X` a, Maybe)
-
-T7609.hs:10:7:
- Expected a constraint, but ‘a `X` a’ has kind ‘*’
- In the type signature for ‘g’: g :: (a `X` a) => Maybe
+
+T7609.hs:7:16: error:
+ Expecting one more argument to ‘Maybe’
+ The second argument of a tuple should have kind ‘*’,
+ but ‘Maybe’ has kind ‘* -> *’
+ In the type signature: f :: (a `X` a, Maybe)
+
+T7609.hs:10:7: error:
+ Expected a constraint, but ‘a `X` a’ has kind ‘*’
+ In the type signature: g :: (a `X` a) => Maybe
diff --git a/testsuite/tests/typecheck/should_fail/T7645.stderr b/testsuite/tests/typecheck/should_fail/T7645.stderr
index 12d6c15e49..17420143f8 100644
--- a/testsuite/tests/typecheck/should_fail/T7645.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7645.stderr
@@ -1,6 +1,6 @@
-
-T7645.hs:6:23:
- Expecting one more argument to ‘Maybe’
- The second argument of a tuple should have kind ‘*’,
- but ‘Maybe’ has kind ‘* -> *’
- In the type signature for ‘f’: f :: ((+) a (a :: *), Maybe)
+
+T7645.hs:6:23: error:
+ Expecting one more argument to ‘Maybe’
+ The second argument of a tuple should have kind ‘*’,
+ but ‘Maybe’ has kind ‘* -> *’
+ In the type signature: f :: ((+) a (a :: *), Maybe)
diff --git a/testsuite/tests/typecheck/should_fail/T7696.stderr b/testsuite/tests/typecheck/should_fail/T7696.stderr
index 73da26c4f4..41f2296797 100644
--- a/testsuite/tests/typecheck/should_fail/T7696.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7696.stderr
@@ -1,11 +1,7 @@
T7696.hs:7:6: error:
- Couldn't match kind ‘* -> *’ with ‘*’
- When matching types
- t0 :: (* -> *) -> *
- w :: * -> *
- Expected type: ((), w ())
- Actual type: (m0 a0, t0 m0)
- In the expression: f1
- In an equation for ‘f2’: f2 = f1
- Relevant bindings include f2 :: ((), w ()) (bound at T7696.hs:7:1)
+ • Couldn't match type ‘m0 a0’ with ‘()’
+ Expected type: ((), w ())
+ Actual type: (m0 a0, t0 m0)
+ • In the expression: f1
+ In an equation for ‘f2’: f2 = f1
diff --git a/testsuite/tests/typecheck/should_fail/T7697.stderr b/testsuite/tests/typecheck/should_fail/T7697.stderr
index 477acc1d09..47d8336588 100644
--- a/testsuite/tests/typecheck/should_fail/T7697.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7697.stderr
@@ -1,4 +1,4 @@
-
-T7697.hs:3:6:
- Expected a constraint, but ‘Int’ has kind ‘*’
- In the type signature for ‘f’: f :: Int => Int
+
+T7697.hs:3:6: error:
+ Expected a constraint, but ‘Int’ has kind ‘*’
+ In the type signature: f :: Int => Int
diff --git a/testsuite/tests/typecheck/should_fail/T7748a.stderr b/testsuite/tests/typecheck/should_fail/T7748a.stderr
index 5e546b171a..2f4c35598f 100644
--- a/testsuite/tests/typecheck/should_fail/T7748a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7748a.stderr
@@ -1,18 +1,20 @@
-T7748a.hs:16:24:
- Couldn't match expected type ‘a’
- with actual type ‘Maybe (Maybe (r -> ()))’
+T7748a.hs:16:24: error:
+ • Couldn't match expected type ‘a’
+ with actual type ‘Maybe (Maybe (r -> ()))’
‘a’ is a rigid type variable bound by
- the type signature for: test :: a -> r -> () at T7748a.hs:11:9
- In the pattern: Just (Just p)
- In a case alternative: Just (Just p) -> p
- In the expression:
- case zd of {
- Nothing -> const ()
- Just Nothing -> const ()
- Just (Just p) -> p }
- Relevant bindings include
- g :: r -> () (bound at T7748a.hs:13:16)
- f :: r -> () (bound at T7748a.hs:13:8)
- zd :: a (bound at T7748a.hs:12:6)
- test :: a -> r -> () (bound at T7748a.hs:12:1)
+ the type signature for:
+ test :: forall a r. a -> r -> ()
+ at T7748a.hs:11:9
+ • In the pattern: Just (Just p)
+ In a case alternative: Just (Just p) -> p
+ In the expression:
+ case zd of {
+ Nothing -> const ()
+ Just Nothing -> const ()
+ Just (Just p) -> p }
+ • Relevant bindings include
+ g :: r -> () (bound at T7748a.hs:13:16)
+ f :: r -> () (bound at T7748a.hs:13:8)
+ zd :: a (bound at T7748a.hs:12:6)
+ test :: a -> r -> () (bound at T7748a.hs:12:1)
diff --git a/testsuite/tests/typecheck/should_fail/T7778.stderr b/testsuite/tests/typecheck/should_fail/T7778.stderr
index 136625af75..7538c15cce 100644
--- a/testsuite/tests/typecheck/should_fail/T7778.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7778.stderr
@@ -1,5 +1,5 @@
-
-T7778.hs:3:19:
- Expecting one more argument to ‘Num’
- Expected a type, but ‘Num’ has kind ‘* -> Constraint’
- In the type signature for ‘v’: v :: ((Num Int => Num) ()) => ()
+
+T7778.hs:3:19: error:
+ Expecting one more argument to ‘Num’
+ Expected a type, but ‘Num’ has kind ‘* -> Constraint’
+ In the type signature: v :: ((Num Int => Num) ()) => ()
diff --git a/testsuite/tests/typecheck/should_fail/T7809.stderr b/testsuite/tests/typecheck/should_fail/T7809.stderr
index 153c4d1c1f..aa44b44676 100644
--- a/testsuite/tests/typecheck/should_fail/T7809.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7809.stderr
@@ -1,5 +1,5 @@
-
-T7809.hs:8:8: error:
- Illegal polymorphic or qualified type: PolyId
- GHC doesn't yet support impredicative polymorphism
- In the type signature for ‘foo’: foo :: F PolyId
+
+T7809.hs:8:8: error:
+ Illegal polymorphic or qualified type: PolyId
+ GHC doesn't yet support impredicative polymorphism
+ In the type signature: foo :: F PolyId
diff --git a/testsuite/tests/typecheck/should_fail/T7869.stderr b/testsuite/tests/typecheck/should_fail/T7869.stderr
index 74a483602d..6431c274e5 100644
--- a/testsuite/tests/typecheck/should_fail/T7869.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7869.stderr
@@ -26,3 +26,4 @@ T7869.hs:3:12:
In the expression: (\ x -> f x) :: [a] -> b
In an equation for ‘f’: f = (\ x -> f x) :: [a] -> b
Relevant bindings include f :: [a] -> b (bound at T7869.hs:3:1)
+
diff --git a/testsuite/tests/typecheck/should_fail/T8030.stderr b/testsuite/tests/typecheck/should_fail/T8030.stderr
index 24c9d59ff7..c6c05f8cf1 100644
--- a/testsuite/tests/typecheck/should_fail/T8030.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8030.stderr
@@ -3,8 +3,7 @@ T8030.hs:9:3: error:
• Couldn't match expected type ‘Pr a’ with actual type ‘Pr a0’
NB: ‘Pr’ is a type function, and may not be injective
The type variable ‘a0’ is ambiguous
- • In the ambiguity check for the type signature for ‘op1’:
- op1 :: forall (k :: BOX) (a :: k). C a => Pr a
+ • In the ambiguity check for ‘op1’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the class method:
op1 :: forall (k :: BOX) (a :: k). C a => Pr a
@@ -16,8 +15,7 @@ T8030.hs:10:3: error:
The type variable ‘a0’ is ambiguous
Expected type: Pr a -> Pr a -> Pr a
Actual type: Pr a0 -> Pr a0 -> Pr a0
- • In the ambiguity check for the type signature for ‘op2’:
- op2 :: forall (k :: BOX) (a :: k). C a => Pr a -> Pr a -> Pr a
+ • In the ambiguity check for ‘op2’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the class method:
op2 :: forall (k :: BOX) (a :: k). C a => Pr a -> Pr a -> Pr a
diff --git a/testsuite/tests/typecheck/should_fail/T8034.stderr b/testsuite/tests/typecheck/should_fail/T8034.stderr
index cea9dbc18c..77a60294ce 100644
--- a/testsuite/tests/typecheck/should_fail/T8034.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8034.stderr
@@ -1,12 +1,11 @@
-
-T8034.hs:6:3: error:
- Couldn't match type ‘F a0’ with ‘F a’
- NB: ‘F’ is a type function, and may not be injective
- The type variable ‘a0’ is ambiguous
- Expected type: F a -> F a
- Actual type: F a0 -> F a0
- In the ambiguity check for the type signature for ‘foo’:
- foo :: forall a. C a => F a -> F a
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- When checking the class method: foo :: forall a. C a => F a -> F a
- In the class declaration for ‘C’
+
+T8034.hs:6:3: error:
+ Couldn't match type ‘F a0’ with ‘F a’
+ NB: ‘F’ is a type function, and may not be injective
+ The type variable ‘a0’ is ambiguous
+ Expected type: F a -> F a
+ Actual type: F a0 -> F a0
+ In the ambiguity check for ‘foo’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the class method: foo :: forall a. C a => F a -> F a
+ In the class declaration for ‘C’
diff --git a/testsuite/tests/typecheck/should_fail/T8142.stderr b/testsuite/tests/typecheck/should_fail/T8142.stderr
index 93b2bf4914..9ae86c5524 100644
--- a/testsuite/tests/typecheck/should_fail/T8142.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8142.stderr
@@ -5,9 +5,10 @@ T8142.hs:6:18: error:
The type variable ‘g0’ is ambiguous
Expected type: Nu ((,) t) -> Nu g
Actual type: Nu ((,) t0) -> Nu g0
- When checking that ‘h’ has the inferred type
+ In the ambiguity check for the inferred type for ‘h’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the inferred type
h :: forall t (g :: * -> *). Nu ((,) t) -> Nu g
- Probable cause: the inferred type is ambiguous
In an equation for ‘tracer’:
tracer
= h
diff --git a/testsuite/tests/typecheck/should_fail/T8392a.stderr b/testsuite/tests/typecheck/should_fail/T8392a.stderr
index 290ae86a00..6795d9bd94 100644
--- a/testsuite/tests/typecheck/should_fail/T8392a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8392a.stderr
@@ -1,8 +1,8 @@
-T8392a.hs:6:8:
+T8392a.hs:6:8: error:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
- the type signature for: foo :: (Int ~ Bool) => a -> a
- In the ambiguity check for the type signature for ‘foo’:
- foo :: forall a. (Int ~ Bool) => a -> a
- In the type signature for ‘foo’: foo :: (Int ~ Bool) => a -> a
+ the type signature for:
+ foo :: (Int ~ Bool) => a -> a
+ In the ambiguity check for ‘foo’
+ In the type signature: foo :: (Int ~ Bool) => a -> a
diff --git a/testsuite/tests/typecheck/should_fail/T8450.stderr b/testsuite/tests/typecheck/should_fail/T8450.stderr
index 9cc70fa0df..5697e4db2b 100644
--- a/testsuite/tests/typecheck/should_fail/T8450.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8450.stderr
@@ -1,9 +1,11 @@
-T8450.hs:8:7:
- Couldn't match expected type ‘a’ with actual type ‘()’
+T8450.hs:8:7: error:
+ • Couldn't match expected type ‘a’ with actual type ‘()’
‘a’ is a rigid type variable bound by
- the type signature for: run :: a at T8450.hs:7:15
- In the expression: runEffect $ (undefined :: Either a ())
- In an equation for ‘run’:
- run = runEffect $ (undefined :: Either a ())
- Relevant bindings include run :: a (bound at T8450.hs:8:1)
+ the type signature for:
+ run :: forall a. a
+ at T8450.hs:7:15
+ • In the expression: runEffect $ (undefined :: Either a ())
+ In an equation for ‘run’:
+ run = runEffect $ (undefined :: Either a ())
+ • Relevant bindings include run :: a (bound at T8450.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/T8603.stderr b/testsuite/tests/typecheck/should_fail/T8603.stderr
index 2aaf55b3ff..a3d17ceb56 100644
--- a/testsuite/tests/typecheck/should_fail/T8603.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8603.stderr
@@ -1,21 +1,30 @@
T8603.hs:13:10: error:
- No instance for (Applicative RV)
- arising from the superclasses of an instance declaration
- In the instance declaration for ‘Monad RV’
+ • No instance for (Applicative RV)
+ arising from the superclasses of an instance declaration
+ • In the instance declaration for ‘Monad RV’
T8603.hs:29:17: error:
- Couldn't match kind ‘* -> *’ with ‘*’
- When matching types
- t1 :: (* -> *) -> * -> *
- (->) :: * -> * -> *
- Expected type: [Integer] -> StateT s RV t0
- Actual type: t1 ((->) [a0]) (StateT s RV t0)
- The function ‘lift’ is applied to two arguments,
- but its type ‘([a0] -> StateT s RV t0)
- -> t1 ((->) [a0]) (StateT s RV t0)’
- has only one
- In a stmt of a 'do' block: prize <- lift uniform [1, 2, 3]
- In the expression:
- do { prize <- lift uniform [1, 2, ....];
- return False }
+ • Couldn't match kind ‘* -> *’ with ‘*’
+ When matching types
+ t1 :: (* -> *) -> * -> *
+ (->) :: * -> * -> *
+ Expected type: [Integer] -> StateT s RV t0
+ Actual type: t1 ((->) [a0]) (StateT s RV t0)
+ • The function ‘lift’ is applied to two arguments,
+ but its type ‘([a0] -> StateT s RV t0)
+ -> t1 ((->) [a0]) (StateT s RV t0)’
+ has only one
+ In a stmt of a 'do' block: prize <- lift uniform [1, 2, 3]
+ In the expression:
+ do { prize <- lift uniform [1, 2, ....];
+ return False }
+
+T8603.hs:29:22: error:
+ • Couldn't match type ‘RV a0’ with ‘StateT s RV t0’
+ Expected type: [a0] -> StateT s RV t0
+ Actual type: [a0] -> RV a0
+ • In the first argument of ‘lift’, namely ‘uniform’
+ In a stmt of a 'do' block: prize <- lift uniform [1, 2, 3]
+ • Relevant bindings include
+ testRVState1 :: RVState s Bool (bound at T8603.hs:28:1)
diff --git a/testsuite/tests/typecheck/should_fail/T8806.stderr b/testsuite/tests/typecheck/should_fail/T8806.stderr
index ab88b7f2eb..0131dbd929 100644
--- a/testsuite/tests/typecheck/should_fail/T8806.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8806.stderr
@@ -1,8 +1,8 @@
-
-T8806.hs:5:6:
- Expected a constraint, but ‘Int’ has kind ‘*’
- In the type signature for ‘f’: f :: Int => Int
-
-T8806.hs:8:7:
- Illegal constraint: Int => Show a
- In the type signature for ‘g’: g :: (Int => Show a) => Int
+
+T8806.hs:5:6: error:
+ Expected a constraint, but ‘Int’ has kind ‘*’
+ In the type signature: f :: Int => Int
+
+T8806.hs:8:7: error:
+ Expected a constraint, but ‘Int’ has kind ‘*’
+ In the type signature: g :: (Int => Show a) => Int
diff --git a/testsuite/tests/typecheck/should_fail/T8883.stderr b/testsuite/tests/typecheck/should_fail/T8883.stderr
index 3f0a43033b..b18a97acb1 100644
--- a/testsuite/tests/typecheck/should_fail/T8883.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8883.stderr
@@ -2,7 +2,7 @@
T8883.hs:20:1: error:
Non type-variable argument in the constraint: Functor (PF a)
(Use FlexibleContexts to permit this)
- When checking that ‘fold’ has the inferred type
+ When checking the inferred type
fold :: forall b a.
(Functor (PF a), Regular a) =>
(PF a b -> b) -> a -> b
diff --git a/testsuite/tests/typecheck/should_fail/T9196.stderr b/testsuite/tests/typecheck/should_fail/T9196.stderr
index 6f5a204edd..fd10f24875 100644
--- a/testsuite/tests/typecheck/should_fail/T9196.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9196.stderr
@@ -1,8 +1,8 @@
-
-T9196.hs:4:7:
- Illegal constraint: forall a. Eq a
- In the type signature for ‘f’: f :: (forall a. Eq a) => a -> a
-
-T9196.hs:7:7:
- Illegal constraint: Eq a => Ord a
- In the type signature for ‘g’: g :: (Eq a => Ord a) => a -> a
+
+T9196.hs:4:7: error:
+ Illegal constraint: forall a. Eq a
+ In the type signature: f :: (forall a. Eq a) => a -> a
+
+T9196.hs:7:7: error:
+ Expected a constraint, but ‘Eq a => Ord a’ has kind ‘*’
+ In the type signature: g :: (Eq a => Ord a) => a -> a
diff --git a/testsuite/tests/typecheck/should_fail/T9201.stderr b/testsuite/tests/typecheck/should_fail/T9201.stderr
index 5f16dcaedd..2f1d0a2dae 100644
--- a/testsuite/tests/typecheck/should_fail/T9201.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9201.stderr
@@ -2,5 +2,5 @@
T9201.hs:6:17: error:
The first argument of ‘f’ should have kind ‘x1’,
but ‘a’ has kind ‘y1’
- In the type ‘d a (f a)’
+ In the type signature: ret :: d a (f a)
In the class declaration for ‘MonoidalCCC’
diff --git a/testsuite/tests/typecheck/should_fail/mc19.stderr b/testsuite/tests/typecheck/should_fail/mc19.stderr
index f8ca03f2f8..8cdd4f456b 100644
--- a/testsuite/tests/typecheck/should_fail/mc19.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc19.stderr
@@ -1,9 +1,11 @@
-
-mc19.hs:10:31:
- Couldn't match type ‘a’ with ‘[a]’
- ‘a’ is a rigid type variable bound by
- a type expected by the context: [a] -> [a] at mc19.hs:10:10
- Expected type: [a] -> [a]
- Actual type: [a] -> [[a]]
- In the expression: inits
- In a stmt of a monad comprehension: then inits
+
+mc19.hs:10:31: error:
+ Couldn't match type ‘a’ with ‘[a]’
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context:
+ forall a. [a] -> [a]
+ at mc19.hs:10:10
+ Expected type: [a] -> [a]
+ Actual type: [a] -> [[a]]
+ In the expression: inits
+ In a stmt of a monad comprehension: then inits
diff --git a/testsuite/tests/typecheck/should_fail/mc21.stderr b/testsuite/tests/typecheck/should_fail/mc21.stderr
index 950506543a..3017d2221c 100644
--- a/testsuite/tests/typecheck/should_fail/mc21.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc21.stderr
@@ -1,9 +1,11 @@
-
-mc21.hs:12:26:
- Couldn't match type ‘a’ with ‘[a]’
- ‘a’ is a rigid type variable bound by
- a type expected by the context: [a] -> [[a]] at mc21.hs:11:9
- Expected type: [a] -> [[a]]
- Actual type: [[a]] -> [[a]]
- In the expression: take 5
- In a stmt of a monad comprehension: then group using take 5
+
+mc21.hs:12:26: error:
+ Couldn't match type ‘a’ with ‘[a]’
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context:
+ forall a. [a] -> [[a]]
+ at mc21.hs:11:9
+ Expected type: [a] -> [[a]]
+ Actual type: [[a]] -> [[a]]
+ In the expression: take 5
+ In a stmt of a monad comprehension: then group using take 5
diff --git a/testsuite/tests/typecheck/should_fail/mc22.stderr b/testsuite/tests/typecheck/should_fail/mc22.stderr
index aab0c1bdc3..1c6dc386dd 100644
--- a/testsuite/tests/typecheck/should_fail/mc22.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc22.stderr
@@ -1,19 +1,22 @@
-mc22.hs:9:9:
+mc22.hs:9:9: error:
No instance for (Functor t) arising from a use of ‘fmap’
Possible fix:
add (Functor t) to the context of
- a type expected by the context: (a -> b) -> t a -> t b
+ a type expected by the context:
+ (a -> b) -> t a -> t b
or the inferred type of foo :: [t [Char]]
In the expression: fmap
In a stmt of a monad comprehension: then group using take 5
In the expression:
[x + 1 | x <- ["Hello", "World"], then group using take 5]
-mc22.hs:10:26:
+mc22.hs:10:26: error:
Couldn't match type ‘a’ with ‘t a’
- ‘a’ is a rigid type variable bound by
- a type expected by the context: [a] -> [t a] at mc22.hs:9:9
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context:
+ forall a. [a] -> [t a]
+ at mc22.hs:9:9
Expected type: [a] -> [t a]
Actual type: [t a] -> [t a]
In the expression: take 5
diff --git a/testsuite/tests/typecheck/should_fail/tcfail032.stderr b/testsuite/tests/typecheck/should_fail/tcfail032.stderr
index 90888af1b2..649acb0b07 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail032.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail032.stderr
@@ -10,3 +10,4 @@ tcfail032.hs:14:8:
Relevant bindings include
x :: t (bound at tcfail032.hs:14:3)
f :: t -> a -> Int (bound at tcfail032.hs:14:1)
+
diff --git a/testsuite/tests/typecheck/should_fail/tcfail034.stderr b/testsuite/tests/typecheck/should_fail/tcfail034.stderr
index f984848ea7..1a8d6d7802 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail034.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail034.stderr
@@ -1,12 +1,14 @@
-
-tcfail034.hs:17:13:
- Could not deduce (Integral a) arising from a use of ‘mod’
- from the context: (Num a, Eq a)
- bound by the type signature for: test :: (Num a, Eq a) => a -> Bool
- at tcfail034.hs:16:7-32
- Possible fix:
- add (Integral a) to the context of
- the type signature for: test :: (Num a, Eq a) => a -> Bool
- In the first argument of ‘(==)’, namely ‘(x `mod` 3)’
- In the expression: (x `mod` 3) == 0
- In an equation for ‘test’: test x = (x `mod` 3) == 0
+
+tcfail034.hs:17:13: error:
+ Could not deduce (Integral a) arising from a use of ‘mod’
+ from the context: (Num a, Eq a)
+ bound by the type signature for:
+ test :: (Num a, Eq a) => a -> Bool
+ at tcfail034.hs:16:1-32
+ Possible fix:
+ add (Integral a) to the context of
+ the type signature for:
+ test :: (Num a, Eq a) => a -> Bool
+ In the first argument of ‘(==)’, namely ‘(x `mod` 3)’
+ In the expression: (x `mod` 3) == 0
+ In an equation for ‘test’: test x = (x `mod` 3) == 0
diff --git a/testsuite/tests/typecheck/should_fail/tcfail057.stderr b/testsuite/tests/typecheck/should_fail/tcfail057.stderr
index 9323ae7579..07a8116173 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail057.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail057.stderr
@@ -1,4 +1,5 @@
tcfail057.hs:5:7: error:
- Constraint ‘RealFrac a’ used as a type
- In the type signature for ‘f’: f :: (RealFrac a) -> a -> a
+ • Constraint ‘RealFrac a’ used as a type
+ • In the type signature:
+ f :: (RealFrac a) -> a -> a
diff --git a/testsuite/tests/typecheck/should_fail/tcfail058.stderr b/testsuite/tests/typecheck/should_fail/tcfail058.stderr
index 74db76afd8..6fcd4ea85d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail058.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail058.stderr
@@ -1,5 +1,5 @@
-
-tcfail058.hs:6:7:
- Expecting one more argument to ‘Array a’
- Expected a constraint, but ‘Array a’ has kind ‘* -> *’
- In the type signature for ‘f’: f :: (Array a) => a -> b
+
+tcfail058.hs:6:7: error:
+ Expecting one more argument to ‘Array a’
+ Expected a constraint, but ‘Array a’ has kind ‘* -> *’
+ In the type signature: f :: (Array a) => a -> b
diff --git a/testsuite/tests/typecheck/should_fail/tcfail063.stderr b/testsuite/tests/typecheck/should_fail/tcfail063.stderr
index 45bdaa36e2..d4185fe5aa 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail063.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail063.stderr
@@ -1,5 +1,5 @@
-
-tcfail063.hs:6:9:
- Expecting one more argument to ‘Num’
- Expected a constraint, but ‘Num’ has kind ‘* -> Constraint’
- In the type signature for ‘moby’: moby :: Num => Int -> a -> Int
+
+tcfail063.hs:6:9: error:
+ Expecting one more argument to ‘Num’
+ Expected a constraint, but ‘Num’ has kind ‘* -> Constraint’
+ In the type signature: moby :: Num => Int -> a -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail065.stderr b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
index ddb40dd491..65befaf29e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail065.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
@@ -1,13 +1,14 @@
-
-tcfail065.hs:29:20:
- Couldn't match expected type ‘x’ with actual type ‘x1’
- ‘x1’ is a rigid type variable bound by
- the type signature for: setX :: x1 -> X x -> X x
- at tcfail065.hs:29:3
- ‘x’ is a rigid type variable bound by
- the instance declaration at tcfail065.hs:28:10
- In the first argument of ‘X’, namely ‘x’
- In the expression: X x
- Relevant bindings include
- x :: x1 (bound at tcfail065.hs:29:8)
- setX :: x1 -> X x -> X x (bound at tcfail065.hs:29:3)
+
+tcfail065.hs:29:20: error:
+ • Couldn't match expected type ‘x’ with actual type ‘x1’
+ ‘x1’ is a rigid type variable bound by
+ the type signature for:
+ setX :: forall x1. x1 -> X x -> X x
+ at tcfail065.hs:29:3
+ ‘x’ is a rigid type variable bound by
+ the instance declaration at tcfail065.hs:28:10
+ • In the first argument of ‘X’, namely ‘x’
+ In the expression: X x
+ • Relevant bindings include
+ x :: x1 (bound at tcfail065.hs:29:8)
+ setX :: x1 -> X x -> X x (bound at tcfail065.hs:29:3)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
index e539ea881f..0095d757d5 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail067.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
@@ -1,76 +1,79 @@
-
-tcfail067.hs:1:14: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail067.hs:12:16:
- No instance for (Ord a) arising from a use of ‘SubRange’
- Possible fix:
- add (Ord a) to the context of
- the type signature for: subRangeValue :: SubRange a -> a
- In the pattern: SubRange (lower, upper) value
- In an equation for ‘subRangeValue’:
- subRangeValue (SubRange (lower, upper) value) = value
-
-tcfail067.hs:15:11:
- No instance for (Ord a) arising from a use of ‘SubRange’
- Possible fix:
- add (Ord a) to the context of
- the type signature for: subRange :: SubRange a -> (a, a)
- In the pattern: SubRange r value
- In an equation for ‘subRange’: subRange (SubRange r value) = r
-
-tcfail067.hs:46:12:
- Could not deduce (Ord a) arising from a use of ‘SubRange’
- from the context: Show a
- bound by the type signature for:
- showRange :: Show a => SubRange a -> String
- at tcfail067.hs:45:14-43
- Possible fix:
- add (Ord a) to the context of
- the type signature for: showRange :: Show a => SubRange a -> String
- In the pattern: SubRange (lower, upper) value
- In an equation for ‘showRange’:
- showRange (SubRange (lower, upper) value)
- = show value ++ " :" ++ show lower ++ ".." ++ show upper
-
-tcfail067.hs:61:12:
- Could not deduce (Ord a) arising from a use of ‘numSubRangeNegate’
- from the context: Num a
- bound by the instance declaration at tcfail067.hs:60:10-34
- Possible fix:
- add (Ord a) to the context of the instance declaration
- In the expression: numSubRangeNegate
- In an equation for ‘negate’: negate = numSubRangeNegate
- In the instance declaration for ‘Num (SubRange a)’
-
-tcfail067.hs:65:19:
- Could not deduce (Ord a) arising from a use of ‘SubRange’
- from the context: Num a
- bound by the instance declaration at tcfail067.hs:60:10-34
- Possible fix:
- add (Ord a) to the context of the instance declaration
- In the expression:
- SubRange (fromInteger a, fromInteger a) (fromInteger a)
- In an equation for ‘fromInteger’:
- fromInteger a
- = SubRange (fromInteger a, fromInteger a) (fromInteger a)
- In the instance declaration for ‘Num (SubRange a)’
-
-tcfail067.hs:74:5:
- Could not deduce (Ord a) arising from a use of ‘SubRange’
- from the context: Num a
- bound by the type signature for:
- numSubRangeBinOp :: Num a =>
- (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
- at tcfail067.hs:(71,21)-(72,58)
- Possible fix:
- add (Ord a) to the context of
- the type signature for:
- numSubRangeBinOp :: Num a =>
- (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
- In the expression: SubRange (result, result) result
- In an equation for ‘numSubRangeBinOp’:
- numSubRangeBinOp op a b
- = SubRange (result, result) result
- where
- result = (subRangeValue a) `op` (subRangeValue b)
+
+tcfail067.hs:1:14: warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail067.hs:12:16: error:
+ No instance for (Ord a) arising from a use of ‘SubRange’
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for:
+ subRangeValue :: SubRange a -> a
+ In the pattern: SubRange (lower, upper) value
+ In an equation for ‘subRangeValue’:
+ subRangeValue (SubRange (lower, upper) value) = value
+
+tcfail067.hs:15:11: error:
+ No instance for (Ord a) arising from a use of ‘SubRange’
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for:
+ subRange :: SubRange a -> (a, a)
+ In the pattern: SubRange r value
+ In an equation for ‘subRange’: subRange (SubRange r value) = r
+
+tcfail067.hs:46:12: error:
+ Could not deduce (Ord a) arising from a use of ‘SubRange’
+ from the context: Show a
+ bound by the type signature for:
+ showRange :: Show a => SubRange a -> String
+ at tcfail067.hs:45:1-43
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for:
+ showRange :: Show a => SubRange a -> String
+ In the pattern: SubRange (lower, upper) value
+ In an equation for ‘showRange’:
+ showRange (SubRange (lower, upper) value)
+ = show value ++ " :" ++ show lower ++ ".." ++ show upper
+
+tcfail067.hs:61:12: error:
+ Could not deduce (Ord a) arising from a use of ‘numSubRangeNegate’
+ from the context: Num a
+ bound by the instance declaration at tcfail067.hs:60:10-34
+ Possible fix:
+ add (Ord a) to the context of the instance declaration
+ In the expression: numSubRangeNegate
+ In an equation for ‘negate’: negate = numSubRangeNegate
+ In the instance declaration for ‘Num (SubRange a)’
+
+tcfail067.hs:65:19: error:
+ Could not deduce (Ord a) arising from a use of ‘SubRange’
+ from the context: Num a
+ bound by the instance declaration at tcfail067.hs:60:10-34
+ Possible fix:
+ add (Ord a) to the context of the instance declaration
+ In the expression:
+ SubRange (fromInteger a, fromInteger a) (fromInteger a)
+ In an equation for ‘fromInteger’:
+ fromInteger a
+ = SubRange (fromInteger a, fromInteger a) (fromInteger a)
+ In the instance declaration for ‘Num (SubRange a)’
+
+tcfail067.hs:74:5: error:
+ Could not deduce (Ord a) arising from a use of ‘SubRange’
+ from the context: Num a
+ bound by the type signature for:
+ numSubRangeBinOp :: Num a =>
+ (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
+ at tcfail067.hs:(71,1)-(72,58)
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for:
+ numSubRangeBinOp :: Num a =>
+ (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
+ In the expression: SubRange (result, result) result
+ In an equation for ‘numSubRangeBinOp’:
+ numSubRangeBinOp op a b
+ = SubRange (result, result) result
+ where
+ result = (subRangeValue a) `op` (subRangeValue b)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.stderr b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
index 330b1dceb0..f80a2cf1bb 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail068.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
@@ -1,70 +1,78 @@
-tcfail068.hs:14:9:
- Couldn't match type ‘s1’ with ‘s’
+tcfail068.hs:14:9: error:
+ • Couldn't match type ‘s1’ with ‘s’
‘s1’ is a rigid type variable bound by
- a type expected by the context: ST s1 (IndTree s a)
- at tcfail068.hs:13:9
+ a type expected by the context:
+ forall s1. ST s1 (IndTree s a)
+ at tcfail068.hs:13:9
‘s’ is a rigid type variable bound by
- the type signature for:
- itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
- at tcfail068.hs:11:10
- Expected type: ST s1 (IndTree s a)
- Actual type: ST s1 (STArray s1 (Int, Int) a)
- In the first argument of ‘runST’, namely
- ‘(newSTArray ((1, 1), n) x)’
- In the expression: runST (newSTArray ((1, 1), n) x)
- Relevant bindings include
- itgen :: (Int, Int) -> a -> IndTree s a
- (bound at tcfail068.hs:12:1)
+ the type signature for:
+ itgen :: forall a s.
+ Constructed a =>
+ (Int, Int) -> a -> IndTree s a
+ at tcfail068.hs:11:10
+ Expected type: ST s1 (IndTree s a)
+ Actual type: ST s1 (STArray s1 (Int, Int) a)
+ • In the first argument of ‘runST’, namely
+ ‘(newSTArray ((1, 1), n) x)’
+ In the expression: runST (newSTArray ((1, 1), n) x)
+ • Relevant bindings include
+ itgen :: (Int, Int) -> a -> IndTree s a
+ (bound at tcfail068.hs:12:1)
-tcfail068.hs:19:21:
- Couldn't match type ‘s’ with ‘s1’
+tcfail068.hs:19:21: error:
+ • Couldn't match type ‘s’ with ‘s1’
‘s’ is a rigid type variable bound by
- the type signature for:
- itiap :: Constructed a =>
+ the type signature for:
+ itiap :: forall a s.
+ Constructed a =>
(Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:16:10
+ at tcfail068.hs:16:10
‘s1’ is a rigid type variable bound by
- a type expected by the context: ST s1 (IndTree s a)
- at tcfail068.hs:18:9
- Expected type: STArray s1 (Int, Int) a
- Actual type: IndTree s a
- In the first argument of ‘readSTArray’, namely ‘arr’
- In the first argument of ‘(>>=)’, namely ‘readSTArray arr i’
- Relevant bindings include
- arr :: IndTree s a (bound at tcfail068.hs:17:11)
- itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- (bound at tcfail068.hs:17:1)
+ a type expected by the context:
+ forall s1. ST s1 (IndTree s a)
+ at tcfail068.hs:18:9
+ Expected type: STArray s1 (Int, Int) a
+ Actual type: IndTree s a
+ • In the first argument of ‘readSTArray’, namely ‘arr’
+ In the first argument of ‘(>>=)’, namely ‘readSTArray arr i’
+ • Relevant bindings include
+ arr :: IndTree s a (bound at tcfail068.hs:17:11)
+ itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
+ (bound at tcfail068.hs:17:1)
-tcfail068.hs:24:36:
- Couldn't match type ‘s’ with ‘s1’
+tcfail068.hs:24:36: error:
+ • Couldn't match type ‘s’ with ‘s1’
‘s’ is a rigid type variable bound by
- the type signature for:
- itrap :: Constructed a =>
+ the type signature for:
+ itrap :: forall a s.
+ Constructed a =>
((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:23:10
+ at tcfail068.hs:23:10
‘s1’ is a rigid type variable bound by
- a type expected by the context: ST s1 (IndTree s a)
- at tcfail068.hs:24:29
- Expected type: ST s1 (IndTree s a)
- Actual type: ST s (IndTree s a)
- In the first argument of ‘runST’, namely ‘(itrap' i k)’
- In the expression: runST (itrap' i k)
- Relevant bindings include
- itrap' :: Int -> Int -> ST s (IndTree s a)
- (bound at tcfail068.hs:26:9)
- itrapsnd :: Int -> Int -> ST s (IndTree s a)
- (bound at tcfail068.hs:29:9)
- arr :: IndTree s a (bound at tcfail068.hs:24:23)
- itrap :: ((Int, Int), (Int, Int))
- -> (a -> a) -> IndTree s a -> IndTree s a
- (bound at tcfail068.hs:24:1)
+ a type expected by the context:
+ forall s1. ST s1 (IndTree s a)
+ at tcfail068.hs:24:29
+ Expected type: ST s1 (IndTree s a)
+ Actual type: ST s (IndTree s a)
+ • In the first argument of ‘runST’, namely ‘(itrap' i k)’
+ In the expression: runST (itrap' i k)
+ • Relevant bindings include
+ itrap' :: Int -> Int -> ST s (IndTree s a)
+ (bound at tcfail068.hs:26:9)
+ itrapsnd :: Int -> Int -> ST s (IndTree s a)
+ (bound at tcfail068.hs:29:9)
+ arr :: IndTree s a (bound at tcfail068.hs:24:23)
+ itrap :: ((Int, Int), (Int, Int))
+ -> (a -> a) -> IndTree s a -> IndTree s a
+ (bound at tcfail068.hs:24:1)
-tcfail068.hs:36:46:
- Couldn't match type ‘s’ with ‘s1’
+tcfail068.hs:36:46: error:
+ • Couldn't match type ‘s’ with ‘s1’
‘s’ is a rigid type variable bound by
- the type signature for:
- itrapstate :: Constructed b =>
+ the type signature for:
+ itrapstate :: forall b a c s.
+ Constructed b =>
((Int, Int), (Int, Int))
-> (a -> b -> (a, b))
-> ((Int, Int) -> c -> a)
@@ -72,25 +80,26 @@ tcfail068.hs:36:46:
-> c
-> IndTree s b
-> (c, IndTree s b)
- at tcfail068.hs:34:15
+ at tcfail068.hs:34:15
‘s1’ is a rigid type variable bound by
- a type expected by the context: ST s1 (c, IndTree s b)
- at tcfail068.hs:36:40
- Expected type: ST s1 (c, IndTree s b)
- Actual type: ST s (c, IndTree s b)
- In the first argument of ‘runST’, namely ‘(itrapstate' i k s)’
- In the expression: runST (itrapstate' i k s)
- Relevant bindings include
- itrapstate' :: Int -> Int -> c -> ST s (c, IndTree s b)
- (bound at tcfail068.hs:38:9)
- itrapstatesnd :: Int -> Int -> c -> ST s (c, IndTree s b)
- (bound at tcfail068.hs:41:9)
- arr :: IndTree s b (bound at tcfail068.hs:36:34)
- itrapstate :: ((Int, Int), (Int, Int))
- -> (a -> b -> (a, b))
- -> ((Int, Int) -> c -> a)
- -> (a -> c)
- -> c
- -> IndTree s b
- -> (c, IndTree s b)
- (bound at tcfail068.hs:36:1)
+ a type expected by the context:
+ forall s1. ST s1 (c, IndTree s b)
+ at tcfail068.hs:36:40
+ Expected type: ST s1 (c, IndTree s b)
+ Actual type: ST s (c, IndTree s b)
+ • In the first argument of ‘runST’, namely ‘(itrapstate' i k s)’
+ In the expression: runST (itrapstate' i k s)
+ • Relevant bindings include
+ itrapstate' :: Int -> Int -> c -> ST s (c, IndTree s b)
+ (bound at tcfail068.hs:38:9)
+ itrapstatesnd :: Int -> Int -> c -> ST s (c, IndTree s b)
+ (bound at tcfail068.hs:41:9)
+ arr :: IndTree s b (bound at tcfail068.hs:36:34)
+ itrapstate :: ((Int, Int), (Int, Int))
+ -> (a -> b -> (a, b))
+ -> ((Int, Int) -> c -> a)
+ -> (a -> c)
+ -> c
+ -> IndTree s b
+ -> (c, IndTree s b)
+ (bound at tcfail068.hs:36:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
index 68d7283244..fa6752b37b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
@@ -4,7 +4,7 @@ tcfail072.hs:23:13: error:
from the context: (Ord p, Ord q)
bound by the type signature for:
g :: (Ord p, Ord q) => AB p q -> Bool
- at tcfail072.hs:22:6-38
+ at tcfail072.hs:22:1-38
The type variable ‘p0’ is ambiguous
These potential instances exist:
instance Ord Ordering -- Defined in ‘GHC.Classes’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail076.stderr b/testsuite/tests/typecheck/should_fail/tcfail076.stderr
index 869b9472f3..8283ef0458 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail076.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail076.stderr
@@ -1,16 +1,18 @@
-tcfail076.hs:18:82:
- Couldn't match type ‘res’ with ‘res1’
+tcfail076.hs:18:82: error:
+ • Couldn't match type ‘res’ with ‘res1’
‘res’ is a rigid type variable bound by
- a type expected by the context: (a -> m res) -> m res
- at tcfail076.hs:18:28
+ a type expected by the context:
+ forall res. (a -> m res) -> m res
+ at tcfail076.hs:18:28
‘res1’ is a rigid type variable bound by
- a type expected by the context: (b -> m res1) -> m res1
- at tcfail076.hs:18:64
- Expected type: m res1
- Actual type: m res
- In the expression: cont a
- In the first argument of ‘KContT’, namely ‘(\ cont' -> cont a)’
- Relevant bindings include
- cont' :: b -> m res1 (bound at tcfail076.hs:18:73)
- cont :: a -> m res (bound at tcfail076.hs:18:37)
+ a type expected by the context:
+ forall res1. (b -> m res1) -> m res1
+ at tcfail076.hs:18:64
+ Expected type: m res1
+ Actual type: m res
+ • In the expression: cont a
+ In the first argument of ‘KContT’, namely ‘(\ cont' -> cont a)’
+ • Relevant bindings include
+ cont' :: b -> m res1 (bound at tcfail076.hs:18:73)
+ cont :: a -> m res (bound at tcfail076.hs:18:37)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail078.stderr b/testsuite/tests/typecheck/should_fail/tcfail078.stderr
index 9266b951f1..8a7837df00 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail078.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail078.stderr
@@ -1,4 +1,4 @@
-
-tcfail078.hs:5:6:
- ‘Integer’ is applied to too many type arguments
- In the type signature for ‘f’: f :: Integer i => i
+
+tcfail078.hs:5:6: error:
+ ‘Integer’ is applied to too many type arguments
+ In the type signature: f :: Integer i => i
diff --git a/testsuite/tests/typecheck/should_fail/tcfail080.stderr b/testsuite/tests/typecheck/should_fail/tcfail080.stderr
index 3b8d8e9eb9..21ca3aa8a6 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail080.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail080.stderr
@@ -1,10 +1,12 @@
-
-tcfail080.hs:27:1:
- Could not deduce (Collection c0 a)
- from the context: Collection c a
- bound by the inferred type for ‘q’: Collection c a => a -> Bool
- at tcfail080.hs:27:1-27
- The type variable ‘c0’ is ambiguous
- When checking that ‘q’ has the inferred type
- q :: forall (c :: * -> *) a. Collection c a => a -> Bool
- Probable cause: the inferred type is ambiguous
+
+tcfail080.hs:27:1: error:
+ Could not deduce (Collection c0 a)
+ from the context: Collection c a
+ bound by the inferred type for ‘q’:
+ Collection c a => a -> Bool
+ at tcfail080.hs:27:1-27
+ The type variable ‘c0’ is ambiguous
+ In the ambiguity check for the inferred type for ‘q’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the inferred type
+ q :: forall (c :: * -> *) a. Collection c a => a -> Bool
diff --git a/testsuite/tests/typecheck/should_fail/tcfail097.stderr b/testsuite/tests/typecheck/should_fail/tcfail097.stderr
index e4a611774d..9fbd7c4d87 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail097.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail097.stderr
@@ -1,11 +1,11 @@
-
-tcfail097.hs:5:6:
- Could not deduce (Eq a0)
- from the context: Eq a
- bound by the type signature for: f :: Eq a => Int -> Int
- at tcfail097.hs:5:6-23
- The type variable ‘a0’ is ambiguous
- In the ambiguity check for the type signature for ‘f’:
- f :: forall a. Eq a => Int -> Int
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f’: f :: Eq a => Int -> Int
+
+tcfail097.hs:5:6: error:
+ Could not deduce (Eq a0)
+ from the context: Eq a
+ bound by the type signature for:
+ f :: Eq a => Int -> Int
+ at tcfail097.hs:5:6-23
+ The type variable ‘a0’ is ambiguous
+ In the ambiguity check for ‘f’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature: f :: Eq a => Int -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail098.stderr b/testsuite/tests/typecheck/should_fail/tcfail098.stderr
index 1d95319566..0b2baf0f51 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail098.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail098.stderr
@@ -1,11 +1,10 @@
-
-tcfail098.hs:12:10:
- Could not deduce (Bar a0)
- from the context: Bar a
- bound by an instance declaration: Bar a => Bar Bool
- at tcfail098.hs:12:10-26
- The type variable ‘a0’ is ambiguous
- In the ambiguity check for an instance declaration:
- forall a. Bar a => Bar Bool
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the instance declaration for ‘Bar Bool’
+
+tcfail098.hs:12:10: error:
+ Could not deduce (Bar a0)
+ from the context: Bar a
+ bound by an instance declaration: Bar a => Bar Bool
+ at tcfail098.hs:12:10-26
+ The type variable ‘a0’ is ambiguous
+ In the ambiguity check for an instance declaration
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the instance declaration for ‘Bar Bool’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail101.stderr b/testsuite/tests/typecheck/should_fail/tcfail101.stderr
index b88b77475e..7c10f4aebe 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail101.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail101.stderr
@@ -1,4 +1,4 @@
tcfail101.hs:9:6: error:
The type synonym ‘A’ should have 1 argument, but has been given none
- In the type signature for ‘f’: f :: T A
+ In the type signature: f :: T A
diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
index 6bd3750138..1f034ed39d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail102.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
@@ -1,13 +1,13 @@
-
-tcfail102.hs:1:14: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail102.hs:9:15:
- Could not deduce (Integral (Ratio a)) arising from a use of ‘p’
- from the context: Integral a
- bound by the type signature for:
- f :: Integral a => P (Ratio a) -> P (Ratio a)
- at tcfail102.hs:8:6-45
- In the ‘p’ field of a record
- In the expression: x {p = p x}
- In an equation for ‘f’: f x = x {p = p x}
+
+tcfail102.hs:1:14: warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail102.hs:9:15: error:
+ Could not deduce (Integral (Ratio a)) arising from a use of ‘p’
+ from the context: Integral a
+ bound by the type signature for:
+ f :: Integral a => P (Ratio a) -> P (Ratio a)
+ at tcfail102.hs:8:1-45
+ In the ‘p’ field of a record
+ In the expression: x {p = p x}
+ In an equation for ‘f’: f x = x {p = p x}
diff --git a/testsuite/tests/typecheck/should_fail/tcfail103.stderr b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
index 17a434f0ae..627ef1158c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail103.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
@@ -1,10 +1,14 @@
-tcfail103.hs:15:23:
+tcfail103.hs:15:23: error:
Couldn't match type ‘t’ with ‘s’
- ‘t’ is a rigid type variable bound by
- the type signature for: f :: ST t Int at tcfail103.hs:10:5
- ‘s’ is a rigid type variable bound by
- the type signature for: g :: ST s Int at tcfail103.hs:13:14
+ ‘t’ is a rigid type variable bound by
+ the type signature for:
+ f :: forall t. ST t Int
+ at tcfail103.hs:10:5
+ ‘s’ is a rigid type variable bound by
+ the type signature for:
+ g :: forall s. ST s Int
+ at tcfail103.hs:13:14
Expected type: STRef s Int
Actual type: STRef t Int
In the first argument of ‘readSTRef’, namely ‘v’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail107.stderr b/testsuite/tests/typecheck/should_fail/tcfail107.stderr
index 85f9a2de07..68b82627b8 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail107.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail107.stderr
@@ -1,5 +1,5 @@
tcfail107.hs:13:9: error:
The type synonym ‘Const’ should have 2 arguments, but has been given 1
- In the type signature for ‘test’:
+ In the type signature:
test :: Thing (Const Int) -> Thing (Const Int)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail110.stderr b/testsuite/tests/typecheck/should_fail/tcfail110.stderr
index cb60a79d93..a9b070e46d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail110.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail110.stderr
@@ -1,6 +1,5 @@
-
-tcfail110.hs:8:30:
- Expecting one more argument to ‘Foo a’
- Expected a type, but ‘Foo a’ has kind ‘* -> *’
- In the type signature for ‘bar’:
- bar :: String -> (forall a. Foo a) -> IO ()
+
+tcfail110.hs:8:30: error:
+ Expecting one more argument to ‘Foo a’
+ Expected a type, but ‘Foo a’ has kind ‘* -> *’
+ In the type signature: bar :: String -> (forall a. Foo a) -> IO ()
diff --git a/testsuite/tests/typecheck/should_fail/tcfail113.stderr b/testsuite/tests/typecheck/should_fail/tcfail113.stderr
index 8584008cd3..06837f6f73 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail113.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail113.stderr
@@ -1,14 +1,14 @@
-
-tcfail113.hs:12:7:
- Expecting one more argument to ‘Maybe’
- Expected kind ‘*’, but ‘Maybe’ has kind ‘* -> *’
- In the type signature for ‘f’: f :: [Maybe]
-
-tcfail113.hs:15:8:
- The first argument of ‘T’ should have kind ‘* -> *’,
- but ‘Int’ has kind ‘*’
- In the type signature for ‘g’: g :: T Int
-
-tcfail113.hs:18:6:
- ‘Int’ is applied to too many type arguments
- In the type signature for ‘h’: h :: Int Int
+
+tcfail113.hs:12:7: error:
+ Expecting one more argument to ‘Maybe’
+ Expected kind ‘*’, but ‘Maybe’ has kind ‘* -> *’
+ In the type signature: f :: [Maybe]
+
+tcfail113.hs:15:8: error:
+ The first argument of ‘T’ should have kind ‘* -> *’,
+ but ‘Int’ has kind ‘*’
+ In the type signature: g :: T Int
+
+tcfail113.hs:18:6: error:
+ ‘Int’ is applied to too many type arguments
+ In the type signature: h :: Int Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail116.stderr b/testsuite/tests/typecheck/should_fail/tcfail116.stderr
index abefc61eb8..723e6dba9a 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail116.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail116.stderr
@@ -1,12 +1,12 @@
-tcfail116.hs:6:5:
+tcfail116.hs:6:5: error:
Could not deduce (Foo a0)
from the context: Foo a
- bound by the type signature for: bug :: Foo a => ()
+ bound by the type signature for:
+ bug :: Foo a => ()
at tcfail116.hs:6:5-13
The type variable ‘a0’ is ambiguous
- In the ambiguity check for the type signature for ‘bug’:
- bug :: forall a. Foo a => ()
+ In the ambiguity check for ‘bug’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the class method: bug :: forall a. Foo a => ()
In the class declaration for ‘Foo’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail127.stderr b/testsuite/tests/typecheck/should_fail/tcfail127.stderr
index 32af3d8382..feda55fc82 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail127.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail127.stderr
@@ -1,5 +1,5 @@
-
-tcfail127.hs:3:8: error:
- Illegal polymorphic or qualified type: Num a => a -> a
- GHC doesn't yet support impredicative polymorphism
- In the type signature for ‘foo’: foo :: IO (Num a => a -> a)
+
+tcfail127.hs:3:8: error:
+ Illegal polymorphic or qualified type: Num a => a -> a
+ GHC doesn't yet support impredicative polymorphism
+ In the type signature: foo :: IO (Num a => a -> a)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail131.stderr b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
index 3a209ab5e0..03bdc72eff 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail131.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
@@ -1,10 +1,12 @@
-
-tcfail131.hs:7:9:
- Couldn't match expected type ‘b’ with actual type ‘Integer’
- ‘b’ is a rigid type variable bound by
- the type signature for: g :: Num b => b -> b at tcfail131.hs:6:8
- In the expression: f x x
- In an equation for ‘g’: g x = f x x
- Relevant bindings include
- x :: b (bound at tcfail131.hs:7:5)
- g :: b -> b (bound at tcfail131.hs:7:3)
+
+tcfail131.hs:7:9: error:
+ • Couldn't match expected type ‘b’ with actual type ‘Integer’
+ ‘b’ is a rigid type variable bound by
+ the type signature for:
+ g :: forall b. Num b => b -> b
+ at tcfail131.hs:6:8
+ • In the expression: f x x
+ In an equation for ‘g’: g x = f x x
+ • Relevant bindings include
+ x :: b (bound at tcfail131.hs:7:5)
+ g :: b -> b (bound at tcfail131.hs:7:3)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail134.stderr b/testsuite/tests/typecheck/should_fail/tcfail134.stderr
index b73d2f38a9..4ade82b8e6 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail134.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail134.stderr
@@ -1,6 +1,6 @@
-
-tcfail134.hs:5:33:
- Expecting one more argument to ‘XML’
- Expected a type, but ‘XML’ has kind ‘* -> Constraint’
- In the type ‘a -> XML’
- In the class declaration for ‘XML’
+
+tcfail134.hs:5:33: error:
+ Expecting one more argument to ‘XML’
+ Expected a type, but ‘XML’ has kind ‘* -> Constraint’
+ In the type signature: toXML :: a -> XML
+ In the class declaration for ‘XML’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail135.stderr b/testsuite/tests/typecheck/should_fail/tcfail135.stderr
index 251284365c..bf953347d3 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail135.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail135.stderr
@@ -1,6 +1,6 @@
-
-tcfail135.hs:6:23:
- Expecting one more argument to ‘f’
- Expected a type, but ‘f’ has kind ‘k0 -> *’
- In the type ‘f a -> f’
- In the class declaration for ‘Foo’
+
+tcfail135.hs:6:23: error:
+ Expecting one more argument to ‘f’
+ Expected a type, but ‘f’ has kind ‘k0 -> *’
+ In the type signature: baa :: f a -> f
+ In the class declaration for ‘Foo’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.stderr b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
index c6553c1de6..1c854acc35 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail142.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
@@ -1,11 +1,12 @@
-
-tcfail142.hs:18:8:
- Could not deduce (Bar a0 r)
- from the context: Bar a r
- bound by the type signature for: bar :: Bar a r => r -> ()
- at tcfail142.hs:18:8-25
- The type variable ‘a0’ is ambiguous
- In the ambiguity check for the type signature for ‘bar’:
- bar :: forall r a. Bar a r => r -> ()
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘bar’: bar :: Bar a r => r -> ()
+
+tcfail142.hs:18:8: error:
+ Could not deduce (Bar a0 r)
+ from the context: Bar a r
+ bound by the type signature for:
+ bar :: Bar a r => r -> ()
+ at tcfail142.hs:18:8-25
+ The type variable ‘a0’ is ambiguous
+ In the ambiguity check for ‘bar’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature:
+ bar :: Bar a r => r -> ()
diff --git a/testsuite/tests/typecheck/should_fail/tcfail153.stderr b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
index ec46f782ad..8034a804fc 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail153.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
@@ -1,8 +1,10 @@
-tcfail153.hs:6:7:
+tcfail153.hs:6:7: error:
Couldn't match type ‘a’ with ‘Bool’
- ‘a’ is a rigid type variable bound by
- the type signature for: f :: a -> [a] at tcfail153.hs:5:6
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ f :: forall a. a -> [a]
+ at tcfail153.hs:5:6
Expected type: [a]
Actual type: [Bool]
In the expression: g x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail158.stderr b/testsuite/tests/typecheck/should_fail/tcfail158.stderr
index e359c8bdb2..4110f87366 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail158.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail158.stderr
@@ -1,5 +1,5 @@
-
-tcfail158.hs:14:19:
- Expecting one more argument to ‘Val v’
- Expected a type, but ‘Val v’ has kind ‘* -> *’
- In the type signature for ‘bar’: bar :: forall v. Val v
+
+tcfail158.hs:14:19: error:
+ Expecting one more argument to ‘Val v’
+ Expected a type, but ‘Val v’ has kind ‘* -> *’
+ In the type signature: bar :: forall v. Val v
diff --git a/testsuite/tests/typecheck/should_fail/tcfail160.stderr b/testsuite/tests/typecheck/should_fail/tcfail160.stderr
index 7a740403d8..7e17d5c476 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail160.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail160.stderr
@@ -1,5 +1,5 @@
-
-tcfail160.hs:7:8:
- The first argument of ‘T’ should have kind ‘* -> *’,
- but ‘Int’ has kind ‘*’
- In the type signature for ‘g’: g :: T Int
+
+tcfail160.hs:7:8: error:
+ The first argument of ‘T’ should have kind ‘* -> *’,
+ but ‘Int’ has kind ‘*’
+ In the type signature: g :: T Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail161.stderr b/testsuite/tests/typecheck/should_fail/tcfail161.stderr
index 90e1c2ec5e..afe989206f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail161.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail161.stderr
@@ -1,5 +1,5 @@
-
-tcfail161.hs:5:7:
- Expecting one more argument to ‘Maybe’
- Expected kind ‘*’, but ‘Maybe’ has kind ‘* -> *’
- In the type signature for ‘f’: f :: [Maybe]
+
+tcfail161.hs:5:7: error:
+ Expecting one more argument to ‘Maybe’
+ Expected kind ‘*’, but ‘Maybe’ has kind ‘* -> *’
+ In the type signature: f :: [Maybe]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail174.stderr b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
index 77bc7416b5..fec5748461 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail174.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
@@ -1,11 +1,11 @@
-tcfail174.hs:9:10:
+tcfail174.hs:9:10: error:
Couldn't match expected type ‘forall a. a -> a’
with actual type ‘a0 -> a0’
In the first argument of ‘Base’, namely ‘id’
In the expression: Base id
-tcfail174.hs:13:14:
+tcfail174.hs:13:14: error:
Couldn't match type ‘a’ with ‘a1’
because type variable ‘a1’ would escape its scope
This (rigid, skolem) type variable is bound by
@@ -18,12 +18,15 @@ tcfail174.hs:13:14:
Relevant bindings include
h1 :: Capture a (bound at tcfail174.hs:13:1)
-tcfail174.hs:16:14:
+tcfail174.hs:16:14: error:
Couldn't match type ‘a’ with ‘b’
- ‘a’ is a rigid type variable bound by
- the type forall a1. a1 -> a1 at tcfail174.hs:1:1
- ‘b’ is a rigid type variable bound by
- the type signature for: h2 :: Capture b at tcfail174.hs:15:7
+ ‘a’ is a rigid type variable bound by
+ the type forall a1. a1 -> a1
+ at tcfail174.hs:1:1
+ ‘b’ is a rigid type variable bound by
+ the type signature for:
+ h2 :: forall b. Capture b
+ at tcfail174.hs:15:7
Expected type: Capture (forall x. x -> b)
Actual type: Capture (forall a. a -> a)
In the first argument of ‘Capture’, namely ‘g’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail175.stderr b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
index 50a2424fcc..82da98bc0c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail175.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
@@ -1,10 +1,12 @@
-
-tcfail175.hs:11:1:
- Couldn't match expected type ‘String -> String -> String’
- with actual type ‘a’
- ‘a’ is a rigid type variable bound by
- the type signature for: evalRHS :: Int -> a at tcfail175.hs:10:12
- The equation(s) for ‘evalRHS’ have three arguments,
- but its type ‘Int -> a’ has only one
- Relevant bindings include
- evalRHS :: Int -> a (bound at tcfail175.hs:11:1)
+
+tcfail175.hs:11:1: error:
+ • Couldn't match expected type ‘String -> String -> String’
+ with actual type ‘a’
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ evalRHS :: forall a. Int -> a
+ at tcfail175.hs:10:12
+ • The equation(s) for ‘evalRHS’ have three arguments,
+ but its type ‘Int -> a’ has only one
+ • Relevant bindings include
+ evalRHS :: Int -> a (bound at tcfail175.hs:11:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail179.stderr b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
index 14d2eae435..a50e75e6be 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail179.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
@@ -1,17 +1,19 @@
-
-tcfail179.hs:14:39:
- Couldn't match expected type ‘s’ with actual type ‘x’
- ‘x’ is a rigid type variable bound by
- a pattern with constructor:
- T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s,
- in a case alternative
- at tcfail179.hs:14:14
- ‘s’ is a rigid type variable bound by
- the type signature for: run :: T s -> Int at tcfail179.hs:12:8
- In the first argument of ‘g’, namely ‘x’
- In the expression: g x id
- Relevant bindings include
- x :: x (bound at tcfail179.hs:14:26)
- g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
- ts :: T s (bound at tcfail179.hs:13:5)
- run :: T s -> Int (bound at tcfail179.hs:13:1)
+
+tcfail179.hs:14:39: error:
+ • Couldn't match expected type ‘s’ with actual type ‘x’
+ ‘x’ is a rigid type variable bound by
+ a pattern with constructor:
+ T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s,
+ in a case alternative
+ at tcfail179.hs:14:14
+ ‘s’ is a rigid type variable bound by
+ the type signature for:
+ run :: forall s. T s -> Int
+ at tcfail179.hs:12:8
+ • In the first argument of ‘g’, namely ‘x’
+ In the expression: g x id
+ • Relevant bindings include
+ x :: x (bound at tcfail179.hs:14:26)
+ g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
+ ts :: T s (bound at tcfail179.hs:13:5)
+ run :: T s -> Int (bound at tcfail179.hs:13:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail181.stderr b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
index 47aeccc586..6d483798b1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail181.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
@@ -12,6 +12,5 @@ tcfail181.hs:17:9: error:
instance Monad ((->) r) -- Defined in ‘GHC.Base’
...plus two others
(use -fprint-potential-instances to see them all)
- In the expression: foo
In the expression: foo {bar = return True}
In an equation for ‘wog’: wog x = foo {bar = return True}
diff --git a/testsuite/tests/typecheck/should_fail/tcfail191.stderr b/testsuite/tests/typecheck/should_fail/tcfail191.stderr
index d9237443df..bd1b04ca80 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail191.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail191.stderr
@@ -1,9 +1,11 @@
-
-tcfail191.hs:11:26:
- Couldn't match type ‘a’ with ‘[a]’
- ‘a’ is a rigid type variable bound by
- a type expected by the context: [a] -> [[a]] at tcfail191.hs:10:9
- Expected type: [a] -> [[a]]
- Actual type: [[a]] -> [[a]]
- In the expression: take 5
- In a stmt of a list comprehension: then group using take 5
+
+tcfail191.hs:11:26: error:
+ Couldn't match type ‘a’ with ‘[a]’
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context:
+ forall a. [a] -> [[a]]
+ at tcfail191.hs:10:9
+ Expected type: [a] -> [[a]]
+ Actual type: [[a]] -> [[a]]
+ In the expression: take 5
+ In a stmt of a list comprehension: then group using take 5
diff --git a/testsuite/tests/typecheck/should_fail/tcfail193.stderr b/testsuite/tests/typecheck/should_fail/tcfail193.stderr
index d2f3f26d92..bd8ef5348a 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail193.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail193.stderr
@@ -1,9 +1,11 @@
-
-tcfail193.hs:10:31:
- Couldn't match type ‘a’ with ‘[a]’
- ‘a’ is a rigid type variable bound by
- a type expected by the context: [a] -> [a] at tcfail193.hs:10:10
- Expected type: [a] -> [a]
- Actual type: [a] -> [[a]]
- In the expression: inits
- In a stmt of a list comprehension: then inits
+
+tcfail193.hs:10:31: error:
+ Couldn't match type ‘a’ with ‘[a]’
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context:
+ forall a. [a] -> [a]
+ at tcfail193.hs:10:10
+ Expected type: [a] -> [a]
+ Actual type: [a] -> [[a]]
+ In the expression: inits
+ In a stmt of a list comprehension: then inits
diff --git a/testsuite/tests/typecheck/should_fail/tcfail196.stderr b/testsuite/tests/typecheck/should_fail/tcfail196.stderr
index 723c91de5e..bcb2c32700 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail196.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail196.stderr
@@ -1,5 +1,4 @@
-
-tcfail196.hs:5:8:
- Illegal polymorphic or qualified type: forall a. a
- In the type signature for ‘bar’:
- bar :: Num (forall a. a) => Int -> Int
+
+tcfail196.hs:5:8: error:
+ Illegal polymorphic or qualified type: forall a. a
+ In the type signature: bar :: Num (forall a. a) => Int -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail197.stderr b/testsuite/tests/typecheck/should_fail/tcfail197.stderr
index c15af60329..8b814870f2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail197.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail197.stderr
@@ -1,5 +1,5 @@
-
-tcfail197.hs:5:8: error:
- Illegal polymorphic or qualified type: forall a. a
- GHC doesn't yet support impredicative polymorphism
- In the type signature for ‘foo’: foo :: [forall a. a] -> Int
+
+tcfail197.hs:5:8: error:
+ Illegal polymorphic or qualified type: forall a. a
+ GHC doesn't yet support impredicative polymorphism
+ In the type signature: foo :: [forall a. a] -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail201.stderr b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
index 0609229ae8..03efc08ff2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
@@ -1,15 +1,16 @@
tcfail201.hs:17:58: error:
- Couldn't match expected type ‘a’ with actual type ‘HsDoc id0’
+ • Couldn't match expected type ‘a’ with actual type ‘HsDoc id0’
‘a’ is a rigid type variable bound by
- the type signature for:
- gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
+ the type signature for:
+ gfoldl' :: forall a (c :: * -> *).
+ (forall a1 b. c (a1 -> b) -> a1 -> c b)
-> (forall g. g -> c g) -> a -> c a
- at tcfail201.hs:15:12
- In the first argument of ‘z’, namely ‘DocEmpty’
- In the expression: z DocEmpty
- Relevant bindings include
- hsDoc :: a (bound at tcfail201.hs:16:13)
- gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
- -> (forall g. g -> c g) -> a -> c a
- (bound at tcfail201.hs:16:1)
+ at tcfail201.hs:15:12
+ • In the first argument of ‘z’, namely ‘DocEmpty’
+ In the expression: z DocEmpty
+ • Relevant bindings include
+ hsDoc :: a (bound at tcfail201.hs:16:13)
+ gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
+ -> (forall g. g -> c g) -> a -> c a
+ (bound at tcfail201.hs:16:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail206.stderr b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
index 5090ee165f..687619c9eb 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail206.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
@@ -1,22 +1,24 @@
-tcfail206.hs:5:5:
+tcfail206.hs:5:5: error:
Couldn't match type ‘Bool’ with ‘Int’
Expected type: Bool -> (Int, Bool)
Actual type: Bool -> (Bool, Bool)
In the expression: (, True)
In an equation for ‘a’: a = (, True)
-tcfail206.hs:8:5:
+tcfail206.hs:8:5: error:
Couldn't match type ‘(Integer, Int)’ with ‘Bool -> (Int, Bool)’
Expected type: Int -> Bool -> (Int, Bool)
Actual type: Int -> (Integer, Int)
In the expression: (1,)
In an equation for ‘b’: b = (1,)
-tcfail206.hs:11:5:
+tcfail206.hs:11:5: error:
Couldn't match type ‘a’ with ‘Bool’
- ‘a’ is a rigid type variable bound by
- the type signature for: c :: a -> (a, Bool) at tcfail206.hs:10:6
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ c :: forall a. a -> (a, Bool)
+ at tcfail206.hs:10:6
Expected type: a -> (a, Bool)
Actual type: a -> (a, a)
In the expression: (True || False,)
@@ -24,25 +26,27 @@ tcfail206.hs:11:5:
Relevant bindings include
c :: a -> (a, Bool) (bound at tcfail206.hs:11:1)
-tcfail206.hs:14:5:
+tcfail206.hs:14:5: error:
Couldn't match type ‘Bool’ with ‘Int’
Expected type: Bool -> (# Int, Bool #)
Actual type: Bool -> (# Bool, Bool #)
In the expression: (# , True #)
In an equation for ‘d’: d = (# , True #)
-tcfail206.hs:17:5:
+tcfail206.hs:17:5: error:
Couldn't match type ‘(# Integer, Int #)’
- with ‘Bool -> (# Int, Bool #)’
+ with ‘Bool -> (# Int, Bool #)’
Expected type: Int -> Bool -> (# Int, Bool #)
Actual type: Int -> (# Integer, Int #)
In the expression: (# 1, #)
In an equation for ‘e’: e = (# 1, #)
-tcfail206.hs:20:5:
+tcfail206.hs:20:5: error:
Couldn't match type ‘a’ with ‘Bool’
- ‘a’ is a rigid type variable bound by
- the type signature for: f :: a -> (# a, Bool #) at tcfail206.hs:19:6
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ f :: forall a. a -> (# a, Bool #)
+ at tcfail206.hs:19:6
Expected type: a -> (# a, Bool #)
Actual type: a -> (# a, a #)
In the expression: (# True || False, #)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail208.stderr b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
index 4b88fc0e58..dd290d942c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail208.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
@@ -1,9 +1,9 @@
-
-tcfail208.hs:4:19:
- Could not deduce (Eq (m a)) arising from a use of ‘==’
- from the context: (Monad m, Eq a)
- bound by the type signature for:
- f :: (Monad m, Eq a) => a -> m a -> Bool
- at tcfail208.hs:3:6-40
- In the expression: (return x == y)
- In an equation for ‘f’: f x y = (return x == y)
+
+tcfail208.hs:4:19: error:
+ Could not deduce (Eq (m a)) arising from a use of ‘==’
+ from the context: (Monad m, Eq a)
+ bound by the type signature for:
+ f :: (Monad m, Eq a) => a -> m a -> Bool
+ at tcfail208.hs:3:1-40
+ In the expression: (return x == y)
+ In an equation for ‘f’: f x y = (return x == y)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail209a.stderr b/testsuite/tests/typecheck/should_fail/tcfail209a.stderr
index 446d76f421..d3da3df44c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail209a.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail209a.stderr
@@ -1,6 +1,5 @@
-
-tcfail209a.hs:3:6:
- Illegal tuple constraint: (Show a, Num a)
- (Use ConstraintKinds to permit this)
- In the type signature for ‘g’:
- g :: ((Show a, Num a), Eq a) => a -> a
+
+tcfail209a.hs:3:6: error:
+ Illegal tuple constraint: (Show a, Num a)
+ (Use ConstraintKinds to permit this)
+ In the type signature: g :: ((Show a, Num a), Eq a) => a -> a
diff --git a/testsuite/tests/typecheck/should_fail/tcfail212.stderr b/testsuite/tests/typecheck/should_fail/tcfail212.stderr
index 72e5fe8104..e14e62bddf 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail212.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail212.stderr
@@ -1,10 +1,10 @@
-
-tcfail212.hs:10:7:
- Expecting one more argument to ‘Maybe’
- The first argument of a tuple should have kind ‘*’,
- but ‘Maybe’ has kind ‘* -> *’
- In the type signature for ‘f’: f :: (Maybe, Either Int)
-
-tcfail212.hs:13:7:
- Expecting a lifted type, but ‘Int#’ is unlifted
- In the type signature for ‘g’: g :: (Int#, Int#)
+
+tcfail212.hs:10:7: error:
+ Expecting one more argument to ‘Maybe’
+ The first argument of a tuple should have kind ‘*’,
+ but ‘Maybe’ has kind ‘* -> *’
+ In the type signature: f :: (Maybe, Either Int)
+
+tcfail212.hs:13:7: error:
+ Expecting a lifted type, but ‘Int#’ is unlifted
+ In the type signature: g :: (Int#, Int#)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail215.stderr b/testsuite/tests/typecheck/should_fail/tcfail215.stderr
index 2157561827..df27691960 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail215.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail215.stderr
@@ -1,4 +1,4 @@
-
-tcfail215.hs:8:15:
- Expecting a lifted type, but ‘Int#’ is unlifted
- In the type signature for ‘foo’: foo :: (?x :: Int#) => Int
+
+tcfail215.hs:8:15: error:
+ Expecting a lifted type, but ‘Int#’ is unlifted
+ In the type signature: foo :: (?x :: Int#) => Int
diff --git a/testsuite/tests/typecheck/should_run/Defer01.hs b/testsuite/tests/typecheck/should_run/Defer01.hs
index 368db9873f..f6c69dcfa7 100755
--- a/testsuite/tests/typecheck/should_run/Defer01.hs
+++ b/testsuite/tests/typecheck/should_run/Defer01.hs
@@ -30,10 +30,10 @@ d = 1
e = 'p'
f = e 'q'
-h :: a -> (Char,Char)
+h :: a -> (Char,Char)
h x = (x,'c')
-data T a where
+data T a where
K :: a -> T a
i a = seq (not (K a)) ()
@@ -48,6 +48,5 @@ k x = x
l :: IO ()
l = putChar >> putChar 'p'
-
main :: IO ()
main = print "No errors!"
diff --git a/testsuite/tests/typecheck/should_run/T7861.stderr b/testsuite/tests/typecheck/should_run/T7861.stderr
index 2f8ae153ba..e0aac9a558 100644
--- a/testsuite/tests/typecheck/should_run/T7861.stderr
+++ b/testsuite/tests/typecheck/should_run/T7861.stderr
@@ -1,9 +1,9 @@
T7861: T7861.hs:10:5: error:
Couldn't match type ‘a’ with ‘[a]’
‘a’ is a rigid type variable bound by
- the type signature for:
- f :: (forall b. a) -> a
- at T7861.hs:9:6
+ the type signature for:
+ f :: forall a. (forall b. a) -> a
+ at T7861.hs:9:6
Expected type: (forall b. a) -> a
Actual type: (forall b. a) -> [a]
In the expression: doA
diff --git a/testsuite/tests/typecheck/should_run/tcrun008.hs b/testsuite/tests/typecheck/should_run/tcrun008.hs
index 80097a8f24..daabdf8fda 100644
--- a/testsuite/tests/typecheck/should_run/tcrun008.hs
+++ b/testsuite/tests/typecheck/should_run/tcrun008.hs
@@ -14,13 +14,10 @@ instance Foo Bool where
bar x = [x, not x]
data Record = R {
- blub :: Foo a => a -> [a]
+ blub :: forall a. Foo a => a -> [a]
}
main = do { let r = R {blub = bar}
- ; print (blub r (3::Int))
- ; print (blub r True)
- }
-
-
-
+ ; print (blub r (3::Int))
+ ; print (blub r True)
+ }
diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
index 23d1a2892b..7b6b501708 100644
--- a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
+++ b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
@@ -6,7 +6,7 @@ WCompatWarningsOn.hs:11:5: warning:
from the context: Monad m
bound by the type signature for:
monadFail :: Monad m => m a
- at WCompatWarningsOn.hs:9:14-27
+ at WCompatWarningsOn.hs:9:1-27
Possible fix:
add (MonadFail m) to the context of
the type signature for: