summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2015-12-11 18:19:53 -0500
committerRichard Eisenberg <eir@cis.upenn.edu>2015-12-11 18:23:12 -0500
commit6746549772c5cc0ac66c0fce562f297f4d4b80a2 (patch)
tree96869fcfb5757651462511d64d99a3712f09e7fb /testsuite
parent6e56ac58a6905197412d58e32792a04a63b94d7e (diff)
downloadhaskell-6746549772c5cc0ac66c0fce562f297f4d4b80a2.tar.gz
Add kind equalities to GHC.
This implements the ideas originally put forward in "System FC with Explicit Kind Equality" (ICFP'13). There are several noteworthy changes with this patch: * We now have casts in types. These change the kind of a type. See new constructor `CastTy`. * All types and all constructors can be promoted. This includes GADT constructors. GADT pattern matches take place in type family equations. In Core, types can now be applied to coercions via the `CoercionTy` constructor. * Coercions can now be heterogeneous, relating types of different kinds. A coercion proving `t1 :: k1 ~ t2 :: k2` proves both that `t1` and `t2` are the same and also that `k1` and `k2` are the same. * The `Coercion` type has been significantly enhanced. The documentation in `docs/core-spec/core-spec.pdf` reflects the new reality. * The type of `*` is now `*`. No more `BOX`. * Users can write explicit kind variables in their code, anywhere they can write type variables. For backward compatibility, automatic inference of kind-variable binding is still permitted. * The new extension `TypeInType` turns on the new user-facing features. * Type families and synonyms are now promoted to kinds. This causes trouble with parsing `*`, leading to the somewhat awkward new `HsAppsTy` constructor for `HsType`. This is dispatched with in the renamer, where the kind `*` can be told apart from a type-level multiplication operator. Without `-XTypeInType` the old behavior persists. With `-XTypeInType`, you need to import `Data.Kind` to get `*`, also known as `Type`. * The kind-checking algorithms in TcHsType have been significantly rewritten to allow for enhanced kinds. * The new features are still quite experimental and may be in flux. * TODO: Several open tickets: #11195, #11196, #11197, #11198, #11203. * TODO: Update user manual. Tickets addressed: #9017, #9173, #7961, #10524, #8566, #11142. Updates Haddock submodule.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/ado/ado004.stderr4
-rw-r--r--testsuite/tests/annotations/should_fail/annfail10.stderr2
-rw-r--r--testsuite/tests/deSugar/should_compile/T2431.stderr22
-rw-r--r--testsuite/tests/deSugar/should_compile/T4488.stderr32
-rw-r--r--testsuite/tests/dependent/Makefile3
-rw-r--r--testsuite/tests/dependent/should_compile/Dep1.hs13
-rw-r--r--testsuite/tests/dependent/should_compile/Dep2.hs7
-rw-r--r--testsuite/tests/dependent/should_compile/Dep3.hs26
-rw-r--r--testsuite/tests/dependent/should_compile/KindEqualities.hs25
-rw-r--r--testsuite/tests/dependent/should_compile/KindEqualities2.hs43
-rw-r--r--testsuite/tests/dependent/should_compile/KindLevels.hs9
-rw-r--r--testsuite/tests/dependent/should_compile/Makefile3
-rw-r--r--testsuite/tests/dependent/should_compile/RAE_T32b.hs23
-rw-r--r--testsuite/tests/dependent/should_compile/Rae31.hs24
-rw-r--r--testsuite/tests/dependent/should_compile/RaeBlogPost.hs63
-rw-r--r--testsuite/tests/dependent/should_compile/all.T10
-rw-r--r--testsuite/tests/dependent/should_compile/mkGADTVars.hs9
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope.hs9
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope.stderr9
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope2.hs14
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope2.stderr16
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope3.hs9
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope3.stderr6
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope4.hs13
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope4.stderr15
-rw-r--r--testsuite/tests/dependent/should_fail/DepFail1.hs11
-rw-r--r--testsuite/tests/dependent/should_fail/DepFail1.stderr12
-rw-r--r--testsuite/tests/dependent/should_fail/Makefile5
-rw-r--r--testsuite/tests/dependent/should_fail/PromotedClass.hs11
-rw-r--r--testsuite/tests/dependent/should_fail/PromotedClass.stderr6
-rw-r--r--testsuite/tests/dependent/should_fail/RAE_T32a.hs35
-rw-r--r--testsuite/tests/dependent/should_fail/RAE_T32a.stderr19
-rw-r--r--testsuite/tests/dependent/should_fail/SelfDep.hs3
-rw-r--r--testsuite/tests/dependent/should_fail/SelfDep.stderr5
-rw-r--r--testsuite/tests/dependent/should_fail/TypeSkolEscape.hs8
-rw-r--r--testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr7
-rw-r--r--testsuite/tests/dependent/should_fail/all.T9
-rw-r--r--testsuite/tests/deriving/should_compile/T10524.hs (renamed from testsuite/tests/deriving/should_fail/T10524.hs)1
-rw-r--r--testsuite/tests/deriving/should_compile/all.T1
-rw-r--r--testsuite/tests/deriving/should_fail/T1496.stderr8
-rw-r--r--testsuite/tests/deriving/should_fail/T7959.stderr12
-rw-r--r--testsuite/tests/deriving/should_fail/all.T1
-rw-r--r--testsuite/tests/deriving/should_fail/drvfail005.stderr9
-rw-r--r--testsuite/tests/driver/T4437.hs3
-rw-r--r--testsuite/tests/driver/werror.stderr2
-rw-r--r--testsuite/tests/gadt/T3163.stderr10
-rw-r--r--testsuite/tests/gadt/gadt-escape1.stderr32
-rw-r--r--testsuite/tests/gadt/gadt10.stderr4
-rw-r--r--testsuite/tests/gadt/gadt13.stderr30
-rw-r--r--testsuite/tests/gadt/gadt7.stderr34
-rw-r--r--testsuite/tests/ghc-api/annotations/T10307.stdout1
-rw-r--r--testsuite/tests/ghc-api/annotations/T10312.stderr4
-rw-r--r--testsuite/tests/ghc-api/annotations/T10312.stdout2
-rw-r--r--testsuite/tests/ghc-api/annotations/T10357.stderr74
-rw-r--r--testsuite/tests/ghc-api/annotations/T10357.stdout1
-rw-r--r--testsuite/tests/ghc-api/annotations/T10358.stdout5
-rw-r--r--testsuite/tests/ghc-api/annotations/T11018.stderr2
-rw-r--r--testsuite/tests/ghc-api/annotations/T11018.stdout6
-rw-r--r--testsuite/tests/ghc-api/annotations/exampleTest.stdout3
-rw-r--r--testsuite/tests/ghc-api/annotations/listcomps.stdout2
-rw-r--r--testsuite/tests/ghc-api/annotations/parseTree.stdout4
-rw-r--r--testsuite/tests/ghc-api/landmines/landmines.stdout4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break001.stdout4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break003.stderr2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break003.stdout8
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break006.stderr16
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break006.stdout12
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break012.stdout10
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break018.stdout4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break022/break022.stdout2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break026.stdout116
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break028.stdout6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/hist001.stdout22
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print018.stdout6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print022.stdout6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print025.stdout2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print031.stdout2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print036.stdout1
-rw-r--r--testsuite/tests/ghci/prog009/ghci.prog009.stdout16
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr7
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T10122.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T10508.stderr8
-rw-r--r--testsuite/tests/ghci/scripts/T2182ghci.stderr10
-rw-r--r--testsuite/tests/ghci/scripts/T4087.stdout8
-rw-r--r--testsuite/tests/ghci/scripts/T4175.stdout15
-rw-r--r--testsuite/tests/ghci/scripts/T6018ghcifail.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/T7627.stdout6
-rw-r--r--testsuite/tests/ghci/scripts/T7730.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T7873.script5
-rw-r--r--testsuite/tests/ghci/scripts/T7873.stderr7
-rw-r--r--testsuite/tests/ghci/scripts/T7873.stdout10
-rw-r--r--testsuite/tests/ghci/scripts/T7939.stdout35
-rw-r--r--testsuite/tests/ghci/scripts/T9181.stdout24
-rw-r--r--testsuite/tests/ghci/scripts/ghci001.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/ghci013.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/ghci047.stderr26
-rw-r--r--testsuite/tests/ghci/scripts/ghci051.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/ghci055.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/ghci059.script2
-rw-r--r--testsuite/tests/ghci/scripts/ghci059.stdout2
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr2
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr2
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr6
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA028.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr3
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple12.hs1
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3017.stderr5
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3208b.stderr3
-rw-r--r--testsuite/tests/indexed-types/should_compile/T9316.hs1
-rw-r--r--testsuite/tests/indexed-types/should_compile/T9747.hs2
-rw-r--r--testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr24
-rw-r--r--testsuite/tests/indexed-types/should_fail/Overlap4.stderr1
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail12.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail14.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail1a.stderr7
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail1b.stderr4
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr4
-rw-r--r--testsuite/tests/indexed-types/should_fail/T10141.stderr5
-rw-r--r--testsuite/tests/indexed-types/should_fail/T10899.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2627b.stderr13
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2664.stderr34
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3330a.stderr16
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3330c.stderr23
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4179.stderr22
-rw-r--r--testsuite/tests/indexed-types/should_fail/T5439.stderr46
-rw-r--r--testsuite/tests/indexed-types/should_fail/T6123.stderr12
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7786.stderr72
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7788.stderr6
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9160.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9171.stderr21
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9357.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_run/T5719.hs2
-rw-r--r--testsuite/tests/mdo/should_compile/mdo006.hs2
-rw-r--r--testsuite/tests/module/mod71.stderr24
-rw-r--r--testsuite/tests/module/mod72.stderr4
-rw-r--r--testsuite/tests/parser/should_compile/read014.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/T3811d.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/T7848.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/readFail003.stderr30
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ADT.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Meltdown.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SkipMany.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10403.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10438.stderr16
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T11192.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr3
-rw-r--r--testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr26
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10045.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr24
-rw-r--r--testsuite/tests/patsyn/should_fail/T9161-2.stderr11
-rw-r--r--testsuite/tests/perf/compiler/all.T42
-rw-r--r--testsuite/tests/perf/haddock/all.T6
-rw-r--r--testsuite/tests/polykinds/PolyInstances.hs22
-rw-r--r--testsuite/tests/polykinds/PolyKinds02.stderr11
-rw-r--r--testsuite/tests/polykinds/PolyKinds04.stderr5
-rw-r--r--testsuite/tests/polykinds/PolyKinds07.stderr2
-rw-r--r--testsuite/tests/polykinds/SigTvKinds.hs7
-rw-r--r--testsuite/tests/polykinds/SigTvKinds2.hs7
-rw-r--r--testsuite/tests/polykinds/SigTvKinds2.stderr6
-rw-r--r--testsuite/tests/polykinds/T10503.stderr33
-rw-r--r--testsuite/tests/polykinds/T11142.hs10
-rw-r--r--testsuite/tests/polykinds/T11142.stderr7
-rw-r--r--testsuite/tests/polykinds/T5716.hs2
-rw-r--r--testsuite/tests/polykinds/T5716.stderr9
-rw-r--r--testsuite/tests/polykinds/T6021.hs2
-rw-r--r--testsuite/tests/polykinds/T6021.stderr9
-rw-r--r--testsuite/tests/polykinds/T6039.stderr4
-rw-r--r--testsuite/tests/polykinds/T6129.stderr2
-rw-r--r--testsuite/tests/polykinds/T7224.stderr13
-rw-r--r--testsuite/tests/polykinds/T7230.stderr6
-rw-r--r--testsuite/tests/polykinds/T7278.hs3
-rw-r--r--testsuite/tests/polykinds/T7278.stderr11
-rw-r--r--testsuite/tests/polykinds/T7328.hs2
-rw-r--r--testsuite/tests/polykinds/T7328.stderr15
-rw-r--r--testsuite/tests/polykinds/T7341.hs2
-rw-r--r--testsuite/tests/polykinds/T7341.stderr4
-rw-r--r--testsuite/tests/polykinds/T7404.stderr7
-rw-r--r--testsuite/tests/polykinds/T7438.stderr35
-rw-r--r--testsuite/tests/polykinds/T7481.stderr4
-rw-r--r--testsuite/tests/polykinds/T7524.stderr12
-rw-r--r--testsuite/tests/polykinds/T7594.hs4
-rw-r--r--testsuite/tests/polykinds/T7805.stderr8
-rw-r--r--testsuite/tests/polykinds/T7939a.stderr5
-rw-r--r--testsuite/tests/polykinds/T8566.stderr37
-rw-r--r--testsuite/tests/polykinds/T8616.stderr14
-rw-r--r--testsuite/tests/polykinds/T9200b.stderr7
-rw-r--r--testsuite/tests/polykinds/T9222.stderr32
-rw-r--r--testsuite/tests/polykinds/T9569.hs4
-rw-r--r--testsuite/tests/polykinds/all.T10
-rw-r--r--testsuite/tests/rename/should_fail/T2993.stderr8
-rw-r--r--testsuite/tests/rename/should_fail/rnfail026.stderr23
-rw-r--r--testsuite/tests/rename/should_fail/rnfail055.stderr3
-rw-r--r--testsuite/tests/roles/should_compile/Roles1.stderr84
-rw-r--r--testsuite/tests/roles/should_compile/Roles13.stderr34
-rw-r--r--testsuite/tests/roles/should_compile/Roles14.stderr9
-rw-r--r--testsuite/tests/roles/should_compile/Roles2.stderr18
-rw-r--r--testsuite/tests/roles/should_compile/Roles3.stderr38
-rw-r--r--testsuite/tests/roles/should_compile/Roles4.stderr16
-rw-r--r--testsuite/tests/roles/should_compile/T8958.stderr6
-rw-r--r--testsuite/tests/roles/should_compile/all.T10
-rw-r--r--testsuite/tests/rts/T9045.hs1
-rw-r--r--testsuite/tests/simplCore/should_compile/Makefile2
-rw-r--r--testsuite/tests/simplCore/should_compile/T7360.stderr58
-rw-r--r--testsuite/tests/simplCore/should_compile/T8274.stdout10
-rw-r--r--testsuite/tests/simplCore/should_compile/T9400.stderr6
-rw-r--r--testsuite/tests/simplCore/should_compile/rule2.stderr4
-rw-r--r--testsuite/tests/simplCore/should_compile/spec-inline.stderr7
-rw-r--r--testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr2
-rw-r--r--testsuite/tests/stranal/sigs/T8569.stderr2
-rw-r--r--testsuite/tests/th/T3177a.stderr22
-rw-r--r--testsuite/tests/th/T3920.hs2
-rw-r--r--testsuite/tests/th/T7021a.hs2
-rw-r--r--testsuite/tests/th/T8953.stderr4
-rw-r--r--testsuite/tests/th/TH_RichKinds.hs2
-rw-r--r--testsuite/tests/th/TH_RichKinds.stderr4
-rw-r--r--testsuite/tests/th/TH_Roles2.stderr1
-rw-r--r--testsuite/tests/typecheck/should_compile/T5581.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/T5655.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/T9834.stderr142
-rw-r--r--testsuite/tests/typecheck/should_compile/T9939.stderr40
-rw-r--r--testsuite/tests/typecheck/should_compile/tc141.stderr20
-rw-r--r--testsuite/tests/typecheck/should_compile/tc167.stderr11
-rw-r--r--testsuite/tests/typecheck/should_compile/tc211.stderr20
-rw-r--r--testsuite/tests/typecheck/should_compile/tc231.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/tc243.stderr6
-rw-r--r--testsuite/tests/typecheck/should_compile/tc255.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc256.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc257.hs4
-rw-r--r--testsuite/tests/typecheck/should_compile/tc258.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/AssocTyDef06.hs4
-rw-r--r--testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr87
-rw-r--r--testsuite/tests/typecheck/should_fail/T10285.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T11112.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T1633.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/T1633.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/T2994.stderr32
-rw-r--r--testsuite/tests/typecheck/should_fail/T3540.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/T3950.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/T4875.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T5570.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T5853.stderr35
-rw-r--r--testsuite/tests/typecheck/should_fail/T6018fail.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/T6018failclosed.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/T7368.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T7368a.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/T7410.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T7453.stderr64
-rw-r--r--testsuite/tests/typecheck/should_fail/T7609.stderr27
-rw-r--r--testsuite/tests/typecheck/should_fail/T7645.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T7696.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T7734.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/T7778.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/T7857.stderr30
-rw-r--r--testsuite/tests/typecheck/should_fail/T7892.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T8030.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/T8262.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/T8514.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/T8603.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T8806.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/T9109.stderr27
-rw-r--r--testsuite/tests/typecheck/should_fail/T9196.stderr23
-rw-r--r--testsuite/tests/typecheck/should_fail/T9201.stderr9
-rw-r--r--testsuite/tests/typecheck/should_fail/T9260.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T9999.stderr15
-rw-r--r--testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr100
-rw-r--r--testsuite/tests/typecheck/should_fail/TcCoercibleFail2.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/TcCoercibleFail2.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail002.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail004.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail005.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail010.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail013.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail014.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail018.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail032.stderr24
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail036.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail036.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail049.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail050.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail057.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail070.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail078.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail088.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail090.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail099.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail113.stderr32
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail122.stderr29
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail123.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail132.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail133.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail140.stderr78
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail146.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail147.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail151.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail159.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail160.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail161.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail181.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail184.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail195.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail196.stderr9
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail197.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail200.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail201.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail212.stderr32
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail213.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail214.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail217.stderr2
-rw-r--r--testsuite/tests/typecheck/should_run/T10284.hs11
-rw-r--r--testsuite/tests/typecheck/should_run/T10284.stderr8
-rw-r--r--testsuite/tests/typecheck/should_run/T10284.stdout2
-rw-r--r--testsuite/tests/typecheck/should_run/T7861.stdout1
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun043.hs2
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun044.hs6
-rw-r--r--testsuite/tests/warnings/should_compile/T11077.stderr2
319 files changed, 2405 insertions, 1683 deletions
diff --git a/testsuite/tests/ado/ado004.stderr b/testsuite/tests/ado/ado004.stderr
index 5177765c86..a5fe638fea 100644
--- a/testsuite/tests/ado/ado004.stderr
+++ b/testsuite/tests/ado/ado004.stderr
@@ -18,9 +18,9 @@ TYPE SIGNATURES
(Monad m, Num a2) =>
(a2 -> m a1) -> (a1 -> a1 -> m a) -> m a
test6 ::
- forall t (m :: * -> *) a.
+ forall r (m :: * -> *) a.
(Monad m, Num (m a)) =>
- (m a -> m (m a)) -> t -> m a
+ (m a -> m (m a)) -> r -> m a
TYPE CONSTRUCTORS
COERCION AXIOMS
Dependent modules: []
diff --git a/testsuite/tests/annotations/should_fail/annfail10.stderr b/testsuite/tests/annotations/should_fail/annfail10.stderr
index 1e77541499..5c6f71b486 100644
--- a/testsuite/tests/annotations/should_fail/annfail10.stderr
+++ b/testsuite/tests/annotations/should_fail/annfail10.stderr
@@ -18,7 +18,7 @@ annfail10.hs:9:11: error:
prevents the constraint ‘(Num a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
- instance forall (k :: BOX) (f :: k -> *) (a :: k).
+ instance forall k (f :: k -> *) (a :: k).
Num (f a) =>
Num (Alt f a)
-- Defined in ‘Data.Monoid’
diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr
index b4aa53d787..b89b3a868d 100644
--- a/testsuite/tests/deSugar/should_compile/T2431.stderr
+++ b/testsuite/tests/deSugar/should_compile/T2431.stderr
@@ -1,8 +1,8 @@
==================== Tidy Core ====================
-Result size of Tidy Core = {terms: 27, types: 24, coercions: 1}
+Result size of Tidy Core = {terms: 36, types: 30, coercions: 1}
--- RHS size: {terms: 2, types: 3, coercions: 1}
+-- RHS size: {terms: 2, types: 4, coercions: 1}
T2431.$WRefl [InlPrag=INLINE] :: forall a. a :~: a
[GblId[DataConWrapper],
Caf=NoCafRefs,
@@ -31,17 +31,27 @@ T2431.$trModule = Module a a1
-- RHS size: {terms: 2, types: 0, coercions: 0}
a2 :: TrName
[GblId, Caf=NoCafRefs, Str=DmdType]
-a2 = TrNameS ":~:"#
+a2 = TrNameS "'Refl"#
+
+-- RHS size: {terms: 5, types: 0, coercions: 0}
+T2431.$tc'Refl :: TyCon
+[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType]
+T2431.$tc'Refl = TyCon 0## 0## T2431.$trModule a2
+
+-- RHS size: {terms: 2, types: 0, coercions: 0}
+a3 :: TrName
+[GblId, Caf=NoCafRefs, Str=DmdType]
+a3 = TrNameS ":~:"#
-- RHS size: {terms: 5, types: 0, coercions: 0}
T2431.$tc:~: :: TyCon
[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType]
-T2431.$tc:~: = TyCon 0## 0## T2431.$trModule a2
+T2431.$tc:~: = TyCon 0## 0## T2431.$trModule a3
--- RHS size: {terms: 4, types: 7, coercions: 0}
+-- RHS size: {terms: 4, types: 8, coercions: 0}
absurd :: forall a. Int :~: Bool -> a
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>b]
-absurd = \ (@ a3) (x :: Int :~: Bool) -> case x of _ [Occ=Dead] { }
+absurd = \ (@ a4) (x :: Int :~: Bool) -> case x of _ [Occ=Dead] { }
diff --git a/testsuite/tests/deSugar/should_compile/T4488.stderr b/testsuite/tests/deSugar/should_compile/T4488.stderr
index fee802e213..f3a70cd586 100644
--- a/testsuite/tests/deSugar/should_compile/T4488.stderr
+++ b/testsuite/tests/deSugar/should_compile/T4488.stderr
@@ -1,20 +1,20 @@
-T4488.hs:11:11:
- Warning: Call of fromIntegral :: Int -> Int
- can probably be omitted
- (Use -fno-warn-identities to suppress this message)
+T4488.hs:11:11: Warning:
+ Call of fromIntegral :: Int -> Int
+ can probably be omitted
+ (Use -fno-warn-identities to suppress this message)
-T4488.hs:17:11:
- Warning: Call of toInteger :: Integer -> Integer
- can probably be omitted
- (Use -fno-warn-identities to suppress this message)
+T4488.hs:17:11: Warning:
+ Call of toInteger :: Integer -> Integer
+ can probably be omitted
+ (Use -fno-warn-identities to suppress this message)
-T4488.hs:23:11:
- Warning: Call of toRational :: Rational -> Rational
- can probably be omitted
- (Use -fno-warn-identities to suppress this message)
+T4488.hs:23:11: Warning:
+ Call of toRational :: Rational -> Rational
+ can probably be omitted
+ (Use -fno-warn-identities to suppress this message)
-T4488.hs:29:11:
- Warning: Call of realToFrac :: Float -> Float
- can probably be omitted
- (Use -fno-warn-identities to suppress this message)
+T4488.hs:29:11: Warning:
+ Call of realToFrac :: Float -> Float
+ can probably be omitted
+ (Use -fno-warn-identities to suppress this message)
diff --git a/testsuite/tests/dependent/Makefile b/testsuite/tests/dependent/Makefile
new file mode 100644
index 0000000000..9a36a1c5fe
--- /dev/null
+++ b/testsuite/tests/dependent/Makefile
@@ -0,0 +1,3 @@
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/dependent/should_compile/Dep1.hs b/testsuite/tests/dependent/should_compile/Dep1.hs
new file mode 100644
index 0000000000..6f8fe0720d
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/Dep1.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE TypeInType #-}
+
+module Dep1 where
+
+import Data.Kind
+
+data Proxy k (a :: k) = P
+
+x :: Proxy * Int
+x = P
+
+y :: Proxy Bool True
+y = P
diff --git a/testsuite/tests/dependent/should_compile/Dep2.hs b/testsuite/tests/dependent/should_compile/Dep2.hs
new file mode 100644
index 0000000000..34be3cffc6
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/Dep2.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE PolyKinds, GADTs #-}
+
+module Dep2 where
+
+data G (a :: k) where
+ G1 :: G Int
+ G2 :: G Maybe
diff --git a/testsuite/tests/dependent/should_compile/Dep3.hs b/testsuite/tests/dependent/should_compile/Dep3.hs
new file mode 100644
index 0000000000..cba5043a08
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/Dep3.hs
@@ -0,0 +1,26 @@
+{-# LANGUAGE TypeFamilies, TypeInType, GADTs #-}
+
+module Dep3 where
+
+import Data.Kind
+import GHC.Exts ( Constraint )
+
+type Star1 = *
+
+data Id1 (a :: Star1) where
+ Id1 :: a -> Id1 a
+
+data Id1' :: Star1 -> * where
+ Id1' :: a -> Id1' a
+
+type family Star2 x where
+ Star2 x = *
+
+data Id2a (a :: Star2 Constraint) = Id2a a
+
+
+data Id2 (a :: Star2 Constraint) where
+ Id2 :: a -> Id2 a
+
+data Id2' :: Star2 Constraint -> * where
+ Id2' :: a -> Id2' a
diff --git a/testsuite/tests/dependent/should_compile/KindEqualities.hs b/testsuite/tests/dependent/should_compile/KindEqualities.hs
new file mode 100644
index 0000000000..1f2e82c302
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/KindEqualities.hs
@@ -0,0 +1,25 @@
+{-# LANGUAGE PolyKinds, GADTs, ExplicitForAll #-}
+{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
+
+module KindEqualities where
+
+data TyRep1 :: * -> * where
+ TyInt1 :: TyRep1 Int
+ TyBool1 :: TyRep1 Bool
+
+zero1 :: forall a. TyRep1 a -> a
+zero1 TyInt1 = 0
+zero1 TyBool1 = False
+
+data Proxy (a :: k) = P
+
+data TyRep :: k -> * where
+ TyInt :: TyRep Int
+ TyBool :: TyRep Bool
+ TyMaybe :: TyRep Maybe
+ TyApp :: TyRep a -> TyRep b -> TyRep (a b)
+
+zero :: forall (a :: *). TyRep a -> a
+zero TyInt = 0
+zero TyBool = False
+zero (TyApp TyMaybe _) = Nothing
diff --git a/testsuite/tests/dependent/should_compile/KindEqualities2.hs b/testsuite/tests/dependent/should_compile/KindEqualities2.hs
new file mode 100644
index 0000000000..5a6f60d40b
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/KindEqualities2.hs
@@ -0,0 +1,43 @@
+{-# LANGUAGE DataKinds, GADTs, PolyKinds, TypeFamilies, ExplicitForAll,
+ TemplateHaskell, UndecidableInstances, ScopedTypeVariables,
+ TypeInType #-}
+
+module KindEqualities2 where
+
+import Data.Kind
+import GHC.Exts ( Any )
+
+data Kind = Star | Arr Kind Kind
+
+data Ty :: Kind -> * where
+ TInt :: Ty Star
+ TBool :: Ty Star
+ TMaybe :: Ty (Arr Star Star)
+ TApp :: Ty (Arr k1 k2) -> Ty k1 -> Ty k2
+
+
+data TyRep (k :: Kind) (t :: Ty k) where
+ TyInt :: TyRep Star TInt
+ TyBool :: TyRep Star TBool
+ TyMaybe :: TyRep (Arr Star Star) TMaybe
+ TyApp :: TyRep (Arr k1 k2) a -> TyRep k1 b -> TyRep k2 (TApp a b)
+
+type family IK (k :: Kind)
+type instance IK Star = *
+type instance IK (Arr k1 k2) = IK k1 -> IK k2
+
+$(return []) -- necessary because the following instances depend on the
+ -- previous ones.
+
+type family I (t :: Ty k) :: IK k
+type instance I TInt = Int
+type instance I TBool = Bool
+type instance I TMaybe = Maybe
+type instance I (TApp a b) = (I a) (I b)
+
+zero :: forall (a :: Ty 'Star). TyRep Star a -> I a
+zero TyInt = 0
+zero TyBool = False
+zero (TyApp TyMaybe TyInt) = Nothing
+
+main = print $ zero (TyApp TyMaybe TyInt)
diff --git a/testsuite/tests/dependent/should_compile/KindLevels.hs b/testsuite/tests/dependent/should_compile/KindLevels.hs
new file mode 100644
index 0000000000..80762978b2
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/KindLevels.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE DataKinds, PolyKinds #-}
+
+module KindLevels where
+
+data A
+data B :: A -> *
+data C :: B a -> *
+data D :: C b -> *
+data E :: D c -> *
diff --git a/testsuite/tests/dependent/should_compile/Makefile b/testsuite/tests/dependent/should_compile/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/dependent/should_compile/RAE_T32b.hs b/testsuite/tests/dependent/should_compile/RAE_T32b.hs
new file mode 100644
index 0000000000..7e067099c9
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/RAE_T32b.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE TemplateHaskell, TypeFamilies, GADTs, DataKinds, PolyKinds,
+ RankNTypes, TypeOperators, TypeInType #-}
+
+module RAE_T32b where
+
+import Data.Kind
+
+data family Sing (k :: *) :: k -> *
+
+data TyArr (a :: *) (b :: *) :: *
+type family (a :: TyArr k1 k2 -> *) @@ (b :: k1) :: k2
+$(return [])
+
+data Sigma (p :: *) (r :: TyArr p * -> *) :: * where
+ Sigma :: forall (p :: *) (r :: TyArr p * -> *) (a :: p) (b :: r @@ a).
+ Sing * p -> Sing (TyArr p * -> *) r -> Sing p a -> Sing (r @@ a) b -> Sigma p r
+$(return [])
+
+data instance Sing (Sigma p r) (x :: Sigma p r) :: * where
+ SSigma :: forall (p :: *) (r :: TyArr p * -> *) (a :: p) (b :: r @@ a)
+ (sp :: Sing * p) (sr :: Sing (TyArr p * -> *) r) (sa :: Sing p a) (sb :: Sing (r @@ a) b).
+ Sing (Sing (r @@ a) b) sb ->
+ Sing (Sigma p r) ('Sigma sp sr sa sb)
diff --git a/testsuite/tests/dependent/should_compile/Rae31.hs b/testsuite/tests/dependent/should_compile/Rae31.hs
new file mode 100644
index 0000000000..cedc019cf3
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/Rae31.hs
@@ -0,0 +1,24 @@
+{-# LANGUAGE TemplateHaskell, TypeOperators, PolyKinds, DataKinds,
+ TypeFamilies, TypeInType #-}
+
+module A where
+
+import Data.Kind
+
+data family Sing (k :: *) :: k -> *
+type Sing' (x :: k) = Sing k x
+data TyFun' (a :: *) (b :: *) :: *
+type TyFun (a :: *) (b :: *) = TyFun' a b -> *
+type family (a :: TyFun k1 k2) @@ (b :: k1) :: k2
+data TyPi' (a :: *) (b :: TyFun a *) :: *
+type TyPi (a :: *) (b :: TyFun a *) = TyPi' a b -> *
+type family (a :: TyPi k1 k2) @@@ (b :: k1) :: k2 @@ b
+$(return [])
+
+data A (a :: *) (b :: a) (c :: TyFun' a *) -- A :: forall a -> a -> a ~> *
+type instance (@@) (A a b) c = *
+$(return [])
+data B (a :: *) (b :: TyFun' a *) -- B :: forall a -> a ~> *
+type instance (@@) (B a) b = TyPi a (A a b)
+$(return [])
+data C (a :: *) (b :: TyPi a (B a)) (c :: a) (d :: a) (e :: TyFun' (b @@@ c @@@ d) *)
diff --git a/testsuite/tests/dependent/should_compile/RaeBlogPost.hs b/testsuite/tests/dependent/should_compile/RaeBlogPost.hs
new file mode 100644
index 0000000000..e99c7b5dd5
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/RaeBlogPost.hs
@@ -0,0 +1,63 @@
+{-# LANGUAGE DataKinds, PolyKinds, GADTs, TypeOperators, TypeFamilies,
+ TypeInType #-}
+{-# OPTIONS_GHC -fwarn-unticked-promoted-constructors #-}
+
+module RaeBlogPost where
+
+import Data.Kind
+
+-- a Proxy type with an explicit kind
+data Proxy k (a :: k) = P
+prox :: Proxy * Bool
+prox = P
+
+prox2 :: Proxy Bool 'True
+prox2 = P
+
+-- implicit kinds still work
+data A
+data B :: A -> *
+data C :: B a -> *
+data D :: C b -> *
+data E :: D c -> *
+-- note that E :: forall (a :: A) (b :: B a) (c :: C b). D c -> *
+
+-- a kind-indexed GADT
+data TypeRep (a :: k) where
+ TInt :: TypeRep Int
+ TMaybe :: TypeRep Maybe
+ TApp :: TypeRep a -> TypeRep b -> TypeRep (a b)
+
+zero :: TypeRep a -> a
+zero TInt = 0
+zero (TApp TMaybe _) = Nothing
+
+data Nat = Zero | Succ Nat
+type family a + b where
+ 'Zero + b = b
+ ('Succ a) + b = 'Succ (a + b)
+
+data Vec :: * -> Nat -> * where
+ Nil :: Vec a 'Zero
+ (:>) :: a -> Vec a n -> Vec a ('Succ n)
+infixr 5 :>
+
+-- promoted GADT, and using + as a "kind family":
+type family (x :: Vec a n) ++ (y :: Vec a m) :: Vec a (n + m) where
+ 'Nil ++ y = y
+ (h ':> t) ++ y = h ':> (t ++ y)
+
+-- datatype that mentions *
+data U = Star (*)
+ | Bool Bool
+
+-- kind synonym
+type Monadish = * -> *
+class MonadTrans (t :: Monadish -> Monadish) where
+ lift :: Monad m => m a -> t m a
+data Free :: Monadish where
+ Return :: a -> Free a
+ Bind :: Free a -> (a -> Free b) -> Free b
+
+-- yes, * really does have type *.
+type Star = (* :: (* :: (* :: *)))
diff --git a/testsuite/tests/dependent/should_compile/all.T b/testsuite/tests/dependent/should_compile/all.T
new file mode 100644
index 0000000000..0f231db699
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/all.T
@@ -0,0 +1,10 @@
+test('Dep1', only_ways('normal'), compile, [''])
+test('Dep2', only_ways('normal'), compile, [''])
+test('Dep3', only_ways('normal'), compile, [''])
+test('KindEqualities', only_ways('normal'), compile, [''])
+test('KindEqualities2', only_ways('normal'), compile, [''])
+test('Rae31', only_ways('normal'), compile, [''])
+test('RAE_T32b', only_ways('normal'), compile, [''])
+test('KindLevels', normal, compile, [''])
+test('RaeBlogPost', normal, compile, [''])
+test('mkGADTVars', normal, compile, [''])
diff --git a/testsuite/tests/dependent/should_compile/mkGADTVars.hs b/testsuite/tests/dependent/should_compile/mkGADTVars.hs
new file mode 100644
index 0000000000..1e74c6980a
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/mkGADTVars.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE GADTs, TypeInType #-}
+
+module GADTVars where
+
+import Data.Kind
+import Data.Proxy
+
+data T (k1 :: *) (k2 :: *) (a :: k2) (b :: k2) where
+ MkT :: T x1 * (Proxy (y :: x1), z) z
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope.hs b/testsuite/tests/dependent/should_fail/BadTelescope.hs
new file mode 100644
index 0000000000..acabffec54
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/BadTelescope.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TypeInType #-}
+
+module BadTelescope where
+
+import Data.Kind
+
+data SameKind :: k -> k -> *
+
+data X a k (b :: k) (c :: SameKind a b)
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope.stderr b/testsuite/tests/dependent/should_fail/BadTelescope.stderr
new file mode 100644
index 0000000000..2fbc35a9ba
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/BadTelescope.stderr
@@ -0,0 +1,9 @@
+
+BadTelescope.hs:9:1: error:
+ • These kind and type variables: (a :: k)
+ k
+ (b :: k)
+ (c :: SameKind a b)
+ are out of dependency order. Perhaps try this ordering:
+ k (a :: k) (b :: k) (c :: SameKind a b)
+ • In the data type declaration for ‘X’
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope2.hs b/testsuite/tests/dependent/should_fail/BadTelescope2.hs
new file mode 100644
index 0000000000..6237df4488
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/BadTelescope2.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE TypeInType, ExplicitForAll #-}
+
+module BadTelescope2 where
+
+import Data.Kind
+import Data.Proxy
+
+data SameKind :: k -> k -> *
+
+foo :: forall a k (b :: k). SameKind a b
+foo = undefined
+
+bar :: forall a (c :: Proxy b) (d :: Proxy a). Proxy c -> SameKind b d
+bar = undefined
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope2.stderr b/testsuite/tests/dependent/should_fail/BadTelescope2.stderr
new file mode 100644
index 0000000000..2a9dc76310
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/BadTelescope2.stderr
@@ -0,0 +1,16 @@
+
+BadTelescope2.hs:10:8: error:
+ • These kind and type variables: a k (b :: k)
+ are out of dependency order. Perhaps try this ordering:
+ k (a :: k) (b :: k)
+ • In the type signature:
+ foo :: forall a k (b :: k). SameKind a b
+
+BadTelescope2.hs:13:8: error:
+ • The kind of variable ‘b’, namely ‘Proxy a’,
+ depends on variable ‘a’ from an inner scope
+ Perhaps bind ‘b’ sometime after binding ‘a’
+ NB: Implicitly-bound variables always come before other ones.
+ • In the type signature:
+ bar :: forall a (c :: Proxy b) (d :: Proxy a).
+ Proxy c -> SameKind b d
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope3.hs b/testsuite/tests/dependent/should_fail/BadTelescope3.hs
new file mode 100644
index 0000000000..807479f634
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/BadTelescope3.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TypeInType, ExplicitForAll #-}
+
+module BadTelescope3 where
+
+import Data.Kind
+
+data SameKind :: k -> k -> *
+
+type S a k (b :: k) = SameKind a b
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope3.stderr b/testsuite/tests/dependent/should_fail/BadTelescope3.stderr
new file mode 100644
index 0000000000..4ea7458bb2
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/BadTelescope3.stderr
@@ -0,0 +1,6 @@
+
+BadTelescope3.hs:9:1: error:
+ • These kind and type variables: (a :: k) k (b :: k)
+ are out of dependency order. Perhaps try this ordering:
+ k (a :: k) (b :: k)
+ • In the type synonym declaration for ‘S’
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope4.hs b/testsuite/tests/dependent/should_fail/BadTelescope4.hs
new file mode 100644
index 0000000000..566922a4a0
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/BadTelescope4.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE ExistentialQuantification, TypeInType #-}
+module BadTelescope4 where
+
+import Data.Proxy
+import Data.Kind
+
+data SameKind :: k -> k -> *
+
+data Bad a (c :: Proxy b) (d :: Proxy a) (x :: SameKind b d)
+
+data Borked a (b :: k) = forall (c :: k). B (Proxy c)
+ -- this last one is OK. But there was a bug involving renaming
+ -- that failed here, so the test case remains.
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope4.stderr b/testsuite/tests/dependent/should_fail/BadTelescope4.stderr
new file mode 100644
index 0000000000..158aec650d
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/BadTelescope4.stderr
@@ -0,0 +1,15 @@
+
+BadTelescope4.hs:9:1: error:
+ • These kind and type variables: (a :: k1)
+ (c :: Proxy b)
+ (d :: Proxy a)
+ (x :: SameKind b d)
+ are out of dependency order. Perhaps try this ordering:
+ k1
+ (a :: k1)
+ (b :: Proxy a)
+ (c :: Proxy b)
+ (d :: Proxy a)
+ (x :: SameKind b d)
+ NB: Implicitly declared kind variables are put first.
+ • In the data type declaration for ‘Bad’
diff --git a/testsuite/tests/dependent/should_fail/DepFail1.hs b/testsuite/tests/dependent/should_fail/DepFail1.hs
new file mode 100644
index 0000000000..425a8159c4
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/DepFail1.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE TypeInType #-}
+
+module DepFail1 where
+
+data Proxy k (a :: k) = P
+
+z :: Proxy Bool
+z = P
+
+a :: Proxy Int Bool
+a = P
diff --git a/testsuite/tests/dependent/should_fail/DepFail1.stderr b/testsuite/tests/dependent/should_fail/DepFail1.stderr
new file mode 100644
index 0000000000..630f010fa3
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/DepFail1.stderr
@@ -0,0 +1,12 @@
+
+DepFail1.hs:7:6: error:
+ • Expecting one more argument to ‘Proxy Bool’
+ Expected a type, but ‘Proxy Bool’ has kind ‘Bool -> *’
+ • In the type signature:
+ z :: Proxy Bool
+
+DepFail1.hs:10:16: error:
+ • Expected kind ‘Int’, but ‘Bool’ has kind ‘*’
+ • In the second argument of ‘Proxy’, namely ‘Bool’
+ In the type signature:
+ a :: Proxy Int Bool
diff --git a/testsuite/tests/dependent/should_fail/Makefile b/testsuite/tests/dependent/should_fail/Makefile
new file mode 100644
index 0000000000..13938e423d
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/Makefile
@@ -0,0 +1,5 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+
diff --git a/testsuite/tests/dependent/should_fail/PromotedClass.hs b/testsuite/tests/dependent/should_fail/PromotedClass.hs
new file mode 100644
index 0000000000..6c3f415e5d
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/PromotedClass.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE TypeInType, GADTs #-}
+
+module PromotedClass where
+
+import Data.Proxy
+
+data X a where
+ MkX :: Show a => a -> X a
+
+foo :: Proxy ('MkX 'True)
+foo = Proxy
diff --git a/testsuite/tests/dependent/should_fail/PromotedClass.stderr b/testsuite/tests/dependent/should_fail/PromotedClass.stderr
new file mode 100644
index 0000000000..544124ed07
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/PromotedClass.stderr
@@ -0,0 +1,6 @@
+
+PromotedClass.hs:10:15: error:
+ • Illegal constraint in a type: Show a0
+ • In the first argument of ‘Proxy’, namely ‘MkX True’
+ In the type signature:
+ foo :: Proxy (MkX True)
diff --git a/testsuite/tests/dependent/should_fail/RAE_T32a.hs b/testsuite/tests/dependent/should_fail/RAE_T32a.hs
new file mode 100644
index 0000000000..08a4ad78a8
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/RAE_T32a.hs
@@ -0,0 +1,35 @@
+{-# LANGUAGE TemplateHaskell, RankNTypes, TypeOperators, DataKinds,
+ PolyKinds, TypeFamilies, GADTs, TypeInType #-}
+
+module RAE_T32a where
+
+import Data.Kind
+
+data family Sing (k :: *) :: k -> *
+
+data TyArr' (a :: *) (b :: *) :: *
+type TyArr (a :: *) (b :: *) = TyArr' a b -> *
+type family (a :: TyArr k1 k2) @@ (b :: k1) :: k2
+data TyPi' (a :: *) (b :: TyArr a *) :: *
+type TyPi (a :: *) (b :: TyArr a *) = TyPi' a b -> *
+type family (a :: TyPi k1 k2) @@@ (b :: k1) :: k2 @@ b
+$(return [])
+
+data MkStar (p :: *) (x :: TyArr' p *)
+type instance MkStar p @@ x = *
+$(return [])
+
+data Sigma (p :: *) (r :: TyPi p (MkStar p)) :: * where
+ Sigma ::
+ forall (p :: *) (r :: TyPi p (MkStar p)) (a :: p) (b :: r @@@ a).
+ Sing * p -> Sing (TyPi p (MkStar p)) r -> Sing p a -> Sing (r @@@ a) b -> Sigma p r
+$(return [])
+
+data instance Sing Sigma (Sigma p r) x where
+ SSigma ::
+ forall (p :: *) (r :: TyPi p (MkStar p)) (a :: p) (b :: r @@@ a)
+ (sp :: Sing * p) (sr :: Sing (TyPi p (MkStar p)) r) (sa :: Sing p a) (sb :: Sing (r @@@ a) b).
+ Sing (Sing (r @@@ a) b) sb ->
+ Sing (Sigma p r) ('Sigma sp sr sa sb)
+
+-- I (RAE) believe this last definition is ill-typed.
diff --git a/testsuite/tests/dependent/should_fail/RAE_T32a.stderr b/testsuite/tests/dependent/should_fail/RAE_T32a.stderr
new file mode 100644
index 0000000000..1a54c7d53b
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/RAE_T32a.stderr
@@ -0,0 +1,19 @@
+
+RAE_T32a.hs:28:1: error:
+ Too many parameters to Sing:
+ x is unexpected;
+ expected only two parameters
+ In the data instance declaration for ‘Sing’
+
+RAE_T32a.hs:28:20: error:
+ Expecting two more arguments to ‘Sigma’
+ Expected a type, but
+ ‘Sigma’ has kind
+ ‘forall p -> TyPi p (MkStar p) -> *’
+ In the first argument of ‘Sing’, namely ‘Sigma’
+ In the data instance declaration for ‘Sing’
+
+RAE_T32a.hs:28:27: error:
+ Expected kind ‘Sigma’, but ‘Sigma p r’ has kind ‘*’
+ In the second argument of ‘Sing’, namely ‘Sigma p r’
+ In the data instance declaration for ‘Sing’
diff --git a/testsuite/tests/dependent/should_fail/SelfDep.hs b/testsuite/tests/dependent/should_fail/SelfDep.hs
new file mode 100644
index 0000000000..f54b92752b
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/SelfDep.hs
@@ -0,0 +1,3 @@
+module SelfDep where
+
+data T :: T -> *
diff --git a/testsuite/tests/dependent/should_fail/SelfDep.stderr b/testsuite/tests/dependent/should_fail/SelfDep.stderr
new file mode 100644
index 0000000000..f4014f7277
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/SelfDep.stderr
@@ -0,0 +1,5 @@
+
+SelfDep.hs:3:11: error:
+ Type constructor ‘T’ cannot be used here
+ (it is defined and used in the same recursive group)
+ In the kind ‘T -> *’
diff --git a/testsuite/tests/dependent/should_fail/TypeSkolEscape.hs b/testsuite/tests/dependent/should_fail/TypeSkolEscape.hs
new file mode 100644
index 0000000000..09845ed87e
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/TypeSkolEscape.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE RankNTypes, PolyKinds, TypeInType #-}
+
+module TypeSkolEscape where
+
+import GHC.Types
+import GHC.Exts
+
+type Bad = forall (v :: Levity) (a :: TYPE v). a
diff --git a/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr b/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr
new file mode 100644
index 0000000000..1574c017ce
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr
@@ -0,0 +1,7 @@
+
+TypeSkolEscape.hs:8:1: error:
+ Quantified type's kind mentions quantified type variable
+ (skolem escape)
+ type: forall (v1 :: Levity) (a1 :: TYPE v1). a1
+ of kind: TYPE v
+ In the type synonym declaration for ‘Bad’
diff --git a/testsuite/tests/dependent/should_fail/all.T b/testsuite/tests/dependent/should_fail/all.T
new file mode 100644
index 0000000000..8d4b288e96
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/all.T
@@ -0,0 +1,9 @@
+test('DepFail1', normal, compile_fail, [''])
+test('RAE_T32a', normal, compile_fail, [''])
+test('TypeSkolEscape', normal, compile_fail, [''])
+test('BadTelescope', normal, compile_fail, [''])
+test('BadTelescope2', normal, compile_fail, [''])
+test('BadTelescope3', normal, compile_fail, [''])
+test('PromotedClass', normal, compile_fail, [''])
+test('SelfDep', normal, compile_fail, [''])
+test('BadTelescope4', normal, compile_fail, [''])
diff --git a/testsuite/tests/deriving/should_fail/T10524.hs b/testsuite/tests/deriving/should_compile/T10524.hs
index 43d93bf862..cb5a8e370f 100644
--- a/testsuite/tests/deriving/should_fail/T10524.hs
+++ b/testsuite/tests/deriving/should_compile/T10524.hs
@@ -6,3 +6,4 @@ import Data.Data
newtype WrappedFunctor f a = WrapFunctor (f a) deriving (Data, Typeable)
+-- WrappedFunctor :: forall k. (k -> *) -> k -> *
diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T
index f2fb80be02..36d49f5078 100644
--- a/testsuite/tests/deriving/should_compile/all.T
+++ b/testsuite/tests/deriving/should_compile/all.T
@@ -56,6 +56,7 @@ test('T4896', normal, compile, [''])
test('T7947', extra_clean(['T7947a.o', 'T7947a.hi', 'T7947b.o', 'T7947b.hi']), multimod_compile, ['T7947', '-v0'])
test('T10561', normal, compile_fail, [''])
test('T10487', extra_clean(['T10487_M.o', 'T10487_M.hi']), multimod_compile, ['T10487', '-v0'])
+test('T10524', normal, compile, [''])
test('T11148', normal, run_command,
['$MAKE -s --no-print-directory T11148'])
test('T9968', normal, compile, [''])
diff --git a/testsuite/tests/deriving/should_fail/T1496.stderr b/testsuite/tests/deriving/should_fail/T1496.stderr
index c9f3869846..c560f5fe0f 100644
--- a/testsuite/tests/deriving/should_fail/T1496.stderr
+++ b/testsuite/tests/deriving/should_fail/T1496.stderr
@@ -1,9 +1,9 @@
-T1496.hs:10:32:
+T1496.hs:10:32: error:
Couldn't match representation of type ‘c Int’ with that of ‘c Moo’
- arising from the coercion of the method ‘isInt’
- from type ‘forall (c :: * -> *). c Int -> c Int’
- to type ‘forall (c :: * -> *). c Int -> c Moo’
+ arising from the coercion of the method ‘isInt’
+ from type ‘forall (c :: * -> *). c Int -> c Int’
+ to type ‘forall (c :: * -> *). c Int -> c Moo’
NB: We cannot know what roles the parameters to ‘c’ have;
we must assume that the role is nominal
When deriving the instance for (IsInt Moo)
diff --git a/testsuite/tests/deriving/should_fail/T7959.stderr b/testsuite/tests/deriving/should_fail/T7959.stderr
index 5ca93a7fe3..4756f793c8 100644
--- a/testsuite/tests/deriving/should_fail/T7959.stderr
+++ b/testsuite/tests/deriving/should_fail/T7959.stderr
@@ -1,8 +1,8 @@
-T7959.hs:5:1:
- Cannot derive instances for nullary classes
- In the stand-alone deriving instance for ‘A’
+T7959.hs:5:1: error:
+ • Cannot derive instances for nullary classes
+ • In the stand-alone deriving instance for ‘A’
-T7959.hs:6:17:
- Expected kind ‘k0 -> Constraint’, but ‘A’ has kind ‘Constraint’
- In the data declaration for ‘B’
+T7959.hs:6:17: error:
+ • Expected kind ‘k0 -> Constraint’, but ‘A’ has kind ‘Constraint’
+ • In the data declaration for ‘B’
diff --git a/testsuite/tests/deriving/should_fail/all.T b/testsuite/tests/deriving/should_fail/all.T
index 400b748435..e0c6e62bff 100644
--- a/testsuite/tests/deriving/should_fail/all.T
+++ b/testsuite/tests/deriving/should_fail/all.T
@@ -57,6 +57,5 @@ test('T9600-1', normal, compile_fail, [''])
test('T9687', normal, compile_fail, [''])
test('T8984', normal, compile_fail, [''])
-test('T10524', normal, compile_fail, [''])
test('T9968a', normal, compile_fail, [''])
diff --git a/testsuite/tests/deriving/should_fail/drvfail005.stderr b/testsuite/tests/deriving/should_fail/drvfail005.stderr
index 1546a37d07..552b3b0291 100644
--- a/testsuite/tests/deriving/should_fail/drvfail005.stderr
+++ b/testsuite/tests/deriving/should_fail/drvfail005.stderr
@@ -1,5 +1,6 @@
-drvfail005.hs:4:13:
- Expected kind ‘k0 -> Constraint’,
- but ‘Show a’ has kind ‘Constraint’
- In the data declaration for ‘Test’
+drvfail005.hs:4:13: error:
+ • Expecting one fewer argument to ‘Show a’
+ Expected kind ‘k0 -> Constraint’,
+ but ‘Show a’ has kind ‘Constraint’
+ • In the data declaration for ‘Test’
diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs
index f58d4c4b8a..1b4f8e65ae 100644
--- a/testsuite/tests/driver/T4437.hs
+++ b/testsuite/tests/driver/T4437.hs
@@ -35,7 +35,8 @@ expectedGhcOnlyExtensions = ["RelaxedLayout",
"AlternativeLayoutRuleTransitional",
"OverloadedLabels",
"TemplateHaskellQuotes",
- "MonadFailDesugaring"]
+ "MonadFailDesugaring",
+ "TypeInType"]
expectedCabalOnlyExtensions :: [String]
expectedCabalOnlyExtensions = ["Generics",
diff --git a/testsuite/tests/driver/werror.stderr b/testsuite/tests/driver/werror.stderr
index 20770fa8bc..ce6dba6347 100644
--- a/testsuite/tests/driver/werror.stderr
+++ b/testsuite/tests/driver/werror.stderr
@@ -16,7 +16,7 @@ werror.hs:10:1: Warning: Defined but not used: ‘f’
werror.hs:10:1: Warning:
Top-level binding with no type signature:
- f :: forall t t1. [t] -> [t1]
+ f :: forall r r1. [r] -> [r1]
werror.hs:10:1: Warning:
Pattern match(es) are redundant
diff --git a/testsuite/tests/gadt/T3163.stderr b/testsuite/tests/gadt/T3163.stderr
index 095378b540..c6b6a976da 100644
--- a/testsuite/tests/gadt/T3163.stderr
+++ b/testsuite/tests/gadt/T3163.stderr
@@ -1,5 +1,5 @@
-
-T3163.hs:8:5: error:
- Illegal polymorphic or qualified type: forall s. s
- In the definition of data constructor ‘Unreached’
- In the data type declaration for ‘Taker’
+
+T3163.hs:8:5: error:
+ Illegal polymorphic or qualified type: forall s1. s1
+ In the definition of data constructor ‘Unreached’
+ In the data type declaration for ‘Taker’
diff --git a/testsuite/tests/gadt/gadt-escape1.stderr b/testsuite/tests/gadt/gadt-escape1.stderr
index 39d736adb8..829dfa0e2b 100644
--- a/testsuite/tests/gadt/gadt-escape1.stderr
+++ b/testsuite/tests/gadt/gadt-escape1.stderr
@@ -1,17 +1,17 @@
-gadt-escape1.hs:19:58:
- Couldn't match type ‘t’ with ‘ExpGADT Int’
- ‘t’ is untouchable
- inside the constraints: t1 ~ Int
- bound by a pattern with constructor: ExpInt :: Int -> ExpGADT Int,
- in a case alternative
- at gadt-escape1.hs:19:43-50
- ‘t’ is a rigid type variable bound by
- the inferred type of weird1 :: t at gadt-escape1.hs:19:1
- Possible fix: add a type signature for ‘weird1’
- Expected type: t
- Actual type: ExpGADT t1
- In the expression: a
- In a case alternative: Hidden (ExpInt _) a -> a
- Relevant bindings include
- weird1 :: t (bound at gadt-escape1.hs:19:1)
+gadt-escape1.hs:19:58: error:
+ • Couldn't match type ‘r’ with ‘ExpGADT Int’
+ ‘r’ is untouchable
+ inside the constraints: t ~ Int
+ bound by a pattern with constructor: ExpInt :: Int -> ExpGADT Int,
+ in a case alternative
+ at gadt-escape1.hs:19:43-50
+ ‘r’ is a rigid type variable bound by
+ the inferred type of weird1 :: r at gadt-escape1.hs:19:1
+ Possible fix: add a type signature for ‘weird1’
+ Expected type: r
+ Actual type: ExpGADT t
+ • In the expression: a
+ In a case alternative: Hidden (ExpInt _) a -> a
+ • Relevant bindings include
+ weird1 :: r (bound at gadt-escape1.hs:19:1)
diff --git a/testsuite/tests/gadt/gadt10.stderr b/testsuite/tests/gadt/gadt10.stderr
index cc5230e2f2..97bd197a2a 100644
--- a/testsuite/tests/gadt/gadt10.stderr
+++ b/testsuite/tests/gadt/gadt10.stderr
@@ -1,7 +1,7 @@
-gadt10.hs:6:24:
+gadt10.hs:6:24: error:
Expecting one more argument to ‘RInt’
- Expected kind ‘*’, but ‘RInt’ has kind ‘k0 -> *’
+ Expected a type, but ‘RInt’ has kind ‘k0 -> *’
In the type ‘RInt’
In the definition of data constructor ‘R’
In the data declaration for ‘RInt’
diff --git a/testsuite/tests/gadt/gadt13.stderr b/testsuite/tests/gadt/gadt13.stderr
index ce56fe838e..44b100b059 100644
--- a/testsuite/tests/gadt/gadt13.stderr
+++ b/testsuite/tests/gadt/gadt13.stderr
@@ -1,16 +1,16 @@
-gadt13.hs:15:13:
- Couldn't match expected type ‘t’
- with actual type ‘String -> [Char]’
- ‘t’ is untouchable
- inside the constraints: t1 ~ Int
- bound by a pattern with constructor: I :: Int -> Term Int,
- in an equation for ‘shw’
- at gadt13.hs:15:6-8
- ‘t’ is a rigid type variable bound by
- the inferred type of shw :: Term t1 -> t at gadt13.hs:15:1
- Possible fix: add a type signature for ‘shw’
- In the expression: ("I " ++) . shows t
- In an equation for ‘shw’: shw (I t) = ("I " ++) . shows t
- Relevant bindings include
- shw :: Term t1 -> t (bound at gadt13.hs:15:1)
+gadt13.hs:15:13: error:
+ • Couldn't match expected type ‘r’
+ with actual type ‘String -> [Char]’
+ ‘r’ is untouchable
+ inside the constraints: r1 ~ Int
+ bound by a pattern with constructor: I :: Int -> Term Int,
+ in an equation for ‘shw’
+ at gadt13.hs:15:6-8
+ ‘r’ is a rigid type variable bound by
+ the inferred type of shw :: Term r1 -> r at gadt13.hs:15:1
+ Possible fix: add a type signature for ‘shw’
+ • In the expression: ("I " ++) . shows t
+ In an equation for ‘shw’: shw (I t) = ("I " ++) . shows t
+ • Relevant bindings include
+ shw :: Term r1 -> r (bound at gadt13.hs:15:1)
diff --git a/testsuite/tests/gadt/gadt7.stderr b/testsuite/tests/gadt/gadt7.stderr
index e49cac1577..8720d7fe10 100644
--- a/testsuite/tests/gadt/gadt7.stderr
+++ b/testsuite/tests/gadt/gadt7.stderr
@@ -1,19 +1,19 @@
-gadt7.hs:16:38:
- Couldn't match expected type ‘t’ with actual type ‘r’
- ‘r’ is untouchable
- inside the constraints: t1 ~ Int
- bound by a pattern with constructor: K :: T Int,
- in a case alternative
- at gadt7.hs:16:33
+gadt7.hs:16:38: error:
+ • Couldn't match expected type ‘r’ with actual type ‘r1’
+ ‘r’ is untouchable
+ inside the constraints: t ~ Int
+ bound by a pattern with constructor: K :: T Int,
+ in a case alternative
+ at gadt7.hs:16:33
‘r’ is a rigid type variable bound by
- the inferred type of i1b :: T t1 -> r -> t at gadt7.hs:16:1
- ‘t’ is a rigid type variable bound by
- the inferred type of i1b :: T t1 -> r -> t at gadt7.hs:16:1
- Possible fix: add a type signature for ‘i1b’
- In the expression: y1
- In a case alternative: K -> y1
- Relevant bindings include
- y1 :: r (bound at gadt7.hs:16:16)
- y :: r (bound at gadt7.hs:16:7)
- i1b :: T t1 -> r -> t (bound at gadt7.hs:16:1)
+ the inferred type of i1b :: T t -> r1 -> r at gadt7.hs:16:1
+ ‘r1’ is a rigid type variable bound by
+ the inferred type of i1b :: T t -> r1 -> r at gadt7.hs:16:1
+ Possible fix: add a type signature for ‘i1b’
+ • In the expression: y1
+ In a case alternative: K -> y1
+ • Relevant bindings include
+ y1 :: r1 (bound at gadt7.hs:16:16)
+ y :: r1 (bound at gadt7.hs:16:7)
+ i1b :: T t -> r1 -> r (bound at gadt7.hs:16:1)
diff --git a/testsuite/tests/ghc-api/annotations/T10307.stdout b/testsuite/tests/ghc-api/annotations/T10307.stdout
index 26a255dca9..48cbca6cd0 100644
--- a/testsuite/tests/ghc-api/annotations/T10307.stdout
+++ b/testsuite/tests/ghc-api/annotations/T10307.stdout
@@ -12,7 +12,6 @@
((Test10307.hs:5:3-34,AnnDcolon), [Test10307.hs:5:31-32]),
((Test10307.hs:5:3-34,AnnSemi), [Test10307.hs:6:3]),
((Test10307.hs:5:3-34,AnnType), [Test10307.hs:5:3-6]),
-((Test10307.hs:5:34,AnnStar), [Test10307.hs:5:34]),
((Test10307.hs:6:3-34,AnnEqual), [Test10307.hs:6:31]),
((Test10307.hs:6:3-34,AnnType), [Test10307.hs:6:3-6]),
((Test10307.hs:6:8-34,AnnEqual), [Test10307.hs:6:31]),
diff --git a/testsuite/tests/ghc-api/annotations/T10312.stderr b/testsuite/tests/ghc-api/annotations/T10312.stderr
index 8fc7a0c0bf..e5c16948f2 100644
--- a/testsuite/tests/ghc-api/annotations/T10312.stderr
+++ b/testsuite/tests/ghc-api/annotations/T10312.stderr
@@ -1,2 +1,2 @@
-
-Test10312.hs:77:38: error: Not in scope: data constructor ‘Fixity’
+
+Test10312.hs:77:38: error: Not in scope: data constructor ‘Fixity’
diff --git a/testsuite/tests/ghc-api/annotations/T10312.stdout b/testsuite/tests/ghc-api/annotations/T10312.stdout
index 61fea45a33..00f25444cc 100644
--- a/testsuite/tests/ghc-api/annotations/T10312.stdout
+++ b/testsuite/tests/ghc-api/annotations/T10312.stdout
@@ -33,7 +33,6 @@
((Test10312.hs:(16,19)-(20,19),AnnVbar), [Test10312.hs:17:19]),
((Test10312.hs:16:21-25,AnnVal), [Test10312.hs:16:23]),
((Test10312.hs:16:21-29,AnnVal), [Test10312.hs:16:27]),
-((Test10312.hs:16:27,AnnStar), [Test10312.hs:16:27]),
((Test10312.hs:17:21-32,AnnComma), [Test10312.hs:18:19]),
((Test10312.hs:17:21-32,AnnLarrow), [Test10312.hs:17:23-24]),
((Test10312.hs:17:26-32,AnnCloseS), [Test10312.hs:17:32]),
@@ -60,7 +59,6 @@
((Test10312.hs:(23,20)-(27,20),AnnVbar), [Test10312.hs:24:20]),
((Test10312.hs:23:22-26,AnnVal), [Test10312.hs:23:24]),
((Test10312.hs:23:22-30,AnnVal), [Test10312.hs:23:28]),
-((Test10312.hs:23:28,AnnStar), [Test10312.hs:23:28]),
((Test10312.hs:24:22-33,AnnLarrow), [Test10312.hs:24:24-25]),
((Test10312.hs:24:22-33,AnnVbar), [Test10312.hs:25:20]),
((Test10312.hs:24:27-33,AnnCloseS), [Test10312.hs:24:33]),
diff --git a/testsuite/tests/ghc-api/annotations/T10357.stderr b/testsuite/tests/ghc-api/annotations/T10357.stderr
index b394ffa49b..09f29ddfb8 100644
--- a/testsuite/tests/ghc-api/annotations/T10357.stderr
+++ b/testsuite/tests/ghc-api/annotations/T10357.stderr
@@ -1,37 +1,37 @@
-
-Test10357.hs:4:13: error: Variable not in scope: one
-
-Test10357.hs:4:19: error: Variable not in scope: x
-
-Test10357.hs:5:7: error:
- Variable not in scope: multPoly :: t3 -> t4 -> t
-
-Test10357.hs:6:10: error:
- Variable not in scope: poly :: t0 -> [Double] -> t3
-
-Test10357.hs:6:15: error:
- Data constructor not in scope: LE
- Perhaps you meant ‘LT’ (imported from Prelude)
-
-Test10357.hs:7:10: error:
- Variable not in scope: addPoly :: t5 -> t6 -> t4
-
-Test10357.hs:7:19: error:
- Variable not in scope: poly :: t1 -> [Double] -> t7
-
-Test10357.hs:7:24: error:
- Data constructor not in scope: LE
- Perhaps you meant ‘LT’ (imported from Prelude)
-
-Test10357.hs:7:43: error:
- Variable not in scope: multPoly :: t7 -> t -> t5
-
-Test10357.hs:8:19: error:
- Variable not in scope: poly :: t2 -> [Double] -> t8
-
-Test10357.hs:8:24: error:
- Data constructor not in scope: LE
- Perhaps you meant ‘LT’ (imported from Prelude)
-
-Test10357.hs:8:43: error:
- Variable not in scope: multPoly :: t8 -> t -> t6
+
+Test10357.hs:4:13: error: Variable not in scope: one
+
+Test10357.hs:4:19: error: Variable not in scope: x
+
+Test10357.hs:5:7: error:
+ Variable not in scope: multPoly :: t0 -> t1 -> t
+
+Test10357.hs:6:10: error:
+ Variable not in scope: poly :: t2 -> [Double] -> t0
+
+Test10357.hs:6:15: error:
+ Data constructor not in scope: LE
+ Perhaps you meant ‘LT’ (imported from Prelude)
+
+Test10357.hs:7:10: error:
+ Variable not in scope: addPoly :: t3 -> t4 -> t1
+
+Test10357.hs:7:19: error:
+ Variable not in scope: poly :: t6 -> [Double] -> t5
+
+Test10357.hs:7:24: error:
+ Data constructor not in scope: LE
+ Perhaps you meant ‘LT’ (imported from Prelude)
+
+Test10357.hs:7:43: error:
+ Variable not in scope: multPoly :: t5 -> t -> t3
+
+Test10357.hs:8:19: error:
+ Variable not in scope: poly :: t8 -> [Double] -> t7
+
+Test10357.hs:8:24: error:
+ Data constructor not in scope: LE
+ Perhaps you meant ‘LT’ (imported from Prelude)
+
+Test10357.hs:8:43: error:
+ Variable not in scope: multPoly :: t7 -> t -> t4
diff --git a/testsuite/tests/ghc-api/annotations/T10357.stdout b/testsuite/tests/ghc-api/annotations/T10357.stdout
index cbbb84e2ee..15d5139be5 100644
--- a/testsuite/tests/ghc-api/annotations/T10357.stdout
+++ b/testsuite/tests/ghc-api/annotations/T10357.stdout
@@ -31,7 +31,6 @@
((Test10357.hs:7:28,AnnComma), [Test10357.hs:7:29]),
((Test10357.hs:7:31-36,AnnVal), [Test10357.hs:7:33]),
((Test10357.hs:7:31-40,AnnVal), [Test10357.hs:7:38]),
-((Test10357.hs:7:33,AnnStar), [Test10357.hs:7:33]),
((Test10357.hs:7:43-52,AnnBackquote), [Test10357.hs:7:43, Test10357.hs:7:52]),
((Test10357.hs:7:43-52,AnnVal), [Test10357.hs:7:44-51]),
((Test10357.hs:8:18-59,AnnCloseP), [Test10357.hs:8:59]),
diff --git a/testsuite/tests/ghc-api/annotations/T10358.stdout b/testsuite/tests/ghc-api/annotations/T10358.stdout
index 2bcbf68c09..ae1ec8587f 100644
--- a/testsuite/tests/ghc-api/annotations/T10358.stdout
+++ b/testsuite/tests/ghc-api/annotations/T10358.stdout
@@ -15,23 +15,18 @@
((Test10358.hs:5:7-16,AnnEqual), [Test10358.hs:5:12]),
((Test10358.hs:5:7-16,AnnSemi), [Test10358.hs:5:17]),
((Test10358.hs:5:14-16,AnnVal), [Test10358.hs:5:15]),
-((Test10358.hs:5:15,AnnStar), [Test10358.hs:5:15]),
((Test10358.hs:5:19-22,AnnBang), [Test10358.hs:5:19]),
((Test10358.hs:5:19-32,AnnEqual), [Test10358.hs:5:24]),
((Test10358.hs:5:19-32,AnnSemi), [Test10358.hs:6:7]),
((Test10358.hs:5:26-32,AnnVal), [Test10358.hs:5:29]),
-((Test10358.hs:5:29,AnnStar), [Test10358.hs:5:29]),
((Test10358.hs:6:7-16,AnnEqual), [Test10358.hs:6:10]),
((Test10358.hs:6:7-16,AnnFunId), [Test10358.hs:6:7-8]),
((Test10358.hs:6:7-16,AnnSemi), [Test10358.hs:7:7]),
((Test10358.hs:6:12-14,AnnVal), [Test10358.hs:6:13]),
((Test10358.hs:6:12-16,AnnVal), [Test10358.hs:6:15]),
-((Test10358.hs:6:13,AnnStar), [Test10358.hs:6:13]),
-((Test10358.hs:6:15,AnnStar), [Test10358.hs:6:15]),
((Test10358.hs:7:7-17,AnnEqual), [Test10358.hs:7:10]),
((Test10358.hs:7:7-17,AnnFunId), [Test10358.hs:7:7-8]),
((Test10358.hs:7:12-17,AnnVal), [Test10358.hs:7:14]),
-((Test10358.hs:7:14,AnnStar), [Test10358.hs:7:14]),
((<no location info>,AnnEofPos), [Test10358.hs:9:1])
]
diff --git a/testsuite/tests/ghc-api/annotations/T11018.stderr b/testsuite/tests/ghc-api/annotations/T11018.stderr
index c58942f4c7..86d30ec5ed 100644
--- a/testsuite/tests/ghc-api/annotations/T11018.stderr
+++ b/testsuite/tests/ghc-api/annotations/T11018.stderr
@@ -20,7 +20,7 @@ Test11018.hs:26:7: error:
Not in scope: type constructor or class ‘ArrowApply’
Test11018.hs:37:27: error:
- Illegal kind signature: ‘* -> *’
+ Illegal kind signature: ‘★ -> ★’
Perhaps you intended to use KindSignatures
In the data type declaration for ‘RecorderU’
diff --git a/testsuite/tests/ghc-api/annotations/T11018.stdout b/testsuite/tests/ghc-api/annotations/T11018.stdout
index d05c13f213..ac32549858 100644
--- a/testsuite/tests/ghc-api/annotations/T11018.stdout
+++ b/testsuite/tests/ghc-api/annotations/T11018.stdout
@@ -23,9 +23,8 @@
((Test11018.hs:12:21-32,AnnCloseP), [Test11018.hs:12:32]),
((Test11018.hs:12:21-32,AnnDcolonU), [Test11018.hs:12:24]),
((Test11018.hs:12:21-32,AnnOpenP), [Test11018.hs:12:21]),
-((Test11018.hs:12:26,AnnStar), [Test11018.hs:12:26]),
+((Test11018.hs:12:26,AnnRarrow), [Test11018.hs:12:28-29]),
((Test11018.hs:12:26-31,AnnRarrow), [Test11018.hs:12:28-29]),
-((Test11018.hs:12:31,AnnStar), [Test11018.hs:12:31]),
((Test11018.hs:(13,16)-(15,7),AnnCloseC), [Test11018.hs:15:7]),
((Test11018.hs:(13,16)-(15,7),AnnOpenC), [Test11018.hs:13:16]),
((Test11018.hs:14:9-40,AnnDcolon), [Test11018.hs:14:18-19]),
@@ -119,9 +118,8 @@
((Test11018.hs:37:22-32,AnnCloseP), [Test11018.hs:37:32]),
((Test11018.hs:37:22-32,AnnDcolonU), [Test11018.hs:37:25]),
((Test11018.hs:37:22-32,AnnOpenP), [Test11018.hs:37:22]),
-((Test11018.hs:37:27,AnnStarU), [Test11018.hs:37:27]),
+((Test11018.hs:37:27,AnnRarrowU), [Test11018.hs:37:29]),
((Test11018.hs:37:27-31,AnnRarrowU), [Test11018.hs:37:29]),
-((Test11018.hs:37:31,AnnStarU), [Test11018.hs:37:31]),
((Test11018.hs:(38,17)-(40,7),AnnCloseC), [Test11018.hs:40:7]),
((Test11018.hs:(38,17)-(40,7),AnnOpenC), [Test11018.hs:38:17]),
((Test11018.hs:39:9-40,AnnDcolonU), [Test11018.hs:39:19]),
diff --git a/testsuite/tests/ghc-api/annotations/exampleTest.stdout b/testsuite/tests/ghc-api/annotations/exampleTest.stdout
index 9ae9f2300a..a884f56a32 100644
--- a/testsuite/tests/ghc-api/annotations/exampleTest.stdout
+++ b/testsuite/tests/ghc-api/annotations/exampleTest.stdout
@@ -65,9 +65,8 @@
((AnnotationTuple.hs:18:1-28,AnnDcolon), [AnnotationTuple.hs:18:20-21]),
((AnnotationTuple.hs:18:1-28,AnnFamily), [AnnotationTuple.hs:18:6-11]),
((AnnotationTuple.hs:18:1-28,AnnSemi), [AnnotationTuple.hs:19:1]),
-((AnnotationTuple.hs:18:23,AnnStar), [AnnotationTuple.hs:18:23]),
+((AnnotationTuple.hs:18:23,AnnRarrow), [AnnotationTuple.hs:18:25-26]),
((AnnotationTuple.hs:18:23-28,AnnRarrow), [AnnotationTuple.hs:18:25-26]),
-((AnnotationTuple.hs:18:28,AnnStar), [AnnotationTuple.hs:18:28]),
((AnnotationTuple.hs:(20,1)-(24,14),AnnFunId), [AnnotationTuple.hs:20:1-5]),
((AnnotationTuple.hs:(20,1)-(24,14),AnnSemi), [AnnotationTuple.hs:25:1]),
((AnnotationTuple.hs:(21,7)-(24,14),AnnEqual), [AnnotationTuple.hs:24:7]),
diff --git a/testsuite/tests/ghc-api/annotations/listcomps.stdout b/testsuite/tests/ghc-api/annotations/listcomps.stdout
index 754c170f39..1c0b8e5ce4 100644
--- a/testsuite/tests/ghc-api/annotations/listcomps.stdout
+++ b/testsuite/tests/ghc-api/annotations/listcomps.stdout
@@ -97,8 +97,6 @@
(AK ListComprehensions.hs:18:22-30 AnnVal = [ListComprehensions.hs:18:28])
-(AK ListComprehensions.hs:18:28 AnnStar = [ListComprehensions.hs:18:28])
-
(AK ListComprehensions.hs:19:22-33 AnnLarrow = [ListComprehensions.hs:19:24-25])
(AK ListComprehensions.hs:19:22-33 AnnVbar = [ListComprehensions.hs:20:20])
diff --git a/testsuite/tests/ghc-api/annotations/parseTree.stdout b/testsuite/tests/ghc-api/annotations/parseTree.stdout
index d3e1a5a7dd..46b1c4fbb4 100644
--- a/testsuite/tests/ghc-api/annotations/parseTree.stdout
+++ b/testsuite/tests/ghc-api/annotations/parseTree.stdout
@@ -132,12 +132,10 @@
(AK AnnotationTuple.hs:18:1-28 AnnSemi = [AnnotationTuple.hs:19:1])
-(AK AnnotationTuple.hs:18:23 AnnStar = [AnnotationTuple.hs:18:23])
+(AK AnnotationTuple.hs:18:23 AnnRarrow = [AnnotationTuple.hs:18:25-26])
(AK AnnotationTuple.hs:18:23-28 AnnRarrow = [AnnotationTuple.hs:18:25-26])
-(AK AnnotationTuple.hs:18:28 AnnStar = [AnnotationTuple.hs:18:28])
-
(AK AnnotationTuple.hs:(20,1)-(24,14) AnnFunId = [AnnotationTuple.hs:20:1-5])
(AK AnnotationTuple.hs:(20,1)-(24,14) AnnSemi = [AnnotationTuple.hs:25:1])
diff --git a/testsuite/tests/ghc-api/landmines/landmines.stdout b/testsuite/tests/ghc-api/landmines/landmines.stdout
index 551b2cf8d7..ccb6b3107e 100644
--- a/testsuite/tests/ghc-api/landmines/landmines.stdout
+++ b/testsuite/tests/ghc-api/landmines/landmines.stdout
@@ -1,4 +1,4 @@
(12,12,7)
-(63,63,0)
-(13,13,7)
+(70,63,0)
+(14,13,7)
(10,10,7)
diff --git a/testsuite/tests/ghci.debugger/scripts/break001.stdout b/testsuite/tests/ghci.debugger/scripts/break001.stdout
index c3146e2351..02ba1bbe93 100644
--- a/testsuite/tests/ghci.debugger/scripts/break001.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break001.stdout
@@ -1,12 +1,12 @@
Breakpoint 0 activated at ../Test2.hs:3:1-9
Breakpoint 1 activated at ../Test2.hs:5:1-7
Stopped at ../Test2.hs:3:1-9
-_result :: t = _
+_result :: r = _
Stopped at ../Test2.hs:3:7-9
_result :: Integer = _
x :: Integer = 1
Stopped at ../Test2.hs:5:1-7
-_result :: t = _
+_result :: r = _
Stopped at ../Test2.hs:5:7
_result :: Integer = _
y :: Integer = 1
diff --git a/testsuite/tests/ghci.debugger/scripts/break003.stderr b/testsuite/tests/ghci.debugger/scripts/break003.stderr
index bf3d2ef5a4..c19e8b45ce 100644
--- a/testsuite/tests/ghci.debugger/scripts/break003.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break003.stderr
@@ -1,5 +1,5 @@
<interactive>:4:1: error:
- No instance for (Show (t -> t1)) arising from a use of ‘print’
+ No instance for (Show (t1 -> t)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci.debugger/scripts/break003.stdout b/testsuite/tests/ghci.debugger/scripts/break003.stdout
index a48f74c4c3..b1aa8ba2d2 100644
--- a/testsuite/tests/ghci.debugger/scripts/break003.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break003.stdout
@@ -1,6 +1,6 @@
Breakpoint 0 activated at ../Test3.hs:2:18-31
Stopped at ../Test3.hs:2:18-31
-_result :: [t1] = _
-f :: t -> t1 = _
-x :: t = _
-xs :: [t] = [_]
+_result :: [t] = _
+f :: t1 -> t = _
+x :: t1 = _
+xs :: [t1] = [_]
diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stderr b/testsuite/tests/ghci.debugger/scripts/break006.stderr
index 56f40f2b21..f1567ed7ff 100644
--- a/testsuite/tests/ghci.debugger/scripts/break006.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break006.stderr
@@ -1,14 +1,14 @@
<interactive>:5:1: error:
- No instance for (Show t1) arising from a use of ‘print’
- Cannot resolve unknown runtime type ‘t1’
+ No instance for (Show t) arising from a use of ‘print’
+ Cannot resolve unknown runtime type ‘t’
Use :print or :force to determine these types
- Relevant bindings include it :: t1 (bound at <interactive>:5:1)
+ Relevant bindings include it :: t (bound at <interactive>:5:1)
These potential instances exist:
instance (Show a, Show b) => Show (Either a b)
-- Defined in ‘Data.Either’
instance Show All -- Defined in ‘Data.Monoid’
- instance forall (k :: BOX) (f :: k -> *) (a :: k).
+ instance forall k (f :: k -> *) (a :: k).
Show (f a) =>
Show (Alt f a)
-- Defined in ‘Data.Monoid’
@@ -17,15 +17,15 @@
In a stmt of an interactive GHCi command: print it
<interactive>:7:1: error:
- No instance for (Show t1) arising from a use of ‘print’
- Cannot resolve unknown runtime type ‘t1’
+ No instance for (Show t) arising from a use of ‘print’
+ Cannot resolve unknown runtime type ‘t’
Use :print or :force to determine these types
- Relevant bindings include it :: t1 (bound at <interactive>:7:1)
+ Relevant bindings include it :: t (bound at <interactive>:7:1)
These potential instances exist:
instance (Show a, Show b) => Show (Either a b)
-- Defined in ‘Data.Either’
instance Show All -- Defined in ‘Data.Monoid’
- instance forall (k :: BOX) (f :: k -> *) (a :: k).
+ instance forall k (f :: k -> *) (a :: k).
Show (f a) =>
Show (Alt f a)
-- Defined in ‘Data.Monoid’
diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stdout b/testsuite/tests/ghci.debugger/scripts/break006.stdout
index 7e5edbf9d2..374fffd29a 100644
--- a/testsuite/tests/ghci.debugger/scripts/break006.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break006.stdout
@@ -1,15 +1,15 @@
Stopped at ../Test3.hs:(1,1)-(2,31)
-_result :: [t1] = _
+_result :: [t] = _
Stopped at ../Test3.hs:2:18-31
-_result :: [t1] = _
-f :: Integer -> t1 = _
+_result :: [t] = _
+f :: Integer -> t = _
x :: Integer = 1
xs :: [Integer] = [2,3]
xs :: [Integer] = [2,3]
x :: Integer = 1
-f :: Integer -> t1 = _
-_result :: [t1] = _
-y = (_t1::t1)
+f :: Integer -> t = _
+_result :: [t] = _
+y = (_t1::t)
y = 2
xs :: [Integer] = [2,3]
x :: Integer = 1
diff --git a/testsuite/tests/ghci.debugger/scripts/break012.stdout b/testsuite/tests/ghci.debugger/scripts/break012.stdout
index 88e8b3ee71..6b023718dc 100644
--- a/testsuite/tests/ghci.debugger/scripts/break012.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break012.stdout
@@ -1,16 +1,16 @@
Stopped at break012.hs:(1,1)-(5,18)
-_result :: (t, a3 -> a3, (), a2 -> a2 -> a2) = _
+_result :: (r, a3 -> a3, (), a2 -> a2 -> a2) = _
Stopped at break012.hs:5:10-18
-_result :: (t, a3 -> a3, (), a2 -> a2 -> a2) = _
-a :: t = _
+_result :: (r, a3 -> a3, (), a2 -> a2 -> a2) = _
+a :: r = _
b :: a4 -> a4 = _
c :: () = _
d :: a2 -> a2 -> a2 = _
-a :: t
+a :: r
b :: a4 -> a4
c :: ()
d :: a2 -> a2 -> a2
-a = (_t1::t)
+a = (_t1::r)
b = (_t2::a4 -> a4)
c = (_t3::())
d = (_t4::a2 -> a2 -> a2)
diff --git a/testsuite/tests/ghci.debugger/scripts/break018.stdout b/testsuite/tests/ghci.debugger/scripts/break018.stdout
index 11ef5476b5..d9c6b6e06a 100644
--- a/testsuite/tests/ghci.debugger/scripts/break018.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break018.stdout
@@ -1,5 +1,5 @@
Stopped at ../mdo.hs:(30,1)-(32,27)
-_result :: IO (N a6) = _
+_result :: IO (N a7) = _
Stopped at ../mdo.hs:(30,16)-(32,27)
_result :: IO (N Char) = _
x :: Char = 'h'
@@ -10,4 +10,4 @@ f :: N Char = _
l :: N Char = _
x :: Char = 'h'
Stopped at ../mdo.hs:(8,1)-(9,42)
-_result :: IO (N a6) = _
+_result :: IO (N a7) = _
diff --git a/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout b/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout
index a87ffce942..f4b804296f 100644
--- a/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout
@@ -5,4 +5,4 @@ Stopped at A.hs:4:7-9
_result :: () = _
x :: () = ()
Stopped at B.hs:5:1-7
-_result :: t = _
+_result :: r = _
diff --git a/testsuite/tests/ghci.debugger/scripts/break026.stdout b/testsuite/tests/ghci.debugger/scripts/break026.stdout
index 8d81867044..9afc3f470e 100644
--- a/testsuite/tests/ghci.debugger/scripts/break026.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break026.stdout
@@ -1,58 +1,58 @@
-Stopped at break026.hs:(5,1)-(7,35)
-_result :: t1 = _
-Stopped at break026.hs:5:16-22
-_result :: Integer = _
-c :: Integer = 0
-go :: Integer -> [t] -> Integer = _
-xs :: [t] = _
-Stopped at break026.hs:(6,9)-(7,35)
-_result :: t1 = _
-f :: t1 -> t -> t1 = _
-Stopped at break026.hs:7:23-35
-_result :: Integer = _
-c :: Integer = 0
-f :: Integer -> Integer -> Integer = _
-x :: Integer = 1
-xs :: [Integer] = _
-Stopped at break026.hs:(6,9)-(7,35)
-_result :: t1 = _
-f :: t1 -> t -> t1 = _
-Stopped at break026.hs:7:23-35
-_result :: t1 = _
-c :: t1 = _
-f :: t1 -> Integer -> t1 = _
-x :: Integer = 2
-xs :: [Integer] = _
-c = 1
-Stopped at break026.hs:(5,1)-(7,35)
-_result :: t1 = _
-Stopped at break026.hs:5:16-22
-_result :: Integer = _
-c :: Integer = 0
-go :: Integer -> [t] -> Integer = _
-xs :: [t] = _
-Stopped at break026.hs:(6,9)-(7,35)
-_result :: t1 = _
-f :: t1 -> t -> t1 = _
-Stopped at break026.hs:7:23-35
-_result :: Integer = _
-c :: Integer = 0
-f :: Integer -> Integer -> Integer = _
-x :: Integer = 1
-xs :: [Integer] = _
-Stopped at break026.hs:(6,9)-(7,35)
-_result :: t1 = _
-f :: t1 -> t -> t1 = _
-Stopped at break026.hs:7:23-35
-_result :: t1 = _
-c :: t1 = _
-f :: t1 -> Integer -> t1 = _
-x :: Integer = 2
-xs :: [Integer] = _
-Stopped at break026.hs:7:27-31
-_result :: Integer = _
-c :: Integer = 0
-f :: Integer -> Integer -> Integer = _
-x :: Integer = 1
-()
-1
+Stopped at break026.hs:(5,1)-(7,35)
+_result :: t = _
+Stopped at break026.hs:5:16-22
+_result :: Integer = _
+c :: Integer = 0
+go :: Integer -> [t1] -> Integer = _
+xs :: [t1] = _
+Stopped at break026.hs:(6,9)-(7,35)
+_result :: t = _
+f :: t -> t1 -> t = _
+Stopped at break026.hs:7:23-35
+_result :: Integer = _
+c :: Integer = 0
+f :: Integer -> Integer -> Integer = _
+x :: Integer = 1
+xs :: [Integer] = _
+Stopped at break026.hs:(6,9)-(7,35)
+_result :: t = _
+f :: t -> t1 -> t = _
+Stopped at break026.hs:7:23-35
+_result :: t = _
+c :: t = _
+f :: t -> Integer -> t = _
+x :: Integer = 2
+xs :: [Integer] = _
+c = 1
+Stopped at break026.hs:(5,1)-(7,35)
+_result :: t = _
+Stopped at break026.hs:5:16-22
+_result :: Integer = _
+c :: Integer = 0
+go :: Integer -> [t1] -> Integer = _
+xs :: [t1] = _
+Stopped at break026.hs:(6,9)-(7,35)
+_result :: t = _
+f :: t -> t1 -> t = _
+Stopped at break026.hs:7:23-35
+_result :: Integer = _
+c :: Integer = 0
+f :: Integer -> Integer -> Integer = _
+x :: Integer = 1
+xs :: [Integer] = _
+Stopped at break026.hs:(6,9)-(7,35)
+_result :: t = _
+f :: t -> t1 -> t = _
+Stopped at break026.hs:7:23-35
+_result :: t = _
+c :: t = _
+f :: t -> Integer -> t = _
+x :: Integer = 2
+xs :: [Integer] = _
+Stopped at break026.hs:7:27-31
+_result :: Integer = _
+c :: Integer = 0
+f :: Integer -> Integer -> Integer = _
+x :: Integer = 1
+()
+1
diff --git a/testsuite/tests/ghci.debugger/scripts/break028.stdout b/testsuite/tests/ghci.debugger/scripts/break028.stdout
index 896a2416ef..bbe47267b0 100644
--- a/testsuite/tests/ghci.debugger/scripts/break028.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break028.stdout
@@ -1,5 +1,5 @@
Stopped at break028.hs:15:1-24
-_result :: Id a3 = _
+_result :: Id a4 = _
Stopped at break028.hs:15:23-24
-_result :: Id a3 = _
-x' :: Id a3 = _
+_result :: Id a4 = _
+x' :: Id a4 = _
diff --git a/testsuite/tests/ghci.debugger/scripts/hist001.stdout b/testsuite/tests/ghci.debugger/scripts/hist001.stdout
index 0b58b8fcb7..3a70f6aa1e 100644
--- a/testsuite/tests/ghci.debugger/scripts/hist001.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/hist001.stdout
@@ -12,20 +12,20 @@ _result :: [a] = _
-9 : mymap (../Test3.hs:(1,1)-(2,31))
<end of history>
Logged breakpoint at ../Test3.hs:(1,1)-(2,31)
-_result :: [t1]
-_result :: [t1] = _
+_result :: [t]
+_result :: [t] = _
Logged breakpoint at ../Test3.hs:2:22-31
-_result :: [t1]
-f :: t -> t1
-xs :: [t]
-xs :: [t] = []
-f :: t -> t1 = _
-_result :: [t1] = _
+_result :: [t]
+f :: t1 -> t
+xs :: [t1]
+xs :: [t1] = []
+f :: t1 -> t = _
+_result :: [t] = _
*** Ignoring breakpoint
_result = []
Logged breakpoint at ../Test3.hs:2:18-20
-_result :: t1
-f :: Integer -> t1
+_result :: t
+f :: Integer -> t
x :: Integer
Logged breakpoint at ../Test3.hs:2:22-31
-_result :: [t1]
+_result :: [t]
diff --git a/testsuite/tests/ghci.debugger/scripts/print018.stdout b/testsuite/tests/ghci.debugger/scripts/print018.stdout
index a00d5374dd..614b7d3657 100644
--- a/testsuite/tests/ghci.debugger/scripts/print018.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print018.stdout
@@ -3,9 +3,9 @@ Stopped at ../Test.hs:40:1-17
_result :: () = _
Stopped at ../Test.hs:40:10-17
_result :: () = _
-x :: a36 = _
-x = (_t1::a36)
-x :: a36
+x :: a41 = _
+x = (_t1::a41)
+x :: a41
()
x = Unary
x :: Unary
diff --git a/testsuite/tests/ghci.debugger/scripts/print022.stdout b/testsuite/tests/ghci.debugger/scripts/print022.stdout
index 8aa539418a..85111a2c7e 100644
--- a/testsuite/tests/ghci.debugger/scripts/print022.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print022.stdout
@@ -2,9 +2,9 @@
test = C 1 32 1.2 1.23 'x' 1 1.2 1.23
Breakpoint 0 activated at print022.hs:11:1-7
Stopped at print022.hs:11:1-7
-_result :: t = _
+_result :: r = _
Stopped at print022.hs:11:7
-_result :: t = _
-x :: t = _
+_result :: r = _
+x :: r = _
x = C2 1 (W# 32) (TwoFields 'a' 3)
x :: T2
diff --git a/testsuite/tests/ghci.debugger/scripts/print025.stdout b/testsuite/tests/ghci.debugger/scripts/print025.stdout
index b2fcf65b1b..3936640210 100644
--- a/testsuite/tests/ghci.debugger/scripts/print025.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print025.stdout
@@ -1,7 +1,7 @@
T 1
Breakpoint 0 activated at print025.hs:2:1-7
Stopped at print025.hs:2:1-7
-_result :: t = _
+_result :: r = _
Stopped at print025.hs:2:7
_result :: T Int s = _
x :: T Int s = T 1
diff --git a/testsuite/tests/ghci.debugger/scripts/print031.stdout b/testsuite/tests/ghci.debugger/scripts/print031.stdout
index da3e14238d..81a2518a31 100644
--- a/testsuite/tests/ghci.debugger/scripts/print031.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print031.stdout
@@ -4,5 +4,5 @@ Stopped at print031.hs:7:1-19
_result :: Bool = _
Stopped at print031.hs:7:7-19
_result :: Bool = _
-x :: t (Phantom a5) = [Just (Phantom 1)]
+x :: t (Phantom a6) = [Just (Phantom 1)]
x = [Just (Phantom 1)]
diff --git a/testsuite/tests/ghci.debugger/scripts/print036.stdout b/testsuite/tests/ghci.debugger/scripts/print036.stdout
index d932b467a5..b9862354ab 100644
--- a/testsuite/tests/ghci.debugger/scripts/print036.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print036.stdout
@@ -1,2 +1 @@
read = (_t1::Read a => String -> a)
-_t1 :: Read a => String -> a
diff --git a/testsuite/tests/ghci/prog009/ghci.prog009.stdout b/testsuite/tests/ghci/prog009/ghci.prog009.stdout
index 74d4c49e88..20c759782f 100644
--- a/testsuite/tests/ghci/prog009/ghci.prog009.stdout
+++ b/testsuite/tests/ghci/prog009/ghci.prog009.stdout
@@ -1,8 +1,8 @@
-nub :: Eq a => [a] -> [a]
-"tan"
-nub :: Eq a => [a] -> [a]
-"tan"
-nub :: Eq a => [a] -> [a]
-A ( A.hs, interpreted )
-nub :: Eq a => [a] -> [a]
-"tan"
+nub :: Eq a => [a] -> [a]
+"tan"
+nub :: Eq a => [a] -> [a]
+"tan"
+nub :: Eq a => [a] -> [a]
+A ( A.hs, interpreted )
+nub :: Eq a => [a] -> [a]
+"tan"
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index 8b63df689a..ad39191d08 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -12,6 +12,11 @@
• 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
+
../../typecheck/should_run/Defer01.hs:25:1: warning:
Pattern match(es) have inaccessible right hand side
In an equation for ‘c’: c (C2 x) = ...
@@ -173,7 +178,7 @@
(deferred type error)
<interactive>:13:8: error:
- • Couldn't match expected type ‘Bool’ with actual type ‘Int’
+ • Couldn't match type ‘Int’ with ‘Bool’ arising from a use of ‘k’
• In the first argument of ‘print’, namely ‘(k 2)’
In the expression: print (k 2)
In an equation for ‘it’: it = print (k 2)
diff --git a/testsuite/tests/ghci/scripts/Defer02.stdout b/testsuite/tests/ghci/scripts/Defer02.stdout
index 4fd8c5d880..9d68933c44 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stdout
+++ b/testsuite/tests/ghci/scripts/Defer02.stdout
@@ -1 +1 @@
-Hello World(" \ No newline at end of file
+" \ No newline at end of file
diff --git a/testsuite/tests/ghci/scripts/T10122.stdout b/testsuite/tests/ghci/scripts/T10122.stdout
index c79a8711f3..84d8856c1b 100644
--- a/testsuite/tests/ghci/scripts/T10122.stdout
+++ b/testsuite/tests/ghci/scripts/T10122.stdout
@@ -1,2 +1,2 @@
T :: (k -> *) -> k -> *
-T :: forall (k :: BOX). (k -> *) -> k -> *
+T :: forall k. (k -> *) -> k -> *
diff --git a/testsuite/tests/ghci/scripts/T10508.stderr b/testsuite/tests/ghci/scripts/T10508.stderr
index c5aff2361c..86ee279393 100644
--- a/testsuite/tests/ghci/scripts/T10508.stderr
+++ b/testsuite/tests/ghci/scripts/T10508.stderr
@@ -1,8 +1,8 @@
-<interactive>:1:15:
+<interactive>:1:15: error:
Couldn't match type ‘a0 -> a0’ with ‘[Char]’
- Expected type: Prelude.String
- Actual type: a0 -> a0
+ Expected type: Prelude.String
+ Actual type: a0 -> a0
Probable cause: ‘id’ is applied to too few arguments
In the first argument of ‘return’, namely ‘id’
- In the expression: return id \ No newline at end of file
+ In the expression: return id
diff --git a/testsuite/tests/ghci/scripts/T2182ghci.stderr b/testsuite/tests/ghci/scripts/T2182ghci.stderr
index f5eafdfc88..dd65a7fc1f 100644
--- a/testsuite/tests/ghci/scripts/T2182ghci.stderr
+++ b/testsuite/tests/ghci/scripts/T2182ghci.stderr
@@ -1,25 +1,25 @@
<interactive>:2:1: error:
- No instance for (Show (t0 -> t0)) arising from a use of ‘print’
+ No instance for (Show (r0 -> r0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
<interactive>:10:1: error:
- No instance for (Show (t0 -> t0)) arising from a use of ‘print’
+ No instance for (Show (r0 -> r0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
<interactive>:19:1: error:
- No instance for (Show (t0 -> t0)) arising from a use of ‘print’
+ No instance for (Show (r0 -> r0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
<interactive>:28:1: error:
- No instance for (Show (t0 -> t0)) arising from a use of ‘print’
+ No instance for (Show (r0 -> r0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
<interactive>:49:1: error:
- No instance for (Show (t0 -> t0)) arising from a use of ‘print’
+ No instance for (Show (r0 -> r0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci/scripts/T4087.stdout b/testsuite/tests/ghci/scripts/T4087.stdout
index 2ca08aa449..3f600bd78d 100644
--- a/testsuite/tests/ghci/scripts/T4087.stdout
+++ b/testsuite/tests/ghci/scripts/T4087.stdout
@@ -1,4 +1,4 @@
-type role Equal nominal nominal
-data Equal a b where
- Equal :: Equal b b
- -- Defined at T4087.hs:5:1
+type role Equal nominal nominal
+data Equal a b where
+ Equal :: Equal a a
+ -- Defined at T4087.hs:5:1
diff --git a/testsuite/tests/ghci/scripts/T4175.stdout b/testsuite/tests/ghci/scripts/T4175.stdout
index cea9a01264..dbf2f371dd 100644
--- a/testsuite/tests/ghci/scripts/T4175.stdout
+++ b/testsuite/tests/ghci/scripts/T4175.stdout
@@ -1,4 +1,6 @@
-type family A a b :: * -- Defined at T4175.hs:7:1
+type family A a b
+ Kind: * -> * -> *
+ -- Defined at T4175.hs:7:1
type instance A (B a) b = () -- Defined at T4175.hs:10:1
type instance A (Maybe a) a = a -- Defined at T4175.hs:9:1
type instance A Int Int = () -- Defined at T4175.hs:8:1
@@ -7,13 +9,16 @@ instance G B -- Defined at T4175.hs:34:10
data instance B () = MkB -- Defined at T4175.hs:13:15
type instance A (B a) b = () -- Defined at T4175.hs:10:1
class C a where
- type family D a b :: *
+ type family D a b
+ Kind: * -> * -> *
-- Defined at T4175.hs:16:5
type instance D () () = Bool -- Defined at T4175.hs:22:5
type instance D Int () = String -- Defined at T4175.hs:19:5
-type family E a :: * where
- E () = Bool
- E Int = String
+type family E a
+ Kind: * -> *
+ where
+ E () = Bool
+ E Int = String
-- Defined at T4175.hs:24:1
data () = () -- Defined in ‘GHC.Tuple’
instance C () -- Defined at T4175.hs:21:10
diff --git a/testsuite/tests/ghci/scripts/T6018ghcifail.stderr b/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
index ff97c50957..110092d514 100644
--- a/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
+++ b/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
@@ -46,7 +46,7 @@
<interactive>:60:15: error:
Type family equation violates injectivity annotation.
- Kind variable ‘k1’ cannot be inferred from the right-hand side.
+ Kind variable ‘k’ cannot be inferred from the right-hand side.
(enabling -fprint-explicit-kinds might help)
In the type family equation:
PolyKindVars '[] = '[] -- Defined at <interactive>:60:15
@@ -56,7 +56,7 @@
Kind variable ‘k’ cannot be inferred from the right-hand side.
(enabling -fprint-explicit-kinds might help)
In the type family equation:
- forall (k :: BOX) (a :: k) (b :: k).
+ forall k (a :: k) (b :: k).
Fc a b = Int -- Defined at <interactive>:64:15
<interactive>:68:15: error:
@@ -65,7 +65,7 @@
cannot be inferred from the right-hand side.
(enabling -fprint-explicit-kinds might help)
In the type family equation:
- forall (k :: BOX) (a :: k) (b :: k).
+ forall k (a :: k) (b :: k).
Gc a b = Int -- Defined at <interactive>:68:15
<interactive>:81:15: error:
diff --git a/testsuite/tests/ghci/scripts/T7627.stdout b/testsuite/tests/ghci/scripts/T7627.stdout
index 158672cc2a..81a360facb 100644
--- a/testsuite/tests/ghci/scripts/T7627.stdout
+++ b/testsuite/tests/ghci/scripts/T7627.stdout
@@ -25,9 +25,9 @@ instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
instance (Monoid a, Monoid b) => Monoid (a, b)
-- Defined in ‘GHC.Base’
-data (#,#) (a :: OpenKind) (b :: OpenKind) = (#,#) a b
+data (#,#) (c :: TYPE a) (d :: TYPE b) = (#,#) c d
-- Defined in ‘GHC.Prim’
(,) :: a -> b -> (a, b)
-(#,#) :: a -> b -> (# a, b #)
+(#,#) :: c -> d -> (# c, d #)
( , ) :: a -> b -> (a, b)
-(# , #) :: a -> b -> (# a, b #)
+(# , #) :: c -> d -> (# c, d #)
diff --git a/testsuite/tests/ghci/scripts/T7730.stdout b/testsuite/tests/ghci/scripts/T7730.stdout
index d91d058e53..fcf9e4c1d2 100644
--- a/testsuite/tests/ghci/scripts/T7730.stdout
+++ b/testsuite/tests/ghci/scripts/T7730.stdout
@@ -4,5 +4,5 @@ data A (x :: k) (y :: k1)
A :: k -> k1 -> *
type role T phantom
data T (a :: k) where
- MkT :: forall (k :: BOX) (a :: k) a1. a1 -> T a
+ MkT :: forall k (a :: k) a1. a1 -> T a
-- Defined at <interactive>:6:1
diff --git a/testsuite/tests/ghci/scripts/T7873.script b/testsuite/tests/ghci/scripts/T7873.script
index 590332665a..404c1f5bda 100644
--- a/testsuite/tests/ghci/scripts/T7873.script
+++ b/testsuite/tests/ghci/scripts/T7873.script
@@ -1,5 +1,6 @@
-:set -XPolyKinds -XRankNTypes -XGADTs
+:set -XPolyKinds -XRankNTypes -XGADTs -XTypeInType
data D1 = MkD1 (forall p (a :: k). p a -> Int)
data D2 = MkD2 (forall p a. p a -> Int)
-:i D1
+data D3 = MkD3 (forall k p (a :: k). p a -> Int)
:i D2
+:i D3
diff --git a/testsuite/tests/ghci/scripts/T7873.stderr b/testsuite/tests/ghci/scripts/T7873.stderr
new file mode 100644
index 0000000000..3b6f4f64c1
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T7873.stderr
@@ -0,0 +1,7 @@
+
+<interactive>:2:1: error:
+ • Kind variable ‘k’ is implicitly bound in datatype
+ ‘D1’, but does not appear as the kind of any
+ of its type variables. Perhaps you meant
+ to bind it (with TypeInType) explicitly somewhere?
+ • In the data declaration for ‘D1’
diff --git a/testsuite/tests/ghci/scripts/T7873.stdout b/testsuite/tests/ghci/scripts/T7873.stdout
index 84f3117958..b7415d6222 100644
--- a/testsuite/tests/ghci/scripts/T7873.stdout
+++ b/testsuite/tests/ghci/scripts/T7873.stdout
@@ -1,6 +1,4 @@
-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
+data D2 = MkD2 (forall (p :: Any -> *) (a :: Any). p a -> Int)
+ -- Defined at <interactive>:3:1
+data D3 = MkD3 (forall k (p :: k -> *) (a :: k). p a -> Int)
+ -- Defined at <interactive>:4:1
diff --git a/testsuite/tests/ghci/scripts/T7939.stdout b/testsuite/tests/ghci/scripts/T7939.stdout
index feb890c578..ec6c75cca2 100644
--- a/testsuite/tests/ghci/scripts/T7939.stdout
+++ b/testsuite/tests/ghci/scripts/T7939.stdout
@@ -1,25 +1,34 @@
class Foo (a :: k) where
- type family Bar (a :: k) b :: *
+ type family Bar (a :: k) b
+ Kind: forall k1. k1 -> * -> *
-- Defined at T7939.hs:6:4
Bar :: k -> * -> *
-type family F a :: * -- Defined at T7939.hs:8:1
+type family F a
+ Kind: * -> *
+ -- Defined at T7939.hs:8:1
type instance F Int = Bool -- Defined at T7939.hs:9:1
F :: * -> *
-type family G a :: * where
- G Int = Bool
+type family G a
+ Kind: * -> *
+ where G Int = Bool
-- Defined at T7939.hs:11:1
G :: * -> *
-type family H (a :: Bool) :: Bool where
- H 'False = 'True
+type family H (a :: Bool)
+ Kind: Bool -> Bool
+ where H 'False = 'True
-- Defined at T7939.hs:14:1
H :: Bool -> Bool
-type family J (a :: [k]) :: Bool where
- J k '[] = 'False
- forall (k :: BOX) (h :: k) (t :: [k]). J k (h : t) = 'True
+type family J (a :: [k])
+ Kind: forall k1. [k1] -> Bool
+ where
+ [k] J k '[] = 'False
+ [k, (h :: k), (t :: [k])] J k (h : t) = 'True
-- Defined at T7939.hs:17:1
J :: [k] -> Bool
-type family K (a :: [k]) :: Maybe k where
- K k '[] = 'Nothing
- forall (k :: BOX) (h :: k) (t :: [k]). K k (h : t) = 'Just h
+type family K (a1 :: [a])
+ Kind: forall a2. [a2] -> Maybe a2
+ where
+ [a] K a '[] = 'Nothing
+ [a, (h :: a), (t :: [a])] K a (h : t) = 'Just h
-- Defined at T7939.hs:21:1
-K :: [k] -> Maybe k
+K :: [a] -> Maybe a
diff --git a/testsuite/tests/ghci/scripts/T9181.stdout b/testsuite/tests/ghci/scripts/T9181.stdout
index 15504ec324..0e9913966f 100644
--- a/testsuite/tests/ghci/scripts/T9181.stdout
+++ b/testsuite/tests/ghci/scripts/T9181.stdout
@@ -1,10 +1,16 @@
-type family (*) (a :: Nat) (b :: Nat) :: Nat
-type family (+) (a :: Nat) (b :: Nat) :: Nat
-type family (-) (a :: Nat) (b :: Nat) :: Nat
+type family (*) (a :: Nat) (b :: Nat)
+ Kind: Nat -> Nat -> Nat
+type family (+) (a :: Nat) (b :: Nat)
+ Kind: Nat -> Nat -> Nat
+type family (-) (a :: Nat) (b :: Nat)
+ Kind: Nat -> Nat -> Nat
type (<=) (x :: Nat) (y :: Nat) = (x <=? y) ~ 'True
-type family (<=?) (a :: Nat) (b :: Nat) :: Bool
-type family CmpNat (a :: Nat) (b :: Nat) :: Ordering
-type family CmpSymbol (a :: Symbol) (b :: Symbol) :: Ordering
+type family (<=?) (a :: Nat) (b :: Nat)
+ Kind: Nat -> Nat -> Bool
+type family CmpNat (a :: Nat) (b :: Nat)
+ Kind: Nat -> Nat -> Ordering
+type family CmpSymbol (a :: Symbol) (b :: Symbol)
+ Kind: Symbol -> Symbol -> Ordering
data ErrorMessage where
Text :: Symbol -> ErrorMessage
ShowType :: t -> ErrorMessage
@@ -20,8 +26,10 @@ data SomeNat where
SomeNat :: KnownNat n => (Proxy n) -> SomeNat
data SomeSymbol where
SomeSymbol :: KnownSymbol n => (Proxy n) -> SomeSymbol
-type family TypeError (a :: ErrorMessage) :: b where
-type family (^) (a :: Nat) (b :: Nat) :: Nat
+type family TypeError (a :: ErrorMessage)
+ Kind: forall b1. ErrorMessage -> b1
+type family (^) (a :: Nat) (b :: Nat)
+ Kind: Nat -> Nat -> Nat
natVal :: KnownNat n => proxy n -> Integer
natVal' :: KnownNat n => Proxy# n -> Integer
sameNat ::
diff --git a/testsuite/tests/ghci/scripts/ghci001.stdout b/testsuite/tests/ghci/scripts/ghci001.stdout
index b0a2458b59..a1ff2665f5 100644
--- a/testsuite/tests/ghci/scripts/ghci001.stdout
+++ b/testsuite/tests/ghci/scripts/ghci001.stdout
@@ -1,2 +1,2 @@
-(+) :: Num a => a -> a -> a
-enumFromTo :: Enum a => a -> a -> [a]
+(+) :: Num a => a -> a -> a
+enumFromTo :: Enum a => a -> a -> [a]
diff --git a/testsuite/tests/ghci/scripts/ghci013.stdout b/testsuite/tests/ghci/scripts/ghci013.stdout
index 5daf16ee23..6d99b877ba 100644
--- a/testsuite/tests/ghci/scripts/ghci013.stdout
+++ b/testsuite/tests/ghci/scripts/ghci013.stdout
@@ -1 +1 @@
-f :: Monad m => (m a, t) -> m b
+f :: Monad m => (m a, r) -> m b
diff --git a/testsuite/tests/ghci/scripts/ghci047.stderr b/testsuite/tests/ghci/scripts/ghci047.stderr
index dc8dfc9ecb..7e696c02c4 100644
--- a/testsuite/tests/ghci/scripts/ghci047.stderr
+++ b/testsuite/tests/ghci/scripts/ghci047.stderr
@@ -1,16 +1,14 @@
-<interactive>:38:1:
- Couldn't match type ‘HFalse’ with ‘HTrue’
- Expected type: HTrue
- Actual type: Or HFalse HFalse
- In the expression: f
- In the expression: f $ Baz 'a'
- In an equation for ‘it’: it = f $ Baz 'a'
+<interactive>:38:1: error:
+ • Couldn't match type ‘HFalse’ with ‘HTrue’
+ arising from a use of ‘f’
+ • In the expression: f
+ In the expression: f $ Baz 'a'
+ In an equation for ‘it’: it = f $ Baz 'a'
-<interactive>:39:1:
- Couldn't match type ‘HFalse’ with ‘HTrue’
- Expected type: HTrue
- Actual type: Or HFalse HFalse
- In the expression: f
- In the expression: f $ Quz
- In an equation for ‘it’: it = f $ Quz
+<interactive>:39:1: error:
+ • Couldn't match type ‘HFalse’ with ‘HTrue’
+ arising from a use of ‘f’
+ • In the expression: f
+ In the expression: f $ Quz
+ In an equation for ‘it’: it = f $ Quz
diff --git a/testsuite/tests/ghci/scripts/ghci051.stderr b/testsuite/tests/ghci/scripts/ghci051.stderr
index 7a33dd57b6..6d28081344 100644
--- a/testsuite/tests/ghci/scripts/ghci051.stderr
+++ b/testsuite/tests/ghci/scripts/ghci051.stderr
@@ -4,7 +4,7 @@
with ‘Ghci1.T’
NB: ‘Ghci1.T’ is defined at <interactive>:2:1-14
‘T’ is defined at <interactive>:5:1-16
- Expected type: T'
- Actual type: T
+ Expected type: T'
+ Actual type: T
In the expression: C :: T'
In an equation for ‘c’: c = C :: T'
diff --git a/testsuite/tests/ghci/scripts/ghci055.stdout b/testsuite/tests/ghci/scripts/ghci055.stdout
index d57430bb8c..578740d6de 100644
--- a/testsuite/tests/ghci/scripts/ghci055.stdout
+++ b/testsuite/tests/ghci/scripts/ghci055.stdout
@@ -1,6 +1,6 @@
*** Exception: Prelude.undefined
CallStack (from ImplicitParams):
- error, called at libraries/base/GHC/Err.hs:42:14 in base:GHC.Err
+ error, called at libraries/base/GHC/Err.hs:43:14 in base:GHC.Err
undefined, called at <interactive>:1:7 in interactive:Ghci1
-x :: t = _
+x :: r = _
y :: Integer = 3
diff --git a/testsuite/tests/ghci/scripts/ghci059.script b/testsuite/tests/ghci/scripts/ghci059.script
index 936277e336..1d344d7833 100644
--- a/testsuite/tests/ghci/scripts/ghci059.script
+++ b/testsuite/tests/ghci/scripts/ghci059.script
@@ -1,5 +1,5 @@
-- At one point, :info Coercible would not report it as a constraint, but as a
--- data type. So this test case ensures that this is broken later.
+-- data type. So this test case ensures that this is not broken later.
:m + Data.Coerce
:info Coercible
diff --git a/testsuite/tests/ghci/scripts/ghci059.stdout b/testsuite/tests/ghci/scripts/ghci059.stdout
index 6b2c8f886e..fac61163f4 100644
--- a/testsuite/tests/ghci/scripts/ghci059.stdout
+++ b/testsuite/tests/ghci/scripts/ghci059.stdout
@@ -1,4 +1,4 @@
type role Coercible representational representational
-class Coercible (a :: k) (b :: k)
+class a ~R# b => Coercible (a :: k) (b :: k)
-- Defined in ‘GHC.Types’
coerce :: Coercible a b => a -> b -- Defined in ‘GHC.Prim’
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr
index 2bb1a178e0..63c2b2f74b 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr
@@ -1,7 +1,7 @@
==================== Parser ====================
module ShouldCompile where
-test :: (Eq a) => [a] doc1 -> [a] doc2 -> [a] doc3
+test :: (Eq a) => [a] doc1 -> [a] doc2 -> [a] doc3
test xs ys = xs
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr
index 4a57879c5c..769da3f0d3 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr
@@ -1,7 +1,7 @@
==================== Parser ====================
module ShouldCompile where
-test :: (Eq a) => [a] doc1 -> forall b. [b] doc2 -> [a] doc3
+test :: (Eq a) => [a] doc1 -> forall b. [b] doc2 -> [a] doc3
test xs ys = xs
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr
index d1cb709c55..e7707c5ec0 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr
@@ -2,9 +2,9 @@
==================== Parser ====================
module ShouldCompile where
test ::
- [a] doc1
- -> forall b. (Ord b) =>
- [b] doc2 -> forall c. (Num c) => [c] doc3 -> [a]
+ [a] doc1
+ -> forall b.
+ (Ord b) => [b] doc2 -> forall c. (Num c) => [c] doc3 -> [a]
test xs ys zs = xs
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA028.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA028.stderr
index fa0d7019c0..bd9ec257e7 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA028.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA028.stderr
@@ -2,7 +2,7 @@
==================== Parser ====================
module ShouldCompile where
data (<-->) a b = Mk a b
-test :: [a] doc1 -> (a <--> (b -> [a])) blabla
+test :: [a] doc1 -> a <--> b -> [a] blabla
test xs ys = xs
diff --git a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
index 68412759e7..ce3f4f9048 100644
--- a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
+++ b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
@@ -15,7 +15,8 @@ PushedInAsGivens.hs:10:31: error:
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’
+ • Couldn't match type ‘F Int’ with ‘[a]’
+ arising from a use of ‘foo’
• In the expression: foo y
In the expression: (y, foo y)
In the expression:
diff --git a/testsuite/tests/indexed-types/should_compile/Simple12.hs b/testsuite/tests/indexed-types/should_compile/Simple12.hs
index c425d78db5..5a74776c27 100644
--- a/testsuite/tests/indexed-types/should_compile/Simple12.hs
+++ b/testsuite/tests/indexed-types/should_compile/Simple12.hs
@@ -14,4 +14,3 @@ mkf p = undefined
-- foo :: a ~ F a => a -> a
-- foo :: a ~ F a => a -> F a
foo p = same p (mkf p)
-
diff --git a/testsuite/tests/indexed-types/should_compile/T3017.stderr b/testsuite/tests/indexed-types/should_compile/T3017.stderr
index d47accbe20..53d7942958 100644
--- a/testsuite/tests/indexed-types/should_compile/T3017.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3017.stderr
@@ -4,12 +4,13 @@ TYPE SIGNATURES
forall c t t1. (Num t, Num t1, Coll c, Elem c ~ (t, t1)) => c -> c
TYPE CONSTRUCTORS
class Coll c where
- type family Elem c :: * open
+ type family Elem c open
+ Kind: * -> *
empty :: c
insert :: Elem c -> c -> c
{-# MINIMAL empty, insert #-}
data ListColl a = L [a]
- Promotable
+ Kind: * -> *
COERCION AXIOMS
axiom Foo.TFCo:R:ElemListColl ::
Elem (ListColl a) = a -- Defined at T3017.hs:13:9
diff --git a/testsuite/tests/indexed-types/should_compile/T3208b.stderr b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
index b40942a5a9..0a0a491f17 100644
--- a/testsuite/tests/indexed-types/should_compile/T3208b.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
@@ -1,6 +1,6 @@
T3208b.hs:15:10: error:
- • Could not deduce: OTerm o0 ~ STerm o0
+ • Could not deduce: OTerm o0 ~ STerm o0 arising from a use of ‘fce’
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
@@ -11,6 +11,7 @@ T3208b.hs:15:10: error:
T3208b.hs:15:15: error:
• Could not deduce: OTerm o0 ~ STerm a
+ arising from a use of ‘apply’
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
diff --git a/testsuite/tests/indexed-types/should_compile/T9316.hs b/testsuite/tests/indexed-types/should_compile/T9316.hs
index ca7680c063..31da8f4791 100644
--- a/testsuite/tests/indexed-types/should_compile/T9316.hs
+++ b/testsuite/tests/indexed-types/should_compile/T9316.hs
@@ -85,4 +85,3 @@ forAllSubscriptionChannels f =
withSomeSing BookingsChannel $ \(sChannel) ->
case witnessC sChannel of
Dict -> f sChannel
-
diff --git a/testsuite/tests/indexed-types/should_compile/T9747.hs b/testsuite/tests/indexed-types/should_compile/T9747.hs
index 0466cbae67..3b1c47703e 100644
--- a/testsuite/tests/indexed-types/should_compile/T9747.hs
+++ b/testsuite/tests/indexed-types/should_compile/T9747.hs
@@ -4,7 +4,7 @@
module T9747 where
import Data.List (intercalate)
import Data.Proxy
-import GHC.Prim (Constraint)
+import GHC.Exts (Constraint)
data HList :: [*] -> * where
Nil :: HList '[]
diff --git a/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr b/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr
index 3b9539e19e..04eedb1eaf 100644
--- a/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr
+++ b/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr
@@ -2,27 +2,39 @@
ClosedFam3.hs-boot:5:1:
Type constructor ‘Foo’ has conflicting definitions in the module
and its hs-boot file
- Main module: type family Foo a :: * where
+ Main module: type family Foo a
+ Kind: * -> *
+ where
Foo Int = Bool
Foo Double = Char
- Boot file: type family Foo a :: * where
+ Boot file: type family Foo a
+ Kind: * -> *
+ where
Foo Int = Bool
ClosedFam3.hs-boot:8:1:
Type constructor ‘Bar’ has conflicting definitions in the module
and its hs-boot file
- Main module: type family Bar a :: * where
+ Main module: type family Bar a
+ Kind: * -> *
+ where
Bar Int = Bool
Bar Double = Double
- Boot file: type family Bar a :: * where
+ Boot file: type family Bar a
+ Kind: * -> *
+ where
Bar Int = Bool
Bar Double = Char
ClosedFam3.hs-boot:12:1:
Type constructor ‘Baz’ has conflicting definitions in the module
and its hs-boot file
- Main module: type family Baz a :: * where
+ Main module: type family Baz a
+ Kind: * -> *
+ where
Baz Int = Bool
- Boot file: type family Baz (a :: k) :: * where
+ Boot file: type family Baz (a :: k)
+ Kind: forall k1. k1 -> *
+ where
Baz * Int = Bool
The types have different kinds
diff --git a/testsuite/tests/indexed-types/should_fail/Overlap4.stderr b/testsuite/tests/indexed-types/should_fail/Overlap4.stderr
index d1622335d8..d64036c4bc 100644
--- a/testsuite/tests/indexed-types/should_fail/Overlap4.stderr
+++ b/testsuite/tests/indexed-types/should_fail/Overlap4.stderr
@@ -1,4 +1,5 @@
Overlap4.hs:7:3:
Number of parameters must match family declaration; expected 2
+ In the equations for closed type family ‘F’
In the type family declaration for ‘F’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail12.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail12.stderr
index 11664e67bd..a402623bae 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail12.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail12.stderr
@@ -1,4 +1,4 @@
SimpleFail12.hs:8:15:
- Illegal polymorphic or qualified type: forall a. [a]
+ Illegal polymorphic or qualified type: forall a1. [a1]
In the type instance declaration for ‘C’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail14.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail14.stderr
index 59b5c138ad..7079d8cc84 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail14.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail14.stderr
@@ -1,6 +1,6 @@
SimpleFail14.hs:5:15: error:
- Constraint ‘a ~ a’ used as a type
- In the type ‘a ~ a’
- In the definition of data constructor ‘T’
- In the data declaration for ‘T’
+ • Expected a type, but ‘a ~ a’ has kind ‘Constraint’
+ • In the type ‘a ~ a’
+ In the definition of data constructor ‘T’
+ In the data declaration for ‘T’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail1a.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail1a.stderr
index f57af3908b..8637eaa892 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail1a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail1a.stderr
@@ -1,4 +1,5 @@
-SimpleFail1a.hs:4:1:
- Number of parameters must match family declaration; expected 2
- In the data instance declaration for ‘T1’
+SimpleFail1a.hs:4:1: error:
+ • Expecting one more argument to ‘T1 Int’
+ Expected a type, but ‘T1 Int’ has kind ‘* -> *’
+ • In the data instance declaration for ‘T1’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail1b.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail1b.stderr
index 3ecd31a003..e872f115a2 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail1b.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail1b.stderr
@@ -1,4 +1,6 @@
SimpleFail1b.hs:4:1:
- Number of parameters must match family declaration; expected 2
+ Too many parameters to T1:
+ Char is unexpected;
+ expected only two parameters
In the data instance declaration for ‘T1’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr
index 6b12656863..6c04646b81 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr
@@ -1,5 +1,5 @@
-SimpleFail6.hs:7:11:
+SimpleFail6.hs:6:10: error:
Conflicting definitions for ‘a’
- Bound at: SimpleFail6.hs:7:11
+ Bound at: SimpleFail6.hs:6:10
SimpleFail6.hs:7:13
diff --git a/testsuite/tests/indexed-types/should_fail/T10141.stderr b/testsuite/tests/indexed-types/should_fail/T10141.stderr
index 2cb2652388..79c964c71d 100644
--- a/testsuite/tests/indexed-types/should_fail/T10141.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T10141.stderr
@@ -1,6 +1,5 @@
T10141.hs:6:6: error:
- The first argument of ‘G’ should have kind ‘k’,
- but ‘Int’ has kind ‘*’
- In the type ‘Int’
+ Expected kind ‘k’, but ‘Int’ has kind ‘*’
+ In the first argument of ‘G’, namely ‘Int’
In the type family declaration for ‘G’
diff --git a/testsuite/tests/indexed-types/should_fail/T10899.stderr b/testsuite/tests/indexed-types/should_fail/T10899.stderr
index e48274c466..ed21c65b11 100644
--- a/testsuite/tests/indexed-types/should_fail/T10899.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T10899.stderr
@@ -1,4 +1,4 @@
T10899.hs:7:3: error:
- Illegal polymorphic or qualified type: forall (m :: * -> *). m a
+ Illegal polymorphic or qualified type: forall (m1 :: * -> *). m1 a
In the class declaration for ‘C’
diff --git a/testsuite/tests/indexed-types/should_fail/T2627b.stderr b/testsuite/tests/indexed-types/should_fail/T2627b.stderr
index 0b18041825..11e1b8e8fd 100644
--- a/testsuite/tests/indexed-types/should_fail/T2627b.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2627b.stderr
@@ -1,8 +1,9 @@
T2627b.hs:20:24: error:
- Occurs check: cannot construct the infinite type:
- t0 ~ Dual (Dual t0)
- The type variable ‘t0’ is ambiguous
- In the expression: conn undefined undefined
- In an equation for ‘conn’:
- conn (Rd k) (Wr a r) = conn undefined undefined
+ • Occurs check: cannot construct the infinite type:
+ t0 ~ Dual (Dual t0)
+ arising from a use of ‘conn’
+ The type variable ‘t0’ is ambiguous
+ • In the expression: conn undefined undefined
+ In an equation for ‘conn’:
+ conn (Rd k) (Wr a r) = conn undefined undefined
diff --git a/testsuite/tests/indexed-types/should_fail/T2664.stderr b/testsuite/tests/indexed-types/should_fail/T2664.stderr
index d2dd0dff60..3a84f18272 100644
--- a/testsuite/tests/indexed-types/should_fail/T2664.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2664.stderr
@@ -1,21 +1,19 @@
-T2664.hs:31:52:
- Could not deduce: b ~ a
- from the context: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b))
- bound by the type signature for:
- newPChan :: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) =>
- IO (PChan (a :*: b), PChan c)
- at T2664.hs:23:5-12
+T2664.hs:31:52: error:
+ • Could not deduce: b ~ a arising from a use of ‘newPChan’
+ from the context: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b))
+ bound by the type signature for:
+ newPChan :: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) =>
+ IO (PChan (a :*: b), PChan c)
+ at T2664.hs:23:5-12
‘b’ is a rigid type variable bound by
- the instance declaration at T2664.hs:22:10
+ the instance declaration at T2664.hs:22:10
‘a’ is a rigid type variable bound by
- the instance declaration at T2664.hs:22:10
- Expected type: Dual (Dual a)
- Actual type: b
- In the third argument of ‘pchoose’, namely ‘newPChan’
- In the first argument of ‘E’, namely ‘(pchoose Right v newPChan)’
- In the expression:
- E (pchoose Right v newPChan) (pchoose Left v newPChan)
- Relevant bindings include
- v :: MVar (Either (PChan a) (PChan b)) (bound at T2664.hs:24:9)
- newPChan :: IO (PChan (a :*: b), PChan c) (bound at T2664.hs:23:5)
+ the instance declaration at T2664.hs:22:10
+ • In the third argument of ‘pchoose’, namely ‘newPChan’
+ In the first argument of ‘E’, namely ‘(pchoose Right v newPChan)’
+ In the expression:
+ E (pchoose Right v newPChan) (pchoose Left v newPChan)
+ • Relevant bindings include
+ v :: MVar (Either (PChan a) (PChan b)) (bound at T2664.hs:24:9)
+ newPChan :: IO (PChan (a :*: b), PChan c) (bound at T2664.hs:23:5)
diff --git a/testsuite/tests/indexed-types/should_fail/T3330a.stderr b/testsuite/tests/indexed-types/should_fail/T3330a.stderr
index acefda7253..ea3b1d4001 100644
--- a/testsuite/tests/indexed-types/should_fail/T3330a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3330a.stderr
@@ -1,14 +1,15 @@
T3330a.hs:19:34: error:
- • Couldn't match type ‘s’ with ‘(->) (s0 ix0 -> ix1)’
- ‘s’ is a rigid type variable bound by
+ • 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 :: 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
+ 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
@@ -17,16 +18,15 @@ T3330a.hs:19:34: error:
children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1)
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
+ • Couldn't match type ‘s’ with ‘(->) (s0 ix0 -> ix1)’
+ ‘s’ is a rigid type variable bound by
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
+ 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
@@ -43,7 +43,7 @@ T3330a.hs:19:44: error:
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
+ 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
diff --git a/testsuite/tests/indexed-types/should_fail/T3330c.stderr b/testsuite/tests/indexed-types/should_fail/T3330c.stderr
index d0a8320384..4d9e6d5be6 100644
--- a/testsuite/tests/indexed-types/should_fail/T3330c.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3330c.stderr
@@ -1,14 +1,15 @@
T3330c.hs:23:43: error:
- Couldn't match kind ‘*’ with ‘* -> *’
- When matching types
- Der ((->) x) :: * -> *
- R :: (* -> *) -> *
- Expected type: Der ((->) x) (Der f1 x)
+ • Couldn't match kind ‘* -> *’ with ‘*’
+ When matching types
+ f1 :: * -> *
+ Der f1 x :: *
+ Expected type: Der ((->) x) (Der f1 x)
Actual type: R f1
- In the first argument of ‘plug’, namely ‘rf’
- In the first argument of ‘Inl’, namely ‘(plug rf df x)’
- Relevant bindings include
- x :: x (bound at T3330c.hs:23:29)
- df :: Der f1 x (bound at T3330c.hs:23:25)
- plug' :: R f -> Der f x -> x -> f x (bound at T3330c.hs:23:1)
+ • In the first argument of ‘plug’, namely ‘rf’
+ In the first argument of ‘Inl’, namely ‘(plug rf df x)’
+ • Relevant bindings include
+ x :: x (bound at T3330c.hs:23:29)
+ df :: Der f1 x (bound at T3330c.hs:23:25)
+ rf :: R f1 (bound at T3330c.hs:23:13)
+ plug' :: R f -> Der f x -> x -> f x (bound at T3330c.hs:23:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T4179.stderr b/testsuite/tests/indexed-types/should_fail/T4179.stderr
index f7f142a4bd..4173eff8da 100644
--- a/testsuite/tests/indexed-types/should_fail/T4179.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4179.stderr
@@ -1,15 +1,15 @@
-T4179.hs:26:16:
- Couldn't match type ‘A2 (x (A2 (FCon x) -> A3 (FCon x)))’
- with ‘A2 (FCon x)’
- NB: ‘A2’ is a type function, and may not be injective
- Expected type: x (A2 (FCon x) -> A3 (FCon x))
- -> A2 (FCon x) -> A3 (FCon x)
+T4179.hs:26:16: error:
+ • Couldn't match type ‘A3 (x (A2 (FCon x) -> A3 (FCon x)))’
+ with ‘A3 (FCon x)’
+ NB: ‘A3’ is a type function, and may not be injective
+ Expected type: x (A2 (FCon x) -> A3 (FCon x))
+ -> A2 (FCon x) -> A3 (FCon x)
Actual type: x (A2 (FCon x) -> A3 (FCon x))
-> A2 (x (A2 (FCon x) -> A3 (FCon x)))
-> A3 (x (A2 (FCon x) -> A3 (FCon x)))
- In the first argument of ‘foldDoC’, namely ‘op’
- In the expression: foldDoC op
- Relevant bindings include
- fCon :: Con x -> A2 (FCon x) -> A3 (FCon x)
- (bound at T4179.hs:26:1)
+ • In the first argument of ‘foldDoC’, namely ‘op’
+ In the expression: foldDoC op
+ • Relevant bindings include
+ fCon :: Con x -> A2 (FCon x) -> A3 (FCon x)
+ (bound at T4179.hs:26:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T5439.stderr b/testsuite/tests/indexed-types/should_fail/T5439.stderr
index c5b9c9cfc9..193b1536ec 100644
--- a/testsuite/tests/indexed-types/should_fail/T5439.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T5439.stderr
@@ -1,25 +1,25 @@
-T5439.hs:82:28:
- Couldn't match type ‘Attempt (HElemOf rs)’
- with ‘Attempt (HHead (HDrop n0 l0)) -> Attempt (HElemOf l0)’
- Expected type: f (Attempt (HNth n0 l0) -> Attempt (HElemOf l0))
- Actual type: f (Attempt (WaitOpResult (WaitOps rs)))
- In the first argument of ‘complete’, namely ‘ev’
- In the expression: complete ev
- Relevant bindings include
- register :: Bool -> Peano n -> WaitOps (HDrop n rs) -> IO Bool
- (bound at T5439.hs:64:9)
- ev :: f (Attempt (WaitOpResult (WaitOps rs)))
- (bound at T5439.hs:61:22)
- ops :: WaitOps rs (bound at T5439.hs:61:18)
- registerWaitOp :: WaitOps rs
- -> f (Attempt (WaitOpResult (WaitOps rs))) -> IO Bool
- (bound at T5439.hs:61:3)
+T5439.hs:82:28: error:
+ • Couldn't match type ‘Attempt (WaitOpResult (WaitOps rs))’
+ with ‘Attempt (HNth n0 l0) -> Attempt (HElemOf l0)’
+ Expected type: f (Attempt (HNth n0 l0) -> Attempt (HElemOf l0))
+ Actual type: f (Attempt (WaitOpResult (WaitOps rs)))
+ • In the first argument of ‘complete’, namely ‘ev’
+ In the expression: complete ev
+ • Relevant bindings include
+ register :: Bool -> Peano n -> WaitOps (HDrop n rs) -> IO Bool
+ (bound at T5439.hs:64:9)
+ ev :: f (Attempt (WaitOpResult (WaitOps rs)))
+ (bound at T5439.hs:61:22)
+ ops :: WaitOps rs (bound at T5439.hs:61:18)
+ registerWaitOp :: WaitOps rs
+ -> f (Attempt (WaitOpResult (WaitOps rs))) -> IO Bool
+ (bound at T5439.hs:61:3)
-T5439.hs:82:39:
- Couldn't match expected type ‘Peano n0’
- with actual type ‘Attempt α0’
- In the second argument of ‘($)’, namely
- ‘Failure (e :: SomeException)’
- In the second argument of ‘($)’, namely
- ‘inj $ Failure (e :: SomeException)’
+T5439.hs:82:39: error:
+ • Couldn't match expected type ‘Peano n0’
+ with actual type ‘Attempt α0’
+ • In the second argument of ‘($)’, namely
+ ‘Failure (e :: SomeException)’
+ In the second argument of ‘($)’, namely
+ ‘inj $ Failure (e :: SomeException)’
diff --git a/testsuite/tests/indexed-types/should_fail/T6123.stderr b/testsuite/tests/indexed-types/should_fail/T6123.stderr
index d97968b3aa..3c77040f95 100644
--- a/testsuite/tests/indexed-types/should_fail/T6123.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T6123.stderr
@@ -1,7 +1,9 @@
T6123.hs:10:14: error:
- Occurs check: cannot construct the infinite type: t0 ~ Id t0
- The type variable ‘t0’ is ambiguous
- In the expression: cid undefined
- In an equation for ‘cundefined’: cundefined = cid undefined
- Relevant bindings include cundefined :: t0 (bound at T6123.hs:10:1)
+ • Occurs check: cannot construct the infinite type: t0 ~ Id t0
+ arising from a use of ‘cid’
+ The type variable ‘t0’ is ambiguous
+ • In the expression: cid undefined
+ In an equation for ‘cundefined’: cundefined = cid undefined
+ • Relevant bindings include
+ cundefined :: t0 (bound at T6123.hs:10:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T7786.stderr b/testsuite/tests/indexed-types/should_fail/T7786.stderr
index 62627d6377..a58b69e7e7 100644
--- a/testsuite/tests/indexed-types/should_fail/T7786.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7786.stderr
@@ -1,36 +1,36 @@
-
-T7786.hs:86:22: error:
- Couldn't match type ‘xxx’ with ‘'Empty’
- Inaccessible code in
- a pattern with constructor: Nil :: forall (k :: BOX). Sing 'Empty,
- in a pattern binding in
- 'do' block
- In the pattern: Nil
- In the pattern: Nil :: Sing xxx
- In a stmt of a 'do' block:
- Nil :: Sing xxx <- return
- (buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db)
-
-T7786.hs:86:49: error:
- Couldn't match type ‘xxx’
- with ‘Intersect (BuriedUnder sub k 'Empty) inv’
- Expected type: Sing xxx
- Actual type: Sing (Intersect (BuriedUnder sub k 'Empty) inv)
- In the first argument of ‘return’, namely
- ‘(buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db)’
- In a stmt of a 'do' block:
- Nil :: Sing xxx <- return
- (buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db)
- In the expression:
- do { Nil :: Sing xxx <- return
- (buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db);
- return $ Sub db k sub }
- Relevant bindings include
- sub :: Database sub (bound at T7786.hs:86:13)
- k :: Sing k (bound at T7786.hs:86:11)
- db :: Database inv (bound at T7786.hs:86:8)
- addSub :: Database inv
- -> Sing k
- -> Database sub
- -> Maybe (Database (BuriedUnder sub k inv))
- (bound at T7786.hs:86:1)
+
+T7786.hs:86:22: error:
+ • Couldn't match type ‘xxx’ with ‘'Empty’
+ Inaccessible code in
+ a pattern with constructor: Nil :: forall a. Sing 'Empty,
+ in a pattern binding in
+ 'do' block
+ • In the pattern: Nil
+ In the pattern: Nil :: Sing xxx
+ In a stmt of a 'do' block:
+ Nil :: Sing xxx <- return
+ (buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db)
+
+T7786.hs:86:49: error:
+ • Couldn't match type ‘xxx’
+ with ‘Intersect (BuriedUnder sub k 'Empty) inv’
+ Expected type: Sing xxx
+ Actual type: Sing (Intersect (BuriedUnder sub k 'Empty) inv)
+ • In the first argument of ‘return’, namely
+ ‘(buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db)’
+ In a stmt of a 'do' block:
+ Nil :: Sing xxx <- return
+ (buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db)
+ In the expression:
+ do { Nil :: Sing xxx <- return
+ (buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db);
+ return $ Sub db k sub }
+ • Relevant bindings include
+ sub :: Database sub (bound at T7786.hs:86:13)
+ k :: Sing k (bound at T7786.hs:86:11)
+ db :: Database inv (bound at T7786.hs:86:8)
+ addSub :: Database inv
+ -> Sing k
+ -> Database sub
+ -> Maybe (Database (BuriedUnder sub k inv))
+ (bound at T7786.hs:86:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T7788.stderr b/testsuite/tests/indexed-types/should_fail/T7788.stderr
index 31e23cd3fd..757c05089e 100644
--- a/testsuite/tests/indexed-types/should_fail/T7788.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7788.stderr
@@ -1,10 +1,10 @@
-T7788.hs:9:7:
+T7788.hs:19:20: error:
Reduction stack overflow; size = 201
When simplifying the following type: F (Id (Fix Id))
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 expression: undefined
- In an equation for ‘foo’: foo = undefined
+ In the first argument of ‘foo’, namely ‘Proxy’
+ In the second argument of ‘($)’, namely ‘foo Proxy’
diff --git a/testsuite/tests/indexed-types/should_fail/T9160.stderr b/testsuite/tests/indexed-types/should_fail/T9160.stderr
index 5850257ec4..a5c2f79257 100644
--- a/testsuite/tests/indexed-types/should_fail/T9160.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9160.stderr
@@ -1,7 +1,7 @@
T9160.hs:18:12: error:
Expecting one more argument to ‘Maybe’
- Expected kind ‘*’, but ‘Maybe’ has kind ‘* -> *’
+ Expected a type, but ‘Maybe’ has kind ‘* -> *’
In the type ‘Maybe’
In the type instance declaration for ‘F’
In the instance declaration for ‘C (a :: *)’
diff --git a/testsuite/tests/indexed-types/should_fail/T9171.stderr b/testsuite/tests/indexed-types/should_fail/T9171.stderr
index 9a618c50bf..5ffb87b0ea 100644
--- a/testsuite/tests/indexed-types/should_fail/T9171.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9171.stderr
@@ -1,11 +1,10 @@
-
-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)
+
+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 type variable ‘k20’ is ambiguous
+ • 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/T9357.stderr b/testsuite/tests/indexed-types/should_fail/T9357.stderr
index 4d97c31fd6..cc483c54db 100644
--- a/testsuite/tests/indexed-types/should_fail/T9357.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9357.stderr
@@ -4,5 +4,5 @@ T9357.hs:7:15:
In the type instance declaration for ‘F’
T9357.hs:8:15:
- Illegal polymorphic or qualified type: forall a. a -> a
+ Illegal polymorphic or qualified type: forall a1. a1 -> a1
In the type instance declaration for ‘F’
diff --git a/testsuite/tests/indexed-types/should_run/T5719.hs b/testsuite/tests/indexed-types/should_run/T5719.hs
index 91ec01afbf..c4243f7918 100644
--- a/testsuite/tests/indexed-types/should_run/T5719.hs
+++ b/testsuite/tests/indexed-types/should_run/T5719.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE ConstraintKinds, TypeFamilies, FlexibleInstances #-}
module Main where
-import GHC.Prim (Constraint)
+import GHC.Exts (Constraint)
import Prelude hiding (Functor, fmap)
diff --git a/testsuite/tests/mdo/should_compile/mdo006.hs b/testsuite/tests/mdo/should_compile/mdo006.hs
index 6ccfb94041..3d4a4dd09b 100644
--- a/testsuite/tests/mdo/should_compile/mdo006.hs
+++ b/testsuite/tests/mdo/should_compile/mdo006.hs
@@ -1,6 +1,6 @@
{-# OPTIONS -XRecursiveDo #-}
--- This test, from Iavor Diatchki, made GHC 6.2 loop (testLoop)
+-- This test, from Iavor Diatchki, made GHC 6.2 loop (testLoop)
-- or panic (testPanic); there was a Lint error.
-- The reason was a missing bindInstsOfLocalFuns in tcStmtAndThen
diff --git a/testsuite/tests/module/mod71.stderr b/testsuite/tests/module/mod71.stderr
index a85f7cf182..9c72697300 100644
--- a/testsuite/tests/module/mod71.stderr
+++ b/testsuite/tests/module/mod71.stderr
@@ -1,12 +1,12 @@
-
-mod71.hs:4:9: error:
- Found hole: _ :: t1
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of f :: Num a => (t1 -> a -> t) -> t
- at mod71.hs:4:1
- In the first argument of ‘x’, namely ‘_’
- In the expression: x _ 1
- In an equation for ‘f’: f x = x _ 1
- Relevant bindings include
- x :: t1 -> a -> t (bound at mod71.hs:4:3)
- f :: (t1 -> a -> t) -> t (bound at mod71.hs:4:1)
+
+mod71.hs:4:9: error:
+ • Found hole: _ :: t
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of f :: Num a => (t -> a -> r) -> r
+ at mod71.hs:4:1
+ • In the first argument of ‘x’, namely ‘_’
+ In the expression: x _ 1
+ In an equation for ‘f’: f x = x _ 1
+ • Relevant bindings include
+ x :: t -> a -> r (bound at mod71.hs:4:3)
+ f :: (t -> a -> r) -> r (bound at mod71.hs:4:1)
diff --git a/testsuite/tests/module/mod72.stderr b/testsuite/tests/module/mod72.stderr
index 8af25f6012..69246edb76 100644
--- a/testsuite/tests/module/mod72.stderr
+++ b/testsuite/tests/module/mod72.stderr
@@ -1,2 +1,2 @@
-
-mod72.hs:3:7: error: Variable not in scope: g :: t1 -> t
+
+mod72.hs:3:7: error: Variable not in scope: g :: t -> t1
diff --git a/testsuite/tests/parser/should_compile/read014.stderr b/testsuite/tests/parser/should_compile/read014.stderr
index f3d8d604fb..5302b3476e 100644
--- a/testsuite/tests/parser/should_compile/read014.stderr
+++ b/testsuite/tests/parser/should_compile/read014.stderr
@@ -1,7 +1,7 @@
read014.hs:4:1: Warning:
Top-level binding with no type signature:
- ng1 :: forall t a. Num a => t -> a -> a
+ ng1 :: forall r a. Num a => r -> a -> a
read014.hs:4:5: Warning: Defined but not used: ‘x’
diff --git a/testsuite/tests/parser/should_fail/T3811d.stderr b/testsuite/tests/parser/should_fail/T3811d.stderr
index fb23eceb2c..4ba2d16e01 100644
--- a/testsuite/tests/parser/should_fail/T3811d.stderr
+++ b/testsuite/tests/parser/should_fail/T3811d.stderr
@@ -1,5 +1,5 @@
-T3811d.hs:6:11:
+T3811d.hs:6:12: error:
Unexpected type ‘D Char’
In the class declaration for ‘C’
A class declaration should have form
diff --git a/testsuite/tests/parser/should_fail/T7848.stderr b/testsuite/tests/parser/should_fail/T7848.stderr
index 402dc642b0..b957433e9b 100644
--- a/testsuite/tests/parser/should_fail/T7848.stderr
+++ b/testsuite/tests/parser/should_fail/T7848.stderr
@@ -1,7 +1,7 @@
T7848.hs:6:57: error:
• Occurs check: cannot construct the infinite type:
- t2 ~ t0 -> t -> t1 -> A -> A -> A -> A -> t2
+ t2 ~ r0 -> 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)
@@ -13,7 +13,7 @@ T7848.hs:6:57: error:
{-# SPECIALIZE (&) :: a #-}
(&) = x
• Relevant bindings include
- y :: forall t4. t4 -> t -> t1 -> A -> A -> A -> A -> t2
+ y :: forall r. r -> 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)
diff --git a/testsuite/tests/parser/should_fail/readFail003.stderr b/testsuite/tests/parser/should_fail/readFail003.stderr
index acb265b9b4..8b9b4d0295 100644
--- a/testsuite/tests/parser/should_fail/readFail003.stderr
+++ b/testsuite/tests/parser/should_fail/readFail003.stderr
@@ -1,16 +1,16 @@
-readFail003.hs:4:27:
- Occurs check: cannot construct the infinite type:
- t ~ (t, [a], [a1])
- In the expression: a
- In a pattern binding:
- ~(a, b, c)
- | nullity b = a
- | nullity c = a
- | otherwise = a
- where
- nullity = null
- Relevant bindings include
- a :: t (bound at readFail003.hs:4:3)
- b :: [a] (bound at readFail003.hs:4:5)
- c :: [a1] (bound at readFail003.hs:4:7)
+readFail003.hs:4:27: error:
+ • Occurs check: cannot construct the infinite type:
+ r ~ (r, [a], [a1])
+ • In the expression: a
+ In a pattern binding:
+ ~(a, b, c)
+ | nullity b = a
+ | nullity c = a
+ | otherwise = a
+ where
+ nullity = null
+ • Relevant bindings include
+ a :: r (bound at readFail003.hs:4:3)
+ b :: [a] (bound at readFail003.hs:4:5)
+ c :: [a1] (bound at readFail003.hs:4:7)
diff --git a/testsuite/tests/partial-sigs/should_compile/ADT.stderr b/testsuite/tests/partial-sigs/should_compile/ADT.stderr
index 2a9de4b2cc..0fe16d1ed5 100644
--- a/testsuite/tests/partial-sigs/should_compile/ADT.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/ADT.stderr
@@ -2,7 +2,7 @@ TYPE SIGNATURES
bar :: Int -> Foo Bool () Int
TYPE CONSTRUCTORS
data Foo x y z = Foo x y z
- Promotable
+ Kind: * -> * -> * -> *
COERCION AXIOMS
Dependent modules: []
Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
diff --git a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
index ec41b123f1..9698ab2c10 100644
--- a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
@@ -2,7 +2,7 @@ TYPE SIGNATURES
foo :: Sing 'A
TYPE CONSTRUCTORS
data MyKind = A | B
- Promotable
+ Kind: *
data family Sing (a :: k)
COERCION AXIOMS
axiom DataFamilyInstanceLHS.TFCo:R:SingMyKind_ ::
diff --git a/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr b/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
index ef1b755341..cf6a223c45 100644
--- a/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
@@ -6,7 +6,7 @@ TYPE SIGNATURES
TYPE CONSTRUCTORS
type role NukeMonad phantom phantom phantom
data NukeMonad a b c
- Promotable
+ Kind: * -> * -> * -> *
COERCION AXIOMS
INSTANCES
instance Functor (NukeMonad a b) -- Defined at Meltdown.hs:8:10
diff --git a/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr b/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
index 25fa959707..e67eeb095e 100644
--- a/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
@@ -5,7 +5,7 @@ TYPE SIGNATURES
forall tok st a. GenParser tok st a -> GenParser tok st ()
TYPE CONSTRUCTORS
data GenParser tok st a = GenParser tok st a
- Promotable
+ Kind: * -> * -> * -> *
COERCION AXIOMS
Dependent modules: []
Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
diff --git a/testsuite/tests/partial-sigs/should_compile/T10403.stderr b/testsuite/tests/partial-sigs/should_compile/T10403.stderr
index 1a71a3c803..5337cc3d12 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10403.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10403.stderr
@@ -6,13 +6,13 @@ T10403.hs:15:7: warning:
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
+ Where: ‘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
- ‘a’ is a rigid type variable bound by
+ ‘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
- ‘f’ 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
• In the type signature:
@@ -22,13 +22,13 @@ T10403.hs:15:12: warning:
T10403.hs:19:7: warning:
• Found type wildcard ‘_’ standing for ‘(a -> b) -> f0 a -> H f0’
- Where: ‘b’ is a rigid type variable bound by
+ Where: ‘f0’ is an ambiguous type variable
+ ‘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
@@ -59,7 +59,7 @@ T10403.hs:28:8: warning:
app2 :: H (B t)
at T10403.hs:27:1-15
Expected type: H (B t)
- Actual type: H f0
+ Actual type: H f0
• In the expression: h2 (H . I) (B ())
In an equation for ‘app2’: app2 = h2 (H . I) (B ())
• Relevant bindings include
@@ -73,7 +73,7 @@ T10403.hs:28:20: warning:
app2 :: H (B t)
at T10403.hs:27:1-15
Expected type: f0 ()
- Actual type: B t ()
+ Actual type: B t ()
• In the second argument of ‘h2’, namely ‘(B ())’
In the expression: h2 (H . I) (B ())
• Relevant bindings include
diff --git a/testsuite/tests/partial-sigs/should_compile/T10438.stderr b/testsuite/tests/partial-sigs/should_compile/T10438.stderr
index f070b3b8a0..5624d8dc9e 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10438.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10438.stderr
@@ -1,8 +1,8 @@
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
+ • Found type wildcard ‘_’ standing for ‘r2’
+ Where: ‘r2’ is a rigid type variable bound by
+ the inferred type of g :: r2 -> r2 at T10438.hs:6:9
• In the type signature:
x :: _
In an equation for ‘g’:
@@ -21,8 +21,8 @@ T10438.hs:7:22: warning:
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)
+ x :: r2 (bound at T10438.hs:8:17)
+ r :: r2 (bound at T10438.hs:6:11)
+ g :: r2 -> r2 (bound at T10438.hs:6:9)
+ f :: r (bound at T10438.hs:5:5)
+ foo :: r -> r1 -> r1 (bound at T10438.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/T11192.stderr b/testsuite/tests/partial-sigs/should_compile/T11192.stderr
index 2fac5eb8b6..77b70e3fe2 100644
--- a/testsuite/tests/partial-sigs/should_compile/T11192.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T11192.stderr
@@ -22,9 +22,9 @@ T11192.hs:7:14: warning:
T11192.hs:13:14: warning:
• Found type wildcard ‘_’ standing for ‘t -> t1 -> t1’
- Where: ‘t’ is a rigid type variable bound by
+ Where: ‘t1’ is a rigid type variable bound by
the inferred type of go :: t -> t1 -> t1 at T11192.hs:14:8
- ‘t1’ is a rigid type variable bound by
+ ‘t’ is a rigid type variable bound by
the inferred type of go :: t -> t1 -> t1 at T11192.hs:14:8
• In the type signature:
go :: _
diff --git a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
index ebd327c98f..2d5f52e357 100644
--- a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
@@ -1,7 +1,8 @@
TYPE SIGNATURES
foo :: F Int Char -> Int
TYPE CONSTRUCTORS
- type family F a b :: * open
+ type family F a b open
+ Kind: * -> * -> *
COERCION AXIOMS
axiom TypeFamilyInstanceLHS.TFCo:R:FBool_ ::
F Bool _ = Bool -- Defined at TypeFamilyInstanceLHS.hs:6:15
diff --git a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
index def47612d3..8b9eb466ad 100644
--- a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
@@ -1,5 +1,5 @@
TYPE SIGNATURES
- bar :: forall t t1. t -> (t -> t1) -> t1
+ bar :: forall t t1. t1 -> (t1 -> t) -> t
foo :: forall a. (Show a, Enum a) => a -> String
TYPE CONSTRUCTORS
COERCION AXIOMS
@@ -30,37 +30,37 @@ WarningWildcardInstantiations.hs:5:30: warning:
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
+ • Found type wildcard ‘_’ standing for ‘t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t1 -> (t1 -> t) -> t
at WarningWildcardInstantiations.hs:9:1
• In the type signature:
bar :: _ -> _ -> _
• Relevant bindings include
- bar :: t -> (t -> t1) -> t1
+ bar :: t1 -> (t1 -> t) -> t
(bound at WarningWildcardInstantiations.hs:9:1)
WarningWildcardInstantiations.hs:8:13: warning:
- • Found type wildcard ‘_’ standing for ‘t -> t1’
+ • Found type wildcard ‘_’ standing for ‘t1 -> t’
Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
+ the inferred type of bar :: t1 -> (t1 -> t) -> t
at WarningWildcardInstantiations.hs:9:1
‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
+ the inferred type of bar :: t1 -> (t1 -> t) -> t
at WarningWildcardInstantiations.hs:9:1
• In the type signature:
bar :: _ -> _ -> _
• Relevant bindings include
- bar :: t -> (t -> t1) -> t1
+ bar :: t1 -> (t1 -> t) -> t
(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
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t1 -> (t1 -> t) -> t
at WarningWildcardInstantiations.hs:9:1
• In the type signature:
bar :: _ -> _ -> _
• Relevant bindings include
- bar :: t -> (t -> t1) -> t1
+ bar :: t1 -> (t1 -> t) -> t
(bound at WarningWildcardInstantiations.hs:9:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/T10045.stderr b/testsuite/tests/partial-sigs/should_fail/T10045.stderr
index 556201cc04..42218b5fe9 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10045.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10045.stderr
@@ -1,9 +1,9 @@
T10045.hs:6:18: error:
• Found type wildcard ‘_’ standing for ‘t1 -> Bool -> t2’
- Where: ‘t1’ is a rigid type variable bound by
+ Where: ‘t2’ 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
+ ‘t1’ 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:
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
index ac44a19e4b..ddbb9e2b6c 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
@@ -25,40 +25,40 @@ WildcardInstantiations.hs:5:30: error:
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
+ • Found type wildcard ‘_’ standing for ‘t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t1 -> (t1 -> t) -> t
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
+ bar :: t1 -> (t1 -> t) -> t
(bound at WildcardInstantiations.hs:9:1)
WildcardInstantiations.hs:8:13: error:
- • Found type wildcard ‘_’ standing for ‘t -> t1’
+ • Found type wildcard ‘_’ standing for ‘t1 -> t’
Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
+ the inferred type of bar :: t1 -> (t1 -> t) -> t
at WildcardInstantiations.hs:9:1
‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
+ the inferred type of bar :: t1 -> (t1 -> t) -> t
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
+ bar :: t1 -> (t1 -> t) -> t
(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
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t1 -> (t1 -> t) -> t
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
+ bar :: t1 -> (t1 -> t) -> t
(bound at WildcardInstantiations.hs:9:1)
diff --git a/testsuite/tests/patsyn/should_fail/T9161-2.stderr b/testsuite/tests/patsyn/should_fail/T9161-2.stderr
index ebaea2d455..b7a1f360d7 100644
--- a/testsuite/tests/patsyn/should_fail/T9161-2.stderr
+++ b/testsuite/tests/patsyn/should_fail/T9161-2.stderr
@@ -1,5 +1,6 @@
-
-T9161-2.hs:8:20: error:
- Pattern synonym ‘PATTERN’ used as a type
- In the type signature:
- wrongLift :: Proxy PATTERN ()
+
+T9161-2.hs:8:20: error:
+ • Pattern synonym ‘PATTERN’ used as a type
+ • In the first argument of ‘Proxy’, namely ‘PATTERN’
+ In the type signature:
+ wrongLift :: Proxy PATTERN ()
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index 620a62ceee..ae093be893 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -294,7 +294,7 @@ test('T3064',
# 2014-12-01: 162457940 (Windows)
# 2014-12-22: 122836340 (Windows) Death to silent superclasses
- (wordsize(64), 264952256, 5)]),
+ (wordsize(64), 304344936, 5)]),
# (amd64/Linux) (28/06/2011): 73259544
# (amd64/Linux) (07/02/2013): 224798696
# (amd64/Linux) (02/08/2013): 236404384, increase from roles
@@ -313,6 +313,8 @@ test('T3064',
# much less code for Monad instances
# (amd64/Linux) (01/12/2015): 264952256, Regression due to Simon's wildcard refactor
# Tracked as #11151.
+ # (amd64/Linux) (11/12/2015): 304344936, Regression due to TypeInType
+ # Tracked as #11196
###################################
# deactivated for now, as this metric became too volatile recently
@@ -362,7 +364,7 @@ test('T5030',
# of family-applications leads to less sharing, I think
# 2015-07-11: 201882912 reason unknown
- (wordsize(64), 403932600, 10)]),
+ (wordsize(64), 653710960, 10)]),
# Previously 530000000 (+/- 10%)
# 17/1/13: 602993184 (x86_64/Linux)
# (new demand analyser)
@@ -379,6 +381,7 @@ test('T5030',
# 2014-12-10 449042120 constraint solver got worse again; more aggressive solving
# of family-applications leads to less sharing, I think
# 2015-03-17 403932600 tweak to solver algorithm
+ # 2015-12-11 653710960 TypeInType (see #11196)
only_ways(['normal'])
],
@@ -391,13 +394,14 @@ test('T5631',
# expected value: 392904228 (x86/Linux)
# 2014-04-04: 346389856 (x86 Windows, 64 bit machine)
# 2014-12-01: 390199244 (Windows laptop)
- (wordsize(64), 812288344, 5)]),
+ (wordsize(64), 1128828928, 5)]),
# expected value: 774595008 (amd64/Linux):
# expected value: 735486328 (amd64/Linux) 2012/12/12:
# expected value: 690742040 (amd64/Linux) Call Arity improvements
# 2014-09-09: 739704712 (amd64/Linux) AMP changes
# 2014-11-04: 776121120 (amd64/Linux) new-flatten-skolems
# 2015-06-01: 812288344 (amd64/Linux) unknown cause
+ # 2015-12-11: 1128828928 (amd64/Linux) TypeInType (see #11196)
only_ways(['normal'])
],
compile,
@@ -465,7 +469,7 @@ test('T5321Fun',
# (increase due to new codegen)
# 2014-09-03: 299656164 (specialisation and inlining)
# 10/12/2014: 206406188 # Improvements in constraint solver
- (wordsize(64), 509921312, 10)])
+ (wordsize(64), 565883176, 10)])
# prev: 585521080
# 29/08/2012: 713385808 # (increase due to new codegen)
# 15/05/2013: 628341952 # (reason for decrease unknown)
@@ -478,6 +482,7 @@ test('T5321Fun',
# 10/08/2015: 509921312
# (undefined now takes an implicit parameter and GHC -O0 does
# not recognize that the application is bottom)
+ # 11/12/2015: 565883176 # TypeInType (see #11196)
],
compile,[''])
@@ -548,7 +553,7 @@ test('T5837',
# 2014-12-01: 135914136 (Windows laptop, regression see below)
# 2014-12-08 115905208 Constraint solver perf improvements (esp kick-out)
- (wordsize(64), 38834096, 10)])
+ (wordsize(64), 43877520, 10)])
# sample: 3926235424 (amd64/Linux, 15/2/2012)
# 2012-10-02 81879216
# 2012-09-20 87254264 amd64/Linux
@@ -564,6 +569,7 @@ test('T5837',
# some optimization
# 2015-03-17 53424304 Mac Better depth checking; fails earlier
# 2015-06-09 38834096 Better "improvement"; I'm not sure whey it improves things
+ # 2015-12-11 43877520 amd64/Linux, TypeInType (see #11196)
],
compile_fail,['-freduction-depth=50'])
@@ -608,18 +614,19 @@ test('T9020',
test('T9675',
[ only_ways(['optasm']),
compiler_stats_num_field('max_bytes_used', # Note [residency]
- [(wordsize(64), 23776640, 15),
+ [(wordsize(64), 30837312, 15),
# 2014-10-13 29596552
# 2014-10-13 26570896 seq the DmdEnv in seqDmdType as well
# 2014-10-13 18582472 different machines giving different results..
# 2014-10-13 22220552 use the mean
# 2015-06-21 28056344 switch to `+RTS -G1`, tighten bound to 15%
# 2015-10-28 23776640 emit Typeable at definition site
+ # 2015-12-11 30837312 TypeInType (see #11196)
(wordsize(32), 15341228, 15)
# 2015-07-11 15341228 (x86/Linux, 64-bit machine) use +RTS -G1
]),
compiler_stats_num_field('peak_megabytes_allocated', # Note [residency]
- [(wordsize(64), 88, 15),
+ [(wordsize(64), 113, 15),
# 2014-10-13 66
# 2014-10-13 58 seq the DmdEnv in seqDmdType as well
# 2014-10-13 49 different machines giving different results...
@@ -627,6 +634,7 @@ test('T9675',
# 2015-06-15 44 reduced for some reason
# 2015-06-21 105 switch to `+RTS -G1`
# 2015-12-04 88 new pattern checker (D1535)
+ # 2015-12-11 113 TypeInType (see #11196)
(wordsize(32), 56, 15)
# 2015-07-11 56 (x86/Linux, 64-bit machine) use +RTS -G1
]),
@@ -647,10 +655,11 @@ test('T9675',
test('T9872a',
[ only_ways(['normal']),
compiler_stats_num_field('bytes allocated',
- [(wordsize(64), 2680733672, 5),
+ [(wordsize(64), 3581500440, 5),
# 2014-12-10 5521332656 Initally created
# 2014-12-16 5848657456 Flattener parameterized over roles
# 2014-12-18 2680733672 Reduce type families even more eagerly
+ # 2015-12-11 3581500440 TypeInType (see #11196)
(wordsize(32), 1325592896, 5)
]),
],
@@ -660,10 +669,11 @@ test('T9872a',
test('T9872b',
[ only_ways(['normal']),
compiler_stats_num_field('bytes allocated',
- [(wordsize(64), 3480212048, 5),
+ [(wordsize(64), 5199926080, 5),
# 2014-12-10 6483306280 Initally created
# 2014-12-16 6892251912 Flattener parameterized over roles
# 2014-12-18 3480212048 Reduce type families even more eagerly
+ # 2015-12-11 5199926080 TypeInType (see #11196)
(wordsize(32), 1700000000, 5)
]),
],
@@ -672,10 +682,11 @@ test('T9872b',
test('T9872c',
[ only_ways(['normal']),
compiler_stats_num_field('bytes allocated',
- [(wordsize(64), 2963554096, 5),
+ [(wordsize(64), 4723613784, 5),
# 2014-12-10 5495850096 Initally created
# 2014-12-16 5842024784 Flattener parameterized over roles
# 2014-12-18 2963554096 Reduce type families even more eagerly
+ # 2015-12-11 4723613784 TypeInType (see #11196)
(wordsize(32), 1500000000, 5)
]),
],
@@ -683,16 +694,19 @@ test('T9872c',
[''])
test('T9872d',
[ only_ways(['normal']),
- compiler_stats_num_field('bytes allocated',
- [(wordsize(64), 726679784, 5),
+ expect_broken(11203),
+ # compiler_stats_num_field('bytes allocated',
+ # [(wordsize(64), 59651432, 5),
# 2014-12-18 796071864 Initally created
# 2014-12-18 739189056 Reduce type families even more eagerly
# 2015-01-07 687562440 TrieMap leaf compression
# 2015-03-17 726679784 tweak to solver; probably flattens more
- (wordsize(32), 350369584, 5)
+ # (wordsize(32), 59651432, 5)
# some date 328810212
# 2015-07-11 350369584
- ]),
+ # 2015-12-11 59651432 Massive improvement from TypeInType
+ # but see also #11196
+ # ]),
],
compile,
[''])
diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T
index 22107a9185..9b8785f9c8 100644
--- a/testsuite/tests/perf/haddock/all.T
+++ b/testsuite/tests/perf/haddock/all.T
@@ -5,7 +5,7 @@
test('haddock.base',
[unless(in_tree_compiler(), skip), req_haddock
,stats_num_field('bytes allocated',
- [(wordsize(64), 9894189856, 5)
+ [(wordsize(64), 11119767632, 5)
# 2012-08-14: 5920822352 (amd64/Linux)
# 2012-09-20: 5829972376 (amd64/Linux)
# 2012-10-08: 5902601224 (amd64/Linux)
@@ -25,6 +25,7 @@ test('haddock.base',
# 2014-01-08: 9014511528 (x86_64/Linux) - Eliminate so-called "silent superclass parameters" (and others)
# 2015-07-22: 9418857192 (x86_64/Linux) - Just slowly creeping up.
# 2015-10-03: 9894189856 (x86_64/Linux) - Still creeping
+ # 2015-12-11: 11119767632 (amd64/Linux) TypeInType (see #11196)
,(platform('i386-unknown-mingw32'), 4434804940, 5)
# 2013-02-10: 3358693084 (x86/Windows)
@@ -47,7 +48,7 @@ test('haddock.base',
test('haddock.Cabal',
[unless(in_tree_compiler(), skip), req_haddock
,stats_num_field('bytes allocated',
- [(wordsize(64), 7413958344, 5)
+ [(wordsize(64), 8114833312, 5)
# 2012-08-14: 3255435248 (amd64/Linux)
# 2012-08-29: 3324606664 (amd64/Linux, new codegen)
# 2012-10-08: 3373401360 (amd64/Linux)
@@ -68,6 +69,7 @@ test('haddock.Cabal',
# 2014-12-14: 6387320816 (x86_64/Linux) - Update to Haddock 2.16
# 2015-01-22: 6710234312 (x86_64/Linux) - Cabal updated
# 2015-06-29: 7413958344 (x86_64/Linux) due to #10482, not yet investigated
+ # 2015-12-11: 8114833312 (amd64/Linux) TypeInType (See #11196)
,(platform('i386-unknown-mingw32'), 3293415576, 5)
# 2012-10-30: 1733638168 (x86/Windows)
diff --git a/testsuite/tests/polykinds/PolyInstances.hs b/testsuite/tests/polykinds/PolyInstances.hs
new file mode 100644
index 0000000000..cc15126142
--- /dev/null
+++ b/testsuite/tests/polykinds/PolyInstances.hs
@@ -0,0 +1,22 @@
+{-# LANGUAGE PolyKinds, FlexibleInstances, ScopedTypeVariables,
+ UndecidableInstances #-}
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
+
+module PolyInstances where
+
+import GHC.Exts
+import Data.Proxy
+
+class C (a :: k)
+
+instance (C a, C b) => C (a b)
+
+data Dict :: Constraint -> *
+
+instance C Dict
+
+foo :: C p => proxy p -> ()
+foo = undefined
+
+bar :: forall (p :: Constraint) proxy. C p => proxy p -> ()
+bar _ = foo (Proxy :: Proxy (Dict p))
diff --git a/testsuite/tests/polykinds/PolyKinds02.stderr b/testsuite/tests/polykinds/PolyKinds02.stderr
index 7c5716a65e..b95cd4f207 100644
--- a/testsuite/tests/polykinds/PolyKinds02.stderr
+++ b/testsuite/tests/polykinds/PolyKinds02.stderr
@@ -1,5 +1,6 @@
-
-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
+
+PolyKinds02.hs:13:16: error:
+ • Expected kind ‘Nat’, but ‘Nat’ has kind ‘*’
+ • In the second argument of ‘Vec’, namely ‘Nat’
+ In the type signature:
+ vec :: Vec Nat Nat
diff --git a/testsuite/tests/polykinds/PolyKinds04.stderr b/testsuite/tests/polykinds/PolyKinds04.stderr
index eaa4c07909..8162dd247b 100644
--- a/testsuite/tests/polykinds/PolyKinds04.stderr
+++ b/testsuite/tests/polykinds/PolyKinds04.stderr
@@ -1,8 +1,7 @@
PolyKinds04.hs:5:16:
Expecting one more argument to ‘Maybe’
- The first argument of ‘A’ should have kind ‘*’,
- but ‘Maybe’ has kind ‘* -> *’
+ Expected a type, but ‘Maybe’ has kind ‘* -> *’
+ In the first argument of ‘A’, namely ‘Maybe’
In the type ‘A Maybe’
In the definition of data constructor ‘B1’
- In the data declaration for ‘B’
diff --git a/testsuite/tests/polykinds/PolyKinds07.stderr b/testsuite/tests/polykinds/PolyKinds07.stderr
index 6b1d6c137d..3a38a6777f 100644
--- a/testsuite/tests/polykinds/PolyKinds07.stderr
+++ b/testsuite/tests/polykinds/PolyKinds07.stderr
@@ -2,6 +2,6 @@
PolyKinds07.hs:10:11:
Data constructor ‘A1’ cannot be used here
(it is defined and used in the same recursive group)
+ In the first argument of ‘B’, namely ‘A1’
In the type ‘B A1’
In the definition of data constructor ‘B1’
- In the data declaration for ‘B’
diff --git a/testsuite/tests/polykinds/SigTvKinds.hs b/testsuite/tests/polykinds/SigTvKinds.hs
new file mode 100644
index 0000000000..782a7b3f8b
--- /dev/null
+++ b/testsuite/tests/polykinds/SigTvKinds.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE PolyKinds #-}
+
+module SigTvKinds where
+
+data T (a :: k1) x = MkT (S a ())
+data S (b :: k2) y = MkS (T b ())
+ -- tests TcTyClsDecls.no_sig_tv
diff --git a/testsuite/tests/polykinds/SigTvKinds2.hs b/testsuite/tests/polykinds/SigTvKinds2.hs
new file mode 100644
index 0000000000..1ec1ebb0f6
--- /dev/null
+++ b/testsuite/tests/polykinds/SigTvKinds2.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE PolyKinds #-}
+
+module SigTvKinds2 where
+
+data SameKind :: k -> k -> *
+
+data Q (a :: k1) (b :: k2) c = MkQ (SameKind a b)
diff --git a/testsuite/tests/polykinds/SigTvKinds2.stderr b/testsuite/tests/polykinds/SigTvKinds2.stderr
new file mode 100644
index 0000000000..9f523705a6
--- /dev/null
+++ b/testsuite/tests/polykinds/SigTvKinds2.stderr
@@ -0,0 +1,6 @@
+
+SigTvKinds2.hs:7:48: error:
+ • Expected kind ‘k1’, but ‘b’ has kind ‘k2’
+ • In the second argument of ‘SameKind’, namely ‘b’
+ In the type ‘SameKind a b’
+ In the definition of data constructor ‘MkQ’
diff --git a/testsuite/tests/polykinds/T10503.stderr b/testsuite/tests/polykinds/T10503.stderr
index 071ab5e88e..7c39c41738 100644
--- a/testsuite/tests/polykinds/T10503.stderr
+++ b/testsuite/tests/polykinds/T10503.stderr
@@ -1,15 +1,18 @@
-
-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
+
+T10503.hs:8:6: error:
+ • Could not deduce: k ~ *
+ from the context: Proxy 'KProxy ~ Proxy 'KProxy
+ bound by the type signature for:
+ h :: (Proxy 'KProxy ~ Proxy 'KProxy) => r
+ at T10503.hs:8:6-85
+ ‘k’ is a rigid type variable bound by
+ the type signature for:
+ h :: forall k r. ((Proxy 'KProxy ~ Proxy 'KProxy) => r) -> r
+ at T10503.hs:8:6
+ Expected type: ((Proxy 'KProxy ~ Proxy 'KProxy) => r) -> r
+ Actual type: ((Proxy 'KProxy ~ Proxy 'KProxy) => r) -> r
+ • 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/T11142.hs b/testsuite/tests/polykinds/T11142.hs
new file mode 100644
index 0000000000..58eb3b6c94
--- /dev/null
+++ b/testsuite/tests/polykinds/T11142.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TypeInType, RankNTypes #-}
+
+module T11142 where
+
+import Data.Kind
+
+data SameKind :: k -> k -> *
+
+foo :: forall b. (forall k (a :: k). SameKind a b) -> ()
+foo = undefined
diff --git a/testsuite/tests/polykinds/T11142.stderr b/testsuite/tests/polykinds/T11142.stderr
new file mode 100644
index 0000000000..2cb4e61f19
--- /dev/null
+++ b/testsuite/tests/polykinds/T11142.stderr
@@ -0,0 +1,7 @@
+
+T11142.hs:9:8: error:
+ • The kind of variable ‘b’, namely ‘k’,
+ depends on variable ‘k’ from an inner scope
+ Perhaps bind ‘b’ sometime after binding ‘k’
+ • In the type signature:
+ foo :: forall b. (forall k (a :: k). SameKind a b) -> ()
diff --git a/testsuite/tests/polykinds/T5716.hs b/testsuite/tests/polykinds/T5716.hs
index 572de5e4e8..1b705a36b1 100644
--- a/testsuite/tests/polykinds/T5716.hs
+++ b/testsuite/tests/polykinds/T5716.hs
@@ -5,7 +5,7 @@
module T5716 where
-data family DF a
+data family DF a
data instance DF Int = DFInt
data U = U1 (DF Int)
diff --git a/testsuite/tests/polykinds/T5716.stderr b/testsuite/tests/polykinds/T5716.stderr
index 227a6b88c6..8bc8883daf 100644
--- a/testsuite/tests/polykinds/T5716.stderr
+++ b/testsuite/tests/polykinds/T5716.stderr
@@ -1,4 +1,7 @@
-T5716.hs:13:11:
- ‘U’ of kind ‘*’ is not promotable
- In the kind ‘U -> *’
+T5716.hs:13:33: error:
+ Data constructor ‘U1’ cannot be used here
+ (Perhaps you intended to use TypeInType)
+ In the first argument of ‘I’, namely ‘U1 DFInt’
+ In the type ‘I (U1 DFInt)’
+ In the definition of data constructor ‘I1’
diff --git a/testsuite/tests/polykinds/T6021.hs b/testsuite/tests/polykinds/T6021.hs
index 0a89bf9570..77915a266e 100644
--- a/testsuite/tests/polykinds/T6021.hs
+++ b/testsuite/tests/polykinds/T6021.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE KindSignatures, PolyKinds, MultiParamTypeClasses #-}
+{-# LANGUAGE KindSignatures, PolyKinds, MultiParamTypeClasses, FlexibleInstances #-}
module T6021 where
class Panic a b
diff --git a/testsuite/tests/polykinds/T6021.stderr b/testsuite/tests/polykinds/T6021.stderr
index 0b7ce77439..d747043d27 100644
--- a/testsuite/tests/polykinds/T6021.stderr
+++ b/testsuite/tests/polykinds/T6021.stderr
@@ -1,5 +1,4 @@
-
-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’
+
+T6021.hs:5:22: error:
+ Variable ‘b’ used as both a kind and a type
+ Did you intend to use TypeInType?
diff --git a/testsuite/tests/polykinds/T6039.stderr b/testsuite/tests/polykinds/T6039.stderr
deleted file mode 100644
index def904ea33..0000000000
--- a/testsuite/tests/polykinds/T6039.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-
-T6039.hs:5:14:
- Kind variable ‘j’ cannot appear in a function position
- In the kind ‘j k’
diff --git a/testsuite/tests/polykinds/T6129.stderr b/testsuite/tests/polykinds/T6129.stderr
index 36b749680b..451d851c5d 100644
--- a/testsuite/tests/polykinds/T6129.stderr
+++ b/testsuite/tests/polykinds/T6129.stderr
@@ -2,6 +2,6 @@
T6129.hs:12:11:
Data constructor ‘DInt’ cannot be used here
(it comes from a data family instance)
+ In the first argument of ‘X’, namely ‘DInt’
In the type ‘X DInt’
In the definition of data constructor ‘X1’
- In the data declaration for ‘X’
diff --git a/testsuite/tests/polykinds/T7224.stderr b/testsuite/tests/polykinds/T7224.stderr
index b957a1ba65..daab1c40a9 100644
--- a/testsuite/tests/polykinds/T7224.stderr
+++ b/testsuite/tests/polykinds/T7224.stderr
@@ -1,6 +1,7 @@
-
-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'’
+
+T7224.hs:6:19: error:
+ • Expected kind ‘i’, but ‘i’ has kind ‘*’
+ • In the first argument of ‘m’, namely ‘i’
+ 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 92938bedb1..36e333c5ec 100644
--- a/testsuite/tests/polykinds/T7230.stderr
+++ b/testsuite/tests/polykinds/T7230.stderr
@@ -8,18 +8,18 @@ T7230.hs:48:32: error:
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]).
+ SCons :: forall a (x :: a) (xs :: [a]).
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]).
+ SCons :: forall a (x :: a) (xs :: [a]).
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)
+ Actual type: SBool (x :<<= x1)
• In the expression: x %:<<= y
In an equation for ‘crash’:
crash (SCons x (SCons y xs)) = x %:<<= y
diff --git a/testsuite/tests/polykinds/T7278.hs b/testsuite/tests/polykinds/T7278.hs
index d43e60c7a7..af4800507e 100644
--- a/testsuite/tests/polykinds/T7278.hs
+++ b/testsuite/tests/polykinds/T7278.hs
@@ -1,4 +1,5 @@
-{-# LANGUAGE TypeFamilies, PolyKinds, MultiParamTypeClasses #-}
+{-# LANGUAGE TypeFamilies, PolyKinds, MultiParamTypeClasses, FlexibleContexts,
+ AllowAmbiguousTypes #-}
module T7278 where
type family TF (t :: k) :: * -> * -> *
diff --git a/testsuite/tests/polykinds/T7278.stderr b/testsuite/tests/polykinds/T7278.stderr
index f8b2cfface..676be2cb0f 100644
--- a/testsuite/tests/polykinds/T7278.stderr
+++ b/testsuite/tests/polykinds/T7278.stderr
@@ -1,5 +1,6 @@
-
-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
+
+T7278.hs:9:43: error:
+ • Expecting two fewer arguments to ‘t’
+ Expected kind ‘* -> * -> *’, but ‘t’ has kind ‘k’
+ • In the type signature:
+ f :: (C (t :: k) (TF t)) => TF t p1 p0 -> t p1 p0
diff --git a/testsuite/tests/polykinds/T7328.hs b/testsuite/tests/polykinds/T7328.hs
index 3e51875508..f51efb7943 100644
--- a/testsuite/tests/polykinds/T7328.hs
+++ b/testsuite/tests/polykinds/T7328.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PolyKinds, GADTs #-}
+{-# LANGUAGE PolyKinds, GADTs, AllowAmbiguousTypes #-}
module T7328 where
diff --git a/testsuite/tests/polykinds/T7328.stderr b/testsuite/tests/polykinds/T7328.stderr
index 9e7cbab03a..31b425f644 100644
--- a/testsuite/tests/polykinds/T7328.stderr
+++ b/testsuite/tests/polykinds/T7328.stderr
@@ -1,8 +1,7 @@
-
-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’
+
+T7328.hs:8:34: error:
+ • Occurs check: cannot construct the infinite kind: k10 ~ k0 -> k10
+ • In the first argument of ‘Foo’, namely ‘f’
+ In the first argument of ‘Proxy’, namely ‘Foo f’
+ In the type signature:
+ foo :: a ~ f i => Proxy (Foo f)
diff --git a/testsuite/tests/polykinds/T7341.hs b/testsuite/tests/polykinds/T7341.hs
index 1c91847dfc..79d056532a 100644
--- a/testsuite/tests/polykinds/T7341.hs
+++ b/testsuite/tests/polykinds/T7341.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE KindSignatures, TypeFamilies, PolyKinds #-}
+{-# LANGUAGE KindSignatures, TypeFamilies, PolyKinds, FlexibleInstances #-}
module T7341 where
diff --git a/testsuite/tests/polykinds/T7341.stderr b/testsuite/tests/polykinds/T7341.stderr
index c5dd260660..925c68e52d 100644
--- a/testsuite/tests/polykinds/T7341.stderr
+++ b/testsuite/tests/polykinds/T7341.stderr
@@ -1,6 +1,6 @@
T7341.hs:11:12:
Expecting one more argument to ‘[]’
- The first argument of ‘C’ should have kind ‘*’,
- but ‘[]’ has kind ‘* -> *’
+ Expected a type, but ‘[]’ has kind ‘* -> *’
+ In the first argument of ‘C’, namely ‘[]’
In the instance declaration for ‘C []’
diff --git a/testsuite/tests/polykinds/T7404.stderr b/testsuite/tests/polykinds/T7404.stderr
index d9d4288c56..a8b953e5df 100644
--- a/testsuite/tests/polykinds/T7404.stderr
+++ b/testsuite/tests/polykinds/T7404.stderr
@@ -1,4 +1,5 @@
-T7404.hs:4:1:
- Kind variable also used as type variable: ‘x’
- In the declaration for type family ‘Foo’
+T7404.hs:4:32: error:
+ Type variable ‘x’ used in a kind.
+ Did you mean to use TypeInType?
+ the declaration for type family ‘Foo’
diff --git a/testsuite/tests/polykinds/T7438.stderr b/testsuite/tests/polykinds/T7438.stderr
index ca09383a2d..539d15d406 100644
--- a/testsuite/tests/polykinds/T7438.stderr
+++ b/testsuite/tests/polykinds/T7438.stderr
@@ -1,20 +1,19 @@
T7438.hs:6:14: error:
- Couldn't match expected type ‘t1’ with actual type ‘t’
- ‘t’ is untouchable
- inside the constraints: t2 ~ t3
- bound by a pattern with constructor:
- Nil :: forall (k :: BOX) (b :: k). Thrist b b,
- in an equation for ‘go’
- at T7438.hs:6:4-6
- ‘t’ is a rigid type variable bound by
- the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
- Possible fix: add a type signature for ‘go’
- In the expression: acc
- In an equation for ‘go’: go Nil acc = acc
- Relevant bindings include
- acc :: t (bound at T7438.hs:6:8)
- go :: Thrist t2 t3 -> t -> t1 (bound at T7438.hs:6:1)
-
+ • Couldn't match expected type ‘r1’ with actual type ‘r’
+ ‘r1’ is untouchable
+ inside the constraints: r3 ~ r2
+ bound by a pattern with constructor:
+ Nil :: forall k (a :: k). Thrist a a,
+ in an equation for ‘go’
+ at T7438.hs:6:4-6
+ ‘r1’ is a rigid type variable bound by
+ the inferred type of go :: Thrist r2 r3 -> r -> r1 at T7438.hs:6:1
+ ‘r’ is a rigid type variable bound by
+ the inferred type of go :: Thrist r2 r3 -> r -> r1 at T7438.hs:6:1
+ Possible fix: add a type signature for ‘go’
+ • In the expression: acc
+ In an equation for ‘go’: go Nil acc = acc
+ • Relevant bindings include
+ acc :: r (bound at T7438.hs:6:8)
+ go :: Thrist r2 r3 -> r -> r1 (bound at T7438.hs:6:1)
diff --git a/testsuite/tests/polykinds/T7481.stderr b/testsuite/tests/polykinds/T7481.stderr
deleted file mode 100644
index cca905d5e5..0000000000
--- a/testsuite/tests/polykinds/T7481.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-
-T7481.hs:12:13:
- ‘D’ of kind ‘* -> *’ is not promotable
- In the kind ‘D * -> *’
diff --git a/testsuite/tests/polykinds/T7524.stderr b/testsuite/tests/polykinds/T7524.stderr
index 83b355e312..2340ce1aa6 100644
--- a/testsuite/tests/polykinds/T7524.stderr
+++ b/testsuite/tests/polykinds/T7524.stderr
@@ -1,6 +1,6 @@
-
-T7524.hs:5:15:
- Conflicting family instance declarations:
- forall (k :: BOX) (a :: k). F a a = Int -- Defined at T7524.hs:5:15
- forall (k :: BOX) (k1 :: BOX) (a :: k) (b :: k1).
- F a b = Bool -- Defined at T7524.hs:6:15
+
+T7524.hs:5:15: error:
+ Conflicting family instance declarations:
+ forall k2 (a :: k2). F a a = Int -- Defined at T7524.hs:5:15
+ forall k2 k1 (a :: k1) (b :: k2).
+ F a b = Bool -- Defined at T7524.hs:6:15
diff --git a/testsuite/tests/polykinds/T7594.hs b/testsuite/tests/polykinds/T7594.hs
index 2cbd3db88d..18da70342c 100644
--- a/testsuite/tests/polykinds/T7594.hs
+++ b/testsuite/tests/polykinds/T7594.hs
@@ -8,7 +8,7 @@
{-# LANGUAGE Rank2Types #-}
module T7594 where
-import GHC.Prim (Constraint)
+import GHC.Exts (Constraint)
class (c1 t, c2 t) => (:&:) (c1 :: * -> Constraint) (c2 :: * -> Constraint) (t :: *)
instance (c1 t, c2 t) => (:&:) c1 c2 t
@@ -33,5 +33,3 @@ q2 = error "urk"
bar2 = app print q2
-- This one fail, because the given constraint is
-- (c :&: Real) a, which might have equality superclasses
-
-
diff --git a/testsuite/tests/polykinds/T7805.stderr b/testsuite/tests/polykinds/T7805.stderr
index bdf0f21b14..33b9d4df6b 100644
--- a/testsuite/tests/polykinds/T7805.stderr
+++ b/testsuite/tests/polykinds/T7805.stderr
@@ -1,4 +1,6 @@
-T7805.hs:6:21:
- ‘HigherRank’ of kind ‘*’ is not promotable
- In the kind ‘HigherRank’
+T7805.hs:7:21: error:
+ Expected kind ‘forall a. a -> a’, but ‘x’ has kind ‘k0’
+ In the first argument of ‘HR’, namely ‘x’
+ In the first argument of ‘F’, namely ‘HR x’
+ In the type instance declaration for ‘F’
diff --git a/testsuite/tests/polykinds/T7939a.stderr b/testsuite/tests/polykinds/T7939a.stderr
index 22388ddca0..4b24b3dc72 100644
--- a/testsuite/tests/polykinds/T7939a.stderr
+++ b/testsuite/tests/polykinds/T7939a.stderr
@@ -1,7 +1,6 @@
T7939a.hs:7:5:
Expecting one more argument to ‘Maybe’
- The first argument of ‘F’ should have kind ‘*’,
- but ‘Maybe’ has kind ‘* -> *’
- In the type ‘Maybe’
+ Expected a type, but ‘Maybe’ has kind ‘* -> *’
+ In the first argument of ‘F’, namely ‘Maybe’
In the type family declaration for ‘F’
diff --git a/testsuite/tests/polykinds/T8566.stderr b/testsuite/tests/polykinds/T8566.stderr
index 168e890404..1e7818c5ef 100644
--- a/testsuite/tests/polykinds/T8566.stderr
+++ b/testsuite/tests/polykinds/T8566.stderr
@@ -1,19 +1,18 @@
-
-T8566.hs:32:9:
- Could not deduce (C ('AA (t (I a ps)) as) ps fs0)
- arising from a use of ‘c’
- from the context: C ('AA (t (I a ps)) as) ps fs
- bound by the instance declaration at T8566.hs:30:10-67
- or from: 'AA t (a : as) ~ 'AA t1 as1
- bound by a pattern with constructor:
- A :: forall (r :: [*]) (k :: BOX) (t :: k) (as :: [U *]).
- I ('AA t as) r,
- in an equation for ‘c’
- at T8566.hs:32:5
- The type variable ‘fs0’ is ambiguous
- Relevant bindings include
- c :: I ('AA t (a : as)) ps -> I ('AA t (a : as)) ps
- (bound at T8566.hs:32:3)
- In the expression: c undefined
- In an equation for ‘c’: c A = c undefined
- In the instance declaration for ‘C ('AA t (a : as)) ps fs’
+
+T8566.hs:32:9: error:
+ • Could not deduce (C ('AA (t (I a ps)) as) ps fs0)
+ arising from a use of ‘c’
+ from the context: C ('AA (t (I a ps)) as) ps fs
+ bound by the instance declaration at T8566.hs:30:10-67
+ or from: 'AA t (a : as) ~ 'AA t1 as1
+ bound by a pattern with constructor:
+ A :: forall (r :: [*]) v (t :: v) (as :: [U *]). I ('AA t as) r,
+ in an equation for ‘c’
+ at T8566.hs:32:5
+ The type variable ‘fs0’ is ambiguous
+ Relevant bindings include
+ c :: I ('AA t (a : as)) ps -> I ('AA t (a : as)) ps
+ (bound at T8566.hs:32:3)
+ • In the expression: c undefined
+ In an equation for ‘c’: c A = c undefined
+ In the instance declaration for ‘C ('AA t (a : as)) ps fs’
diff --git a/testsuite/tests/polykinds/T8616.stderr b/testsuite/tests/polykinds/T8616.stderr
index 5c8449826d..00c9c6328e 100644
--- a/testsuite/tests/polykinds/T8616.stderr
+++ b/testsuite/tests/polykinds/T8616.stderr
@@ -1,7 +1,9 @@
-T8616.hs:8:29:
- Expected a type, but ‘Any’ has kind ‘k’
- In an expression type signature: (Any :: k)
- In the expression: undefined :: (Any :: k)
- In an equation for ‘withSomeSing’:
- withSomeSing = undefined :: (Any :: k)
+T8616.hs:8:29: error:
+ • Expected a type, but ‘Any’ has kind ‘k’
+ • In an expression type signature: (Any :: k)
+ In the expression: undefined :: (Any :: k)
+ In an equation for ‘withSomeSing’:
+ withSomeSing = undefined :: (Any :: k)
+ • Relevant bindings include
+ withSomeSing :: Proxy kproxy (bound at T8616.hs:8:1)
diff --git a/testsuite/tests/polykinds/T9200b.stderr b/testsuite/tests/polykinds/T9200b.stderr
index 5e8c730878..22f9df73f1 100644
--- a/testsuite/tests/polykinds/T9200b.stderr
+++ b/testsuite/tests/polykinds/T9200b.stderr
@@ -1,6 +1,5 @@
-T9200b.hs:8:5:
- The first argument of ‘F’ should have kind ‘k’,
- but ‘True’ has kind ‘Bool’
- In the type ‘True’
+T9200b.hs:8:5: error:
+ Expected kind ‘k’, but ‘'True’ has kind ‘Bool’
+ In the first argument of ‘F’, namely ‘True’
In the type family declaration for ‘F’
diff --git a/testsuite/tests/polykinds/T9222.stderr b/testsuite/tests/polykinds/T9222.stderr
index 6a45c4a7fb..69e850caf8 100644
--- a/testsuite/tests/polykinds/T9222.stderr
+++ b/testsuite/tests/polykinds/T9222.stderr
@@ -1,19 +1,19 @@
T9222.hs:13:3: error:
- Couldn't match type ‘b0’ with ‘b’
- ‘b0’ is untouchable
- inside the constraints: a ~ '(b0, c0)
- bound by the type of the constructor ‘Want’:
- (a ~ '(b0, c0)) => Proxy b0
+ • Couldn't match type ‘b0’ with ‘b’
+ ‘b0’ is untouchable
+ inside the constraints: a ~ '(b0, c0)
+ bound by the type of the constructor ‘Want’:
+ (a ~ '(b0, c0)) => Proxy b0
+ at T9222.hs:13:3
+ ‘b’ is a rigid type variable bound by
+ the type of the constructor ‘Want’:
+ forall i j (a :: (i, j)) (b :: i) (c :: j).
+ ((a ~ '(b, c)) => Proxy b) -> Want a
at T9222.hs:13:3
- ‘b’ is a rigid type variable bound by
- 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 ‘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’
+ Expected type: Proxy b0
+ Actual type: Proxy b
+ • 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/polykinds/T9569.hs b/testsuite/tests/polykinds/T9569.hs
index 0e1fdd596a..1b8bb68c75 100644
--- a/testsuite/tests/polykinds/T9569.hs
+++ b/testsuite/tests/polykinds/T9569.hs
@@ -2,7 +2,7 @@
{-# LANGUAGE RankNTypes, ConstraintKinds, KindSignatures, DataKinds, TypeFamilies #-}
module T9569 where
-import GHC.Prim
+import GHC.Exts
data Proxy (c :: Constraint)
@@ -23,4 +23,4 @@ instance (Deferrable c1, Deferrable c2) => Deferrable (c1,c2) where
[W] Proxy (c1,c2) -> ((c1,c2) => a) -> a ~ Proxy (c1x,c2x) -> ((c1x,c2x) => ax) -> ax
[w] Deferrable c1x
[w] Deferrable c2x
--} \ No newline at end of file
+-}
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index b1e0793a4e..a93ad8bc41 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -37,7 +37,7 @@ test('T6035', normal, compile, [''])
test('T6036', normal, compile, [''])
test('T6025', normal, run_command, ['$MAKE -s --no-print-directory T6025'])
test('T6002', normal, compile, [''])
-test('T6039', normal, compile_fail, [''])
+test('T6039', normal, compile, [''])
test('T6021', normal, compile_fail, [''])
test('T6020a', normal, compile, [''])
test('T6044', normal, compile, [''])
@@ -94,8 +94,8 @@ test('T8449', normal, run_command, ['$MAKE -s --no-print-directory T8449'])
test('T8534', normal, compile, [''])
test('T8566', normal, compile_fail,[''])
test('T8616', normal, compile_fail,[''])
-test('T8566a', expect_broken(8566), compile,[''])
-test('T7481', normal, compile_fail,[''])
+test('T8566a', normal, compile,[''])
+test('T7481', normal, compile,[''])
test('T8705', normal, compile, [''])
test('T8985', normal, compile, [''])
test('T9106', normal, compile_fail, [''])
@@ -112,6 +112,7 @@ test('T9838', normal, multimod_compile, ['T9838.hs','-v0'])
test('T9574', normal, compile_fail, [''])
test('T9833', normal, compile, [''])
test('T7908', normal, compile, [''])
+test('PolyInstances', normal, compile, [''])
test('T10041', normal, compile, [''])
test('T10451', normal, compile_fail, [''])
test('T10516', normal, compile_fail, [''])
@@ -122,3 +123,6 @@ test('T10670a', normal, compile, [''])
test('T10134', normal, multimod_compile, ['T10134.hs','-v0'])
test('T10742', normal, compile, [''])
test('T10934', normal, compile, [''])
+test('T11142', normal, compile_fail, [''])
+test('SigTvKinds', expect_broken(11203), compile, [''])
+test('SigTvKinds2', expect_broken(11203), compile_fail, [''])
diff --git a/testsuite/tests/rename/should_fail/T2993.stderr b/testsuite/tests/rename/should_fail/T2993.stderr
index 44582b33dc..257e9d434b 100644
--- a/testsuite/tests/rename/should_fail/T2993.stderr
+++ b/testsuite/tests/rename/should_fail/T2993.stderr
@@ -1,4 +1,4 @@
-
-T2993.hs:7:13: error:
- Variable not in scope: (<**>) :: t1 -> (a -> a) -> t
- Perhaps you meant ‘<*>’ (imported from Prelude)
+
+T2993.hs:7:13: error:
+ Variable not in scope: (<**>) :: t -> (a -> a) -> t1
+ Perhaps you meant ‘<*>’ (imported from Prelude)
diff --git a/testsuite/tests/rename/should_fail/rnfail026.stderr b/testsuite/tests/rename/should_fail/rnfail026.stderr
index f220f81812..bc717ec163 100644
--- a/testsuite/tests/rename/should_fail/rnfail026.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail026.stderr
@@ -1,9 +1,14 @@
-
-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])’
+
+rnfail026.hs:16:10: error:
+ • Illegal polymorphic or qualified type: forall a1. Eq a1 => Set a1
+ • In the instance declaration for ‘Monad (forall a. Eq a => Set a)’
+
+rnfail026.hs:16:27: error:
+ • Expected kind ‘* -> *’, but ‘Set a’ has kind ‘*’
+ • In the first argument of ‘Monad’, namely
+ ‘forall a. Eq a => Set a’
+ In the instance declaration for ‘Monad (forall a. Eq a => Set a)’
+
+rnfail026.hs:19:10: error:
+ • Illegal polymorphic or qualified type: forall a1. [a1]
+ • In the instance declaration for ‘Eq (forall a. [a])’
diff --git a/testsuite/tests/rename/should_fail/rnfail055.stderr b/testsuite/tests/rename/should_fail/rnfail055.stderr
index d87054e926..e7e6a3a817 100644
--- a/testsuite/tests/rename/should_fail/rnfail055.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail055.stderr
@@ -73,7 +73,8 @@ RnFail055.hs-boot:25:1: error:
Main module: type role T7 phantom
data T7 a where
T7 :: a1 -> T7 a
- Boot file: data T7 a = T7 a
+ Boot file: data T7 a where
+ T7 :: a -> T7 a
The roles do not match.
Roles on abstract types default to ‘representational’ in boot files.
The constructors do not match: The types for ‘T7’ differ
diff --git a/testsuite/tests/roles/should_compile/Roles1.stderr b/testsuite/tests/roles/should_compile/Roles1.stderr
index 839d04d692..1759bab776 100644
--- a/testsuite/tests/roles/should_compile/Roles1.stderr
+++ b/testsuite/tests/roles/should_compile/Roles1.stderr
@@ -2,84 +2,42 @@ TYPE SIGNATURES
TYPE CONSTRUCTORS
type role T1 nominal
data T1 a = K1 a
- Promotable
+ Kind: * -> *
data T2 a = K2 a
- Promotable
+ Kind: * -> *
type role T3 phantom
data T3 (a :: k) = K3
+ Kind: forall k1. k1 -> *
type role T4 nominal nominal
data T4 (a :: * -> *) b = K4 (a b)
+ Kind: (* -> *) -> * -> *
data T5 a = K5 a
- Promotable
+ Kind: * -> *
type role T6 phantom
data T6 (a :: k) = K6
+ Kind: forall k1. k1 -> *
type role T7 phantom representational
data T7 (a :: k) b = K7 b
+ Kind: forall k1. k1 -> * -> *
COERCION AXIOMS
Dependent modules: []
Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
integer-gmp-1.0.0.0]
==================== Typechecker ====================
-Roles1.$tcT7
- = TyCon
- 12795488517584970699##
- 6852268802866176810##
- Roles1.$trModule
- (TrNameS "T7"#)
-Roles1.$tcT6
- = TyCon
- 1052116432298682626##
- 4782516991847719023##
- Roles1.$trModule
- (TrNameS "T6"#)
-Roles1.$tcT5
- = TyCon
- 10855726709479635304##
- 5574528370049939204##
- Roles1.$trModule
- (TrNameS "T5"#)
-Roles1.$tc'K5
- = TyCon
- 17986294396600628264##
- 15784122741796850983##
- Roles1.$trModule
- (TrNameS "'K5"#)
-Roles1.$tcT4
- = TyCon
- 5809060867006837344##
- 8795972313583150301##
- Roles1.$trModule
- (TrNameS "T4"#)
-Roles1.$tcT3
- = TyCon
- 17827258502042208248##
- 10404219359416482652##
- Roles1.$trModule
- (TrNameS "T3"#)
-Roles1.$tcT2
- = TyCon
- 14324923875690440398##
- 17626224477681351106##
- Roles1.$trModule
- (TrNameS "T2"#)
-Roles1.$tc'K2
- = TyCon
- 17795591238510508397##
- 10155757471958311507##
- Roles1.$trModule
- (TrNameS "'K2"#)
-Roles1.$tcT1
- = TyCon
- 12633763300352597178##
- 11103726621424210926##
- Roles1.$trModule
- (TrNameS "T1"#)
-Roles1.$tc'K1
- = TyCon
- 1949157551035372857##
- 3576433963139282451##
- Roles1.$trModule
- (TrNameS "'K1"#)
+Roles1.$tcT7 = TyCon 0## 0## Roles1.$trModule (TrNameS "T7"#)
+Roles1.$tc'K7 = TyCon 0## 0## Roles1.$trModule (TrNameS "'K7"#)
+Roles1.$tcT6 = TyCon 0## 0## Roles1.$trModule (TrNameS "T6"#)
+Roles1.$tc'K6 = TyCon 0## 0## Roles1.$trModule (TrNameS "'K6"#)
+Roles1.$tcT5 = TyCon 0## 0## Roles1.$trModule (TrNameS "T5"#)
+Roles1.$tc'K5 = TyCon 0## 0## Roles1.$trModule (TrNameS "'K5"#)
+Roles1.$tcT4 = TyCon 0## 0## Roles1.$trModule (TrNameS "T4"#)
+Roles1.$tc'K4 = TyCon 0## 0## Roles1.$trModule (TrNameS "'K4"#)
+Roles1.$tcT3 = TyCon 0## 0## Roles1.$trModule (TrNameS "T3"#)
+Roles1.$tc'K3 = TyCon 0## 0## Roles1.$trModule (TrNameS "'K3"#)
+Roles1.$tcT2 = TyCon 0## 0## Roles1.$trModule (TrNameS "T2"#)
+Roles1.$tc'K2 = TyCon 0## 0## Roles1.$trModule (TrNameS "'K2"#)
+Roles1.$tcT1 = TyCon 0## 0## Roles1.$trModule (TrNameS "T1"#)
+Roles1.$tc'K1 = TyCon 0## 0## Roles1.$trModule (TrNameS "'K1"#)
Roles1.$trModule = Module (TrNameS "main"#) (TrNameS "Roles1"#)
diff --git a/testsuite/tests/roles/should_compile/Roles13.stderr b/testsuite/tests/roles/should_compile/Roles13.stderr
index 4b7b2cb18d..0af9862d2d 100644
--- a/testsuite/tests/roles/should_compile/Roles13.stderr
+++ b/testsuite/tests/roles/should_compile/Roles13.stderr
@@ -1,6 +1,6 @@
==================== Tidy Core ====================
-Result size of Tidy Core = {terms: 42, types: 18, coercions: 5}
+Result size of Tidy Core = {terms: 51, types: 20, coercions: 5}
-- RHS size: {terms: 2, types: 0, coercions: 0}
a :: TrName
@@ -20,43 +20,53 @@ Roles13.$trModule = Module a a1
-- RHS size: {terms: 2, types: 0, coercions: 0}
a2 :: TrName
[GblId, Caf=NoCafRefs, Str=DmdType]
-a2 = TrNameS "Age"#
+a2 = TrNameS "'MkAge"#
-- RHS size: {terms: 5, types: 0, coercions: 0}
-Roles13.$tcAge :: TyCon
+Roles13.$tc'MkAge :: TyCon
[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType]
-Roles13.$tcAge = TyCon 0## 0## Roles13.$trModule a2
+Roles13.$tc'MkAge = TyCon 0## 0## Roles13.$trModule a2
-- RHS size: {terms: 2, types: 0, coercions: 0}
a3 :: TrName
[GblId, Caf=NoCafRefs, Str=DmdType]
-a3 = TrNameS "'MkWrap"#
+a3 = TrNameS "Age"#
-- RHS size: {terms: 5, types: 0, coercions: 0}
-Roles13.$tc'MkWrap :: TyCon
+Roles13.$tcAge :: TyCon
[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType]
-Roles13.$tc'MkWrap = TyCon 0## 0## Roles13.$trModule a3
+Roles13.$tcAge = TyCon 0## 0## Roles13.$trModule a3
-- RHS size: {terms: 2, types: 0, coercions: 0}
a4 :: TrName
[GblId, Caf=NoCafRefs, Str=DmdType]
-a4 = TrNameS "Wrap"#
+a4 = TrNameS "'MkWrap"#
+
+-- RHS size: {terms: 5, types: 0, coercions: 0}
+Roles13.$tc'MkWrap :: TyCon
+[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType]
+Roles13.$tc'MkWrap = TyCon 0## 0## Roles13.$trModule a4
+
+-- RHS size: {terms: 2, types: 0, coercions: 0}
+a5 :: TrName
+[GblId, Caf=NoCafRefs, Str=DmdType]
+a5 = TrNameS "Wrap"#
-- RHS size: {terms: 5, types: 0, coercions: 0}
Roles13.$tcWrap :: TyCon
[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType]
-Roles13.$tcWrap = TyCon 0## 0## Roles13.$trModule a4
+Roles13.$tcWrap = TyCon 0## 0## Roles13.$trModule a5
-- RHS size: {terms: 2, types: 2, coercions: 0}
-a5 :: Wrap Age -> Wrap Age
+a6 :: Wrap Age -> Wrap Age
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType]
-a5 = \ (ds :: Wrap Age) -> ds
+a6 = \ (ds :: Wrap Age) -> ds
-- RHS size: {terms: 1, types: 0, coercions: 5}
convert :: Wrap Age -> Int
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType]
convert =
- a5
+ a6
`cast` (<Wrap Age>_R -> Roles13.NTCo:Wrap[0] Roles13.NTCo:Age[0]
:: (Wrap Age -> Wrap Age) ~R# (Wrap Age -> Int))
diff --git a/testsuite/tests/roles/should_compile/Roles14.stderr b/testsuite/tests/roles/should_compile/Roles14.stderr
index 08e3b8c504..52333753da 100644
--- a/testsuite/tests/roles/should_compile/Roles14.stderr
+++ b/testsuite/tests/roles/should_compile/Roles14.stderr
@@ -11,11 +11,8 @@ Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
integer-gmp-1.0.0.0]
==================== Typechecker ====================
-Roles12.$tcC2
- = TyCon
- 4006088231579841122##
- 4783761708993822739##
- Roles12.$trModule
- (TrNameS "C2"#)
+Roles12.$tcC2 = TyCon 0## 0## Roles12.$trModule (TrNameS "C2"#)
+Roles12.$tc'D:C2
+ = TyCon 0## 0## Roles12.$trModule (TrNameS "'D:C2"#)
Roles12.$trModule = Module (TrNameS "main"#) (TrNameS "Roles12"#)
diff --git a/testsuite/tests/roles/should_compile/Roles2.stderr b/testsuite/tests/roles/should_compile/Roles2.stderr
index d885534a8d..0b8a8e0336 100644
--- a/testsuite/tests/roles/should_compile/Roles2.stderr
+++ b/testsuite/tests/roles/should_compile/Roles2.stderr
@@ -1,25 +1,19 @@
TYPE SIGNATURES
TYPE CONSTRUCTORS
data T1 a = K1 (IO a)
+ Kind: * -> *
type role T2 phantom
data T2 a = K2 (FunPtr a)
+ Kind: * -> *
COERCION AXIOMS
Dependent modules: []
Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
integer-gmp-1.0.0.0]
==================== Typechecker ====================
-Roles2.$tcT2
- = TyCon
- 5934726586329293381##
- 1923031187495159753##
- Roles2.$trModule
- (TrNameS "T2"#)
-Roles2.$tcT1
- = TyCon
- 13879106829711353992##
- 15151456821588362072##
- Roles2.$trModule
- (TrNameS "T1"#)
+Roles2.$tcT2 = TyCon 0## 0## Roles2.$trModule (TrNameS "T2"#)
+Roles2.$tc'K2 = TyCon 0## 0## Roles2.$trModule (TrNameS "'K2"#)
+Roles2.$tcT1 = TyCon 0## 0## Roles2.$trModule (TrNameS "T1"#)
+Roles2.$tc'K1 = TyCon 0## 0## Roles2.$trModule (TrNameS "'K1"#)
Roles2.$trModule = Module (TrNameS "main"#) (TrNameS "Roles2"#)
diff --git a/testsuite/tests/roles/should_compile/Roles3.stderr b/testsuite/tests/roles/should_compile/Roles3.stderr
index f09760224a..e2f304dc56 100644
--- a/testsuite/tests/roles/should_compile/Roles3.stderr
+++ b/testsuite/tests/roles/should_compile/Roles3.stderr
@@ -7,13 +7,15 @@ TYPE CONSTRUCTORS
meth2 :: a ~ b => a -> b
{-# MINIMAL meth2 #-}
class C3 a b where
- type family F3 b :: * open
+ type family F3 b open
+ Kind: * -> *
meth3 :: a -> F3 b -> F3 b
{-# MINIMAL meth3 #-}
class C4 a b where
meth4 :: a -> F4 b -> F4 b
{-# MINIMAL meth4 #-}
- type family F4 a :: * open
+ type family F4 a open
+ Kind: * -> *
type Syn1 a = F4 a
type Syn2 a = [a]
COERCION AXIOMS
@@ -29,29 +31,13 @@ Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
integer-gmp-1.0.0.0]
==================== Typechecker ====================
-Roles3.$tcC4
- = TyCon
- 12861862461396457184##
- 6389612623460961504##
- Roles3.$trModule
- (TrNameS "C4"#)
-Roles3.$tcC3
- = TyCon
- 5998139369941479154##
- 6816352641934636458##
- Roles3.$trModule
- (TrNameS "C3"#)
-Roles3.$tcC2
- = TyCon
- 8833962732139387711##
- 7891126688522429937##
- Roles3.$trModule
- (TrNameS "C2"#)
-Roles3.$tcC1
- = TyCon
- 16242970448469140073##
- 10229725431456576413##
- Roles3.$trModule
- (TrNameS "C1"#)
+Roles3.$tcC4 = TyCon 0## 0## Roles3.$trModule (TrNameS "C4"#)
+Roles3.$tc'D:C4 = TyCon 0## 0## Roles3.$trModule (TrNameS "'D:C4"#)
+Roles3.$tcC3 = TyCon 0## 0## Roles3.$trModule (TrNameS "C3"#)
+Roles3.$tc'D:C3 = TyCon 0## 0## Roles3.$trModule (TrNameS "'D:C3"#)
+Roles3.$tcC2 = TyCon 0## 0## Roles3.$trModule (TrNameS "C2"#)
+Roles3.$tc'D:C2 = TyCon 0## 0## Roles3.$trModule (TrNameS "'D:C2"#)
+Roles3.$tcC1 = TyCon 0## 0## Roles3.$trModule (TrNameS "C1"#)
+Roles3.$tc'D:C1 = TyCon 0## 0## Roles3.$trModule (TrNameS "'D:C1"#)
Roles3.$trModule = Module (TrNameS "main"#) (TrNameS "Roles3"#)
diff --git a/testsuite/tests/roles/should_compile/Roles4.stderr b/testsuite/tests/roles/should_compile/Roles4.stderr
index 67b75cde86..fb6e88a597 100644
--- a/testsuite/tests/roles/should_compile/Roles4.stderr
+++ b/testsuite/tests/roles/should_compile/Roles4.stderr
@@ -16,17 +16,9 @@ Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
integer-gmp-1.0.0.0]
==================== Typechecker ====================
-Roles4.$tcC3
- = TyCon
- 16502190608089501863##
- 13971441568961069854##
- Roles4.$trModule
- (TrNameS "C3"#)
-Roles4.$tcC1
- = TyCon
- 11951908835899020229##
- 6518430686554778113##
- Roles4.$trModule
- (TrNameS "C1"#)
+Roles4.$tcC3 = TyCon 0## 0## Roles4.$trModule (TrNameS "C3"#)
+Roles4.$tc'D:C3 = TyCon 0## 0## Roles4.$trModule (TrNameS "'D:C3"#)
+Roles4.$tcC1 = TyCon 0## 0## Roles4.$trModule (TrNameS "C1"#)
+Roles4.$tc'D:C1 = TyCon 0## 0## Roles4.$trModule (TrNameS "'D:C1"#)
Roles4.$trModule = Module (TrNameS "main"#) (TrNameS "Roles4"#)
diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr
index efb7488564..9ffe72ad16 100644
--- a/testsuite/tests/roles/should_compile/T8958.stderr
+++ b/testsuite/tests/roles/should_compile/T8958.stderr
@@ -5,7 +5,7 @@ TYPE SIGNATURES
TYPE CONSTRUCTORS
type role Map nominal representational
newtype (Nominal k, Representational v) => Map k v = MkMap [(k, v)]
- Promotable
+ Kind: * -> * -> *
class Nominal a
type role Representational representational
class Representational a
@@ -25,8 +25,12 @@ T8958.$tcMap = TyCon 0## 0## T8958.$trModule (TrNameS "Map"#)
T8958.$tc'MkMap = TyCon 0## 0## T8958.$trModule (TrNameS "'MkMap"#)
T8958.$tcRepresentational
= TyCon 0## 0## T8958.$trModule (TrNameS "Representational"#)
+T8958.$tc'D:Representational
+ = TyCon 0## 0## T8958.$trModule (TrNameS "'D:Representational"#)
T8958.$tcNominal
= TyCon 0## 0## T8958.$trModule (TrNameS "Nominal"#)
+T8958.$tc'D:Nominal
+ = TyCon 0## 0## T8958.$trModule (TrNameS "'D:Nominal"#)
T8958.$trModule = Module (TrNameS "main"#) (TrNameS "T8958"#)
AbsBinds [a] []
{Exports: [T8958.$fRepresentationala <= $dRepresentational
diff --git a/testsuite/tests/roles/should_compile/all.T b/testsuite/tests/roles/should_compile/all.T
index b740d8ad3e..25a4a37272 100644
--- a/testsuite/tests/roles/should_compile/all.T
+++ b/testsuite/tests/roles/should_compile/all.T
@@ -1,9 +1,9 @@
-test('Roles1', only_ways('normal'), compile, ['-ddump-tc -fprint-explicit-foralls'])
-test('Roles2', only_ways('normal'), compile, ['-ddump-tc -fprint-explicit-foralls'])
-test('Roles3', only_ways('normal'), compile, ['-ddump-tc'])
-test('Roles4', only_ways('normal'), compile, ['-ddump-tc'])
+test('Roles1', only_ways('normal'), compile, ['-ddump-tc -fprint-explicit-foralls -dsuppress-uniques'])
+test('Roles2', only_ways('normal'), compile, ['-ddump-tc -fprint-explicit-foralls -dsuppress-uniques'])
+test('Roles3', only_ways('normal'), compile, ['-ddump-tc -dsuppress-uniques'])
+test('Roles4', only_ways('normal'), compile, ['-ddump-tc -dsuppress-uniques'])
test('Roles13', only_ways('normal'), compile, ['-ddump-simpl -dsuppress-uniques'])
-test('Roles14', only_ways('normal'), compile, ['-ddump-tc'])
+test('Roles14', only_ways('normal'), compile, ['-ddump-tc -dsuppress-uniques'])
test('T8958', [normalise_fun(normalise_errmsg), only_ways('normal')], compile, ['-ddump-tc -dsuppress-uniques'])
test('T10263', normal, compile, [''])
test('T9204b', extra_clean(['T9204b.o-boot', 'T9204b.hi-boot', 'T9204b2.hi', 'T9204b2.o']), multimod_compile, ['T9204b', '-v0'])
diff --git a/testsuite/tests/rts/T9045.hs b/testsuite/tests/rts/T9045.hs
index 1e581efa35..f01bf84e38 100644
--- a/testsuite/tests/rts/T9045.hs
+++ b/testsuite/tests/rts/T9045.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE ImpredicativeTypes #-}
-- This is nofib/smp/threads006. It fails in GHC 7.8.2 with a GC crash.
{-# OPTIONS_GHC -O2 #-}
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index eb6d74291c..a804768fa3 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -14,7 +14,7 @@ T11155:
T8274:
$(RM) -f T8274.o T8274.hi
- '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl T8274.hs | grep '#'
+ '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-uniques T8274.hs | grep '#'
T7865:
$(RM) -f T7865.o T7865.hi
diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr
index 1cd13301f9..cc8c5a9056 100644
--- a/testsuite/tests/simplCore/should_compile/T7360.stderr
+++ b/testsuite/tests/simplCore/should_compile/T7360.stderr
@@ -1,6 +1,6 @@
==================== Tidy Core ====================
-Result size of Tidy Core = {terms: 55, types: 34, coercions: 0}
+Result size of Tidy Core = {terms: 82, types: 42, coercions: 0}
-- RHS size: {terms: 6, types: 3, coercions: 0}
T7360.$WFoo3 [InlPrag=INLINE] :: Int -> Foo
@@ -45,6 +45,60 @@ T7360.$trModule :: Module
T7360.$trModule = Module T7360.$trModule2 T7360.$trModule1
-- RHS size: {terms: 2, types: 0, coercions: 0}
+T7360.$tc'Foo6 :: TrName
+[GblId,
+ Caf=NoCafRefs,
+ Str=DmdType m1,
+ Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
+T7360.$tc'Foo6 = TrNameS "'Foo3"#
+
+-- RHS size: {terms: 5, types: 0, coercions: 0}
+T7360.$tc'Foo3 :: TyCon
+[GblId[ReflectionId],
+ Caf=NoCafRefs,
+ Str=DmdType m,
+ Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 50}]
+T7360.$tc'Foo3 = TyCon 0## 0## T7360.$trModule T7360.$tc'Foo6
+
+-- RHS size: {terms: 2, types: 0, coercions: 0}
+T7360.$tc'Foo5 :: TrName
+[GblId,
+ Caf=NoCafRefs,
+ Str=DmdType m1,
+ Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
+T7360.$tc'Foo5 = TrNameS "'Foo2"#
+
+-- RHS size: {terms: 5, types: 0, coercions: 0}
+T7360.$tc'Foo2 :: TyCon
+[GblId[ReflectionId],
+ Caf=NoCafRefs,
+ Str=DmdType m,
+ Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 50}]
+T7360.$tc'Foo2 = TyCon 0## 0## T7360.$trModule T7360.$tc'Foo5
+
+-- RHS size: {terms: 2, types: 0, coercions: 0}
+T7360.$tc'Foo4 :: TrName
+[GblId,
+ Caf=NoCafRefs,
+ Str=DmdType m1,
+ Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
+T7360.$tc'Foo4 = TrNameS "'Foo1"#
+
+-- RHS size: {terms: 5, types: 0, coercions: 0}
+T7360.$tc'Foo1 :: TyCon
+[GblId[ReflectionId],
+ Caf=NoCafRefs,
+ Str=DmdType m,
+ Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 50}]
+T7360.$tc'Foo1 = TyCon 0## 0## T7360.$trModule T7360.$tc'Foo4
+
+-- RHS size: {terms: 2, types: 0, coercions: 0}
T7360.$tcFoo1 :: TrName
[GblId,
Caf=NoCafRefs,
@@ -84,7 +138,7 @@ T7360.fun4 :: Int
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
T7360.fun4 = I# 0#
--- RHS size: {terms: 16, types: 12, coercions: 0}
+-- RHS size: {terms: 16, types: 13, coercions: 0}
fun2 :: forall a. [a] -> ((), Int)
[GblId,
Arity=1,
diff --git a/testsuite/tests/simplCore/should_compile/T8274.stdout b/testsuite/tests/simplCore/should_compile/T8274.stdout
index 6c0e36f8f9..8d4236b282 100644
--- a/testsuite/tests/simplCore/should_compile/T8274.stdout
+++ b/testsuite/tests/simplCore/should_compile/T8274.stdout
@@ -1,10 +1,12 @@
T8274.$trModule2 = TrNameS "main"#
T8274.$trModule1 = TrNameS "T8274"#
+T8274.$tc'Positives1 = TrNameS "'Positives"#
+ TyCon 0## 0## T8274.$trModule T8274.$tc'Positives1
T8274.$tcP1 = TrNameS "P"#
- 11095028091707994303##
- 9476557054198009608##
+T8274.$tcP = TyCon 0## 0## T8274.$trModule T8274.$tcP1
+T8274.$tc'Negatives1 = TrNameS "'Negatives"#
+ TyCon 0## 0## T8274.$trModule T8274.$tc'Negatives1
T8274.$tcN1 = TrNameS "N"#
- 7479687563082171902##
- 17616649989360543185##
+T8274.$tcN = TyCon 0## 0## T8274.$trModule T8274.$tcN1
p = T8274.Positives 42# 4.23# 4.23## '4'# 4##
n = T8274.Negatives -4# -4.0# -4.0##
diff --git a/testsuite/tests/simplCore/should_compile/T9400.stderr b/testsuite/tests/simplCore/should_compile/T9400.stderr
index 3bc95e42cc..cdf770b3f9 100644
--- a/testsuite/tests/simplCore/should_compile/T9400.stderr
+++ b/testsuite/tests/simplCore/should_compile/T9400.stderr
@@ -1,6 +1,6 @@
==================== Tidy Core ====================
-Result size of Tidy Core = {terms: 33, types: 19, coercions: 0}
+Result size of Tidy Core = {terms: 33, types: 20, coercions: 0}
-- RHS size: {terms: 2, types: 0, coercions: 0}
a :: TrName
@@ -17,7 +17,7 @@ T9400.$trModule :: Module
[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType]
T9400.$trModule = Module a a1
--- RHS size: {terms: 22, types: 14, coercions: 0}
+-- RHS size: {terms: 22, types: 15, coercions: 0}
main :: IO ()
[GblId, Str=DmdType]
main =
@@ -45,7 +45,7 @@ main =
@ ()
@ ()
(putStrLn (unpackCString# "efg"#))
- (patError @ (IO ()) "T9400.hs:(17,5)-(18,29)|case"#))))
+ (patError @ 'Lifted @ (IO ()) "T9400.hs:(17,5)-(18,29)|case"#))))
diff --git a/testsuite/tests/simplCore/should_compile/rule2.stderr b/testsuite/tests/simplCore/should_compile/rule2.stderr
index f18696489c..844afc63d6 100644
--- a/testsuite/tests/simplCore/should_compile/rule2.stderr
+++ b/testsuite/tests/simplCore/should_compile/rule2.stderr
@@ -21,12 +21,12 @@ Total ticks: 13
1 EtaReduction 1 ds
7 BetaReduction
1 f
- 1 m
1 a
- 1 b
1 m
+ 1 b
1 m
1 b
+ 1 m
9 SimplifierDone 9
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
index 17d3dbbdc5..09ae2f3ecb 100644
--- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr
+++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
@@ -1,6 +1,6 @@
==================== Tidy Core ====================
-Result size of Tidy Core = {terms: 172, types: 64, coercions: 0}
+Result size of Tidy Core = {terms: 172, types: 65, coercions: 0}
-- RHS size: {terms: 2, types: 0, coercions: 0}
Roman.$trModule2 :: TrName
@@ -29,11 +29,12 @@ Roman.$trModule :: Module
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Roman.$trModule = Module Roman.$trModule2 Roman.$trModule1
--- RHS size: {terms: 2, types: 1, coercions: 0}
+-- RHS size: {terms: 2, types: 2, coercions: 0}
Roman.foo3 :: Int
[GblId, Str=DmdType b]
Roman.foo3 =
- patError @ Int "spec-inline.hs:(19,5)-(29,25)|function go"#
+ patError
+ @ 'Lifted @ Int "spec-inline.hs:(19,5)-(29,25)|function go"#
Rec {
-- RHS size: {terms: 55, types: 9, coercions: 0}
diff --git a/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr b/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr
index aa7a2ef8b6..d06e4ca86a 100644
--- a/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr
+++ b/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr
@@ -1,5 +1,7 @@
==================== Strictness signatures ====================
+DmdAnalGADTs.$tc'A: m
+DmdAnalGADTs.$tc'B: m
DmdAnalGADTs.$tcD: m
DmdAnalGADTs.$trModule: m
DmdAnalGADTs.diverges: b
diff --git a/testsuite/tests/stranal/sigs/T8569.stderr b/testsuite/tests/stranal/sigs/T8569.stderr
index 3013d769fb..84636c1916 100644
--- a/testsuite/tests/stranal/sigs/T8569.stderr
+++ b/testsuite/tests/stranal/sigs/T8569.stderr
@@ -1,5 +1,7 @@
==================== Strictness signatures ====================
+T8569.$tc'Rdata: m
+T8569.$tc'Rint: m
T8569.$tcRep: m
T8569.$trModule: m
T8569.addUp: <S,1*U><L,U>
diff --git a/testsuite/tests/th/T3177a.stderr b/testsuite/tests/th/T3177a.stderr
index 33093fa2b1..fa80d0e864 100644
--- a/testsuite/tests/th/T3177a.stderr
+++ b/testsuite/tests/th/T3177a.stderr
@@ -1,10 +1,12 @@
-
-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
+
+T3177a.hs:8:8: error:
+ • Expecting one fewer argument to ‘Int’
+ Expected kind ‘* -> *’, but ‘Int’ has kind ‘*’
+ • In the type signature:
+ f :: Int Int
+
+T3177a.hs:11:6: error:
+ • Expecting one fewer argument to ‘Int’
+ Expected kind ‘* -> *’, but ‘Int’ has kind ‘*’
+ • In the type signature:
+ g :: Int Int
diff --git a/testsuite/tests/th/T3920.hs b/testsuite/tests/th/T3920.hs
index 4d7ccef509..309ca8eeb2 100644
--- a/testsuite/tests/th/T3920.hs
+++ b/testsuite/tests/th/T3920.hs
@@ -9,7 +9,7 @@ $(return [])
test :: String
test = $(do
- test <- [d|
+ test <- [d|
type family T :: (* -> (* -> * -> *)) -> (* -> *) -> * |]
blah <- reify ''S
return (LitE (StringL (pprint test ++ "\n" ++ pprint blah))))
diff --git a/testsuite/tests/th/T7021a.hs b/testsuite/tests/th/T7021a.hs
index b07ef55196..f2bc8f1891 100644
--- a/testsuite/tests/th/T7021a.hs
+++ b/testsuite/tests/th/T7021a.hs
@@ -3,7 +3,7 @@
module T7021a where
-import GHC.Prim
+import GHC.Exts
import Language.Haskell.TH
type IOable a = (Show a, Read a)
diff --git a/testsuite/tests/th/T8953.stderr b/testsuite/tests/th/T8953.stderr
index 94312eff6a..c18589d69c 100644
--- a/testsuite/tests/th/T8953.stderr
+++ b/testsuite/tests/th/T8953.stderr
@@ -15,5 +15,5 @@ type instance T8953.F GHC.Types.Char = (T8953.G (T8953.T1 :: * ->
(* -> *) -> *)
GHC.Types.Bool :: (* -> *) -> *)
type family T8953.G (a_0 :: k_1) :: k_1
-type instance T8953.G (T8953.T1 :: k_2 ->
- k1_3 -> *) = (T8953.T2 :: k_2 -> k1_3 -> *)
+type instance T8953.G (T8953.T1 :: k1_2 ->
+ k2_3 -> *) = (T8953.T2 :: k1_2 -> k2_3 -> *)
diff --git a/testsuite/tests/th/TH_RichKinds.hs b/testsuite/tests/th/TH_RichKinds.hs
index 69e4239f43..3ec2dd8e8e 100644
--- a/testsuite/tests/th/TH_RichKinds.hs
+++ b/testsuite/tests/th/TH_RichKinds.hs
@@ -6,7 +6,7 @@
module TH_RichKinds where
-import GHC.Prim
+import GHC.Exts
import Language.Haskell.TH
$(do tys <- sequence [ [t| forall a. (a :: Bool) |]
diff --git a/testsuite/tests/th/TH_RichKinds.stderr b/testsuite/tests/th/TH_RichKinds.stderr
index 09a8e40bf8..eb402902ac 100644
--- a/testsuite/tests/th/TH_RichKinds.stderr
+++ b/testsuite/tests/th/TH_RichKinds.stderr
@@ -1,9 +1,9 @@
-TH_RichKinds.hs:12:3: Warning:
+TH_RichKinds.hs:12:3: warning:
forall a_0 . (a_0 :: GHC.Types.Bool)
forall a_1 . (a_1 :: Constraint)
forall a_2 . (a_2 :: [*])
forall a_3 . (a_3 :: (*, GHC.Types.Bool))
-forall a_4 . (a_4 :: GHC.Tuple.())
+forall a_4 . (a_4 :: ())
forall a_5 . (a_5 :: (* -> GHC.Types.Bool) ->
(*, * -> *) -> GHC.Types.Bool)
diff --git a/testsuite/tests/th/TH_Roles2.stderr b/testsuite/tests/th/TH_Roles2.stderr
index 7b68958fcc..fc264b12dd 100644
--- a/testsuite/tests/th/TH_Roles2.stderr
+++ b/testsuite/tests/th/TH_Roles2.stderr
@@ -2,6 +2,7 @@ TYPE SIGNATURES
TYPE CONSTRUCTORS
type role T representational
data T (a :: k)
+ Kind: forall k1. k1 -> *
COERCION AXIOMS
Dependent modules: []
Dependent packages: [array-0.5.1.0, base-4.9.0.0, deepseq-1.4.1.1,
diff --git a/testsuite/tests/typecheck/should_compile/T5581.hs b/testsuite/tests/typecheck/should_compile/T5581.hs
index 074a2babcd..f7762831b3 100644
--- a/testsuite/tests/typecheck/should_compile/T5581.hs
+++ b/testsuite/tests/typecheck/should_compile/T5581.hs
@@ -3,7 +3,7 @@
module TcShouldTerminate where
-import GHC.Prim (Constraint)
+import Data.Kind (Constraint)
class C (p :: Constraint)
class D (p :: Constraint)
diff --git a/testsuite/tests/typecheck/should_compile/T5655.hs b/testsuite/tests/typecheck/should_compile/T5655.hs
index c2eed90abc..8db7a485a3 100644
--- a/testsuite/tests/typecheck/should_compile/T5655.hs
+++ b/testsuite/tests/typecheck/should_compile/T5655.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TypeFamilies, GADTs, ConstraintKinds, RankNTypes #-}
module T5655 where
-import GHC.Prim (Constraint)
+import Data.Kind (Constraint)
class Show a => Twice a where twice :: a -> a
diff --git a/testsuite/tests/typecheck/should_compile/T9834.stderr b/testsuite/tests/typecheck/should_compile/T9834.stderr
index 3ce53a0c51..b3a6240a6b 100644
--- a/testsuite/tests/typecheck/should_compile/T9834.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9834.stderr
@@ -1,71 +1,71 @@
-
-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
- Expected type: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- Actual type: (forall (q :: * -> *).
- Applicative q =>
- Nat (Comp p q) (Comp p q))
- -> p a0 -> p a0
- In the expression: wrapIdComp
- In an equation for ‘afix’: afix = wrapIdComp
- Relevant bindings include
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- (bound at T9834.hs:23:3)
-
-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 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)
- -> p a
- Actual type: (forall (q :: * -> *).
- Applicative q =>
- Nat (Comp p q) (Comp p q))
- -> p a0 -> p a0
- In the expression: wrapIdComp
- In an equation for ‘afix’: afix = wrapIdComp
- Relevant bindings include
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- (bound at T9834.hs:23:3)
-
-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 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
- In an equation for ‘afix’: afix = wrapIdComp
- Relevant bindings include
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- (bound at T9834.hs:23:3)
+
+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 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)
+ -> p a
+ Actual type: (forall (q :: * -> *).
+ Applicative q =>
+ Nat (Comp p q) (Comp p q))
+ -> p a0 -> p a0
+ • In the expression: wrapIdComp
+ In an equation for ‘afix’: afix = wrapIdComp
+ • Relevant bindings include
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ (bound at T9834.hs:23:3)
+
+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
+ Expected type: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ Actual type: (forall (q :: * -> *).
+ Applicative q =>
+ Nat (Comp p q) (Comp p q))
+ -> p a0 -> p a0
+ • In the expression: wrapIdComp
+ In an equation for ‘afix’: afix = wrapIdComp
+ • Relevant bindings include
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ (bound at T9834.hs:23:3)
+
+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 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
+ In an equation for ‘afix’: afix = wrapIdComp
+ • Relevant bindings include
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ (bound at T9834.hs:23:3)
diff --git a/testsuite/tests/typecheck/should_compile/T9939.stderr b/testsuite/tests/typecheck/should_compile/T9939.stderr
index 86decf0a5e..106335e8ba 100644
--- a/testsuite/tests/typecheck/should_compile/T9939.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9939.stderr
@@ -1,20 +1,20 @@
-
-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
+
+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 a
+ • 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 b5ee77b689..96858b1d3c 100644
--- a/testsuite/tests/typecheck/should_compile/tc141.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc141.stderr
@@ -7,11 +7,11 @@ tc141.hs:11:12: error:
In a pattern binding: (p :: a, q :: a) = x
tc141.hs:11:31: error:
- • Couldn't match expected type ‘a1’ with actual type ‘a’
- because type variable ‘a1’ would escape its scope
+ • Couldn't match expected type ‘a2’ with actual type ‘a’
+ because type variable ‘a2’ would escape its scope
This (rigid, skolem) type variable is bound by
an expression type signature:
- a1
+ a2
at tc141.hs:11:31-34
• In the expression: q :: a
In the expression: (q :: a, p)
@@ -19,7 +19,7 @@ tc141.hs:11:31: error:
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)
+ f :: (a, a) -> (a1, a) (bound at tc141.hs:11:1)
tc141.hs:13:13: error:
• You cannot bind scoped type variable ‘a’
@@ -34,15 +34,15 @@ tc141.hs:13:13: error:
in v
tc141.hs:15:18: error:
- • Couldn't match expected type ‘a2’ with actual type ‘t’
- because type variable ‘a2’ would escape its scope
+ • Couldn't match expected type ‘a1’ with actual type ‘r1’
+ because type variable ‘a1’ would escape its scope
This (rigid, skolem) type variable is bound by
the type signature for:
- v :: a2
+ v :: a1
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)
+ v :: a1 (bound at tc141.hs:15:14)
+ b :: r1 (bound at tc141.hs:13:5)
+ g :: r -> r1 -> a (bound at tc141.hs:13:1)
diff --git a/testsuite/tests/typecheck/should_compile/tc167.stderr b/testsuite/tests/typecheck/should_compile/tc167.stderr
index 5d869af801..634b50dd5b 100644
--- a/testsuite/tests/typecheck/should_compile/tc167.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc167.stderr
@@ -1,5 +1,6 @@
-
-tc167.hs:8:15:
- Expecting a lifted type, but ‘Int#’ is unlifted
- In the type ‘(->) Int#’
- In the type declaration for ‘T’
+
+tc167.hs:8:15:
+ Expecting a lifted type, but ‘Int#’ is unlifted
+ In the first argument of ‘(->)’, namely ‘Int#’
+ In the type ‘(->) Int#’
+ In the type declaration for ‘T’
diff --git a/testsuite/tests/typecheck/should_compile/tc211.stderr b/testsuite/tests/typecheck/should_compile/tc211.stderr
index 34a35f1781..d802dffe4e 100644
--- a/testsuite/tests/typecheck/should_compile/tc211.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc211.stderr
@@ -1,5 +1,5 @@
-tc211.hs:17:8:
+tc211.hs:17:8: error:
Couldn't match expected type ‘forall a. a -> a’
with actual type ‘a2 -> a2’
In the expression:
@@ -10,17 +10,17 @@ tc211.hs:17:8:
(forall a. a -> a) -> [forall a. a -> a] -> [forall a. a -> a])
(head foo) foo
-tc211.hs:18:22:
+tc211.hs:18:22: error:
Couldn't match type ‘forall a3. a3 -> a3’ with ‘a -> a’
- Expected type: [a -> a]
- Actual type: [forall a. a -> a]
+ Expected type: [a -> a]
+ Actual type: [forall a. a -> a]
In the first argument of ‘head’, namely ‘foo’
In the first argument of ‘(:) ::
(forall a. a -> a)
-> [forall a. a -> a] -> [forall a. a -> a]’, namely
‘(head foo)’
-tc211.hs:59:18:
+tc211.hs:59:18: error:
Couldn't match expected type ‘forall a. a -> a’
with actual type ‘a1 -> a1’
In the expression:
@@ -33,7 +33,7 @@ tc211.hs:59:18:
(forall a. a -> a)
-> List (forall a. a -> a) -> List (forall a. a -> a)
-tc211.hs:65:8:
+tc211.hs:65:8: error:
Couldn't match expected type ‘forall a. a -> a’
with actual type ‘a0 -> a0’
In the expression:
@@ -46,11 +46,11 @@ tc211.hs:65:8:
-> List (forall a. a -> a) -> List (forall a. a -> a))
(\ x -> x) Nil
-tc211.hs:73:9:
+tc211.hs:73:9: error:
Couldn't match type ‘forall a4. a4 -> a4’ with ‘a3 -> a3’
- Expected type: List (forall a. a -> a)
- -> (forall a. a -> a) -> a3 -> a3
- Actual type: List (a3 -> a3) -> (a3 -> a3) -> a3 -> a3
+ Expected type: List (forall a. a -> a)
+ -> (forall a. a -> a) -> a3 -> a3
+ Actual type: List (a3 -> a3) -> (a3 -> a3) -> a3 -> a3
In the expression:
foo2 ::
List (forall a. a -> a) -> (forall a. a -> a) -> (forall a. a -> a)
diff --git a/testsuite/tests/typecheck/should_compile/tc231.stderr b/testsuite/tests/typecheck/should_compile/tc231.stderr
index 2377c13a0f..85ccc32954 100644
--- a/testsuite/tests/typecheck/should_compile/tc231.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc231.stderr
@@ -6,9 +6,9 @@ TYPE SIGNATURES
s :: forall t t1. Q t (Z [Char]) t1 -> Q t (Z [Char]) t1
TYPE CONSTRUCTORS
data Q s a chain = Node s a chain
- Promotable
+ Kind: * -> * -> * -> *
data Z a = Z a
- Promotable
+ Kind: * -> *
class Zork s a b | a -> b where
huh :: Q s a chain -> ST s ()
{-# MINIMAL huh #-}
diff --git a/testsuite/tests/typecheck/should_compile/tc243.stderr b/testsuite/tests/typecheck/should_compile/tc243.stderr
index 31cc3c9fd2..98e0f5ae1e 100644
--- a/testsuite/tests/typecheck/should_compile/tc243.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc243.stderr
@@ -1,3 +1,3 @@
-
-tc243.hs:10:1: Warning:
- Top-level binding with no type signature: (.+.) :: forall t. t
+
+tc243.hs:10:1: Warning:
+ Top-level binding with no type signature: (.+.) :: forall r. r
diff --git a/testsuite/tests/typecheck/should_compile/tc255.hs b/testsuite/tests/typecheck/should_compile/tc255.hs
index d77a7b688b..e5690bb08d 100644
--- a/testsuite/tests/typecheck/should_compile/tc255.hs
+++ b/testsuite/tests/typecheck/should_compile/tc255.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TypeFamilies, ConstraintKinds, UndecidableInstances #-}
module Ctx where
-import GHC.Prim( Constraint )
+import Data.Kind ( Constraint )
type family Indirect :: * -> Constraint
type instance Indirect = Show
diff --git a/testsuite/tests/typecheck/should_compile/tc256.hs b/testsuite/tests/typecheck/should_compile/tc256.hs
index f06eabf1c3..d33f7a6401 100644
--- a/testsuite/tests/typecheck/should_compile/tc256.hs
+++ b/testsuite/tests/typecheck/should_compile/tc256.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TypeFamilies, ConstraintKinds, UndecidableInstances #-}
module Ctx where
-import GHC.Prim( Constraint )
+import Data.Kind ( Constraint )
type family Indirect :: * -> Constraint
type instance Indirect = Show
diff --git a/testsuite/tests/typecheck/should_compile/tc257.hs b/testsuite/tests/typecheck/should_compile/tc257.hs
index efab2df224..d5742aa779 100644
--- a/testsuite/tests/typecheck/should_compile/tc257.hs
+++ b/testsuite/tests/typecheck/should_compile/tc257.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE KindSignatures, ConstraintKinds, MultiParamTypeClasses, FlexibleInstances, UndecidableInstances #-}
module Ctx where
-import GHC.Prim( Constraint )
+import Data.Kind ( Constraint )
data Proxy (ctxt :: * -> Constraint) = Proxy
@@ -22,4 +22,4 @@ instance ctxt Int => Foo ctxt Int where
-- from the context (ctxt Int)
-- The problem was that irreducible evidence did not interact with
--- evidence of equal type. \ No newline at end of file
+-- evidence of equal type.
diff --git a/testsuite/tests/typecheck/should_compile/tc258.hs b/testsuite/tests/typecheck/should_compile/tc258.hs
index 353ec94c43..a4dca19526 100644
--- a/testsuite/tests/typecheck/should_compile/tc258.hs
+++ b/testsuite/tests/typecheck/should_compile/tc258.hs
@@ -2,7 +2,7 @@
module AltPrelude where
-import GHC.Prim (Constraint)
+import Data.Kind (Constraint)
class MyFunctor f where
type FunctorCtxt f a :: Constraint
diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr b/testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr
index 4fbaaef199..71fc77d4ed 100644
--- a/testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr
+++ b/testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr
@@ -1,7 +1,7 @@
-
-AssocTyDef04.hs:6:18:
- Expecting one more argument to ‘Maybe’
- Expected kind ‘*’, but ‘Maybe’ has kind ‘* -> *’
- In the type ‘Maybe’
- In the default type instance declaration for ‘Typ’
- In the class declaration for ‘Cls’
+
+AssocTyDef04.hs:6:18:
+ Expecting one more argument to ‘Maybe’
+ Expected a type, but ‘Maybe’ has kind ‘* -> *’
+ In the type ‘Maybe’
+ In the default type instance declaration for ‘Typ’
+ In the class declaration for ‘Cls’
diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef06.hs b/testsuite/tests/typecheck/should_fail/AssocTyDef06.hs
index fb595a3e27..e4f45669b7 100644
--- a/testsuite/tests/typecheck/should_fail/AssocTyDef06.hs
+++ b/testsuite/tests/typecheck/should_fail/AssocTyDef06.hs
@@ -3,5 +3,5 @@ module AssocTyDef06 where
class Cls a where
type Typ a
- type Typ a Int = Int
- -- Too many params for default \ No newline at end of file
+ type Typ a b = Int
+ -- Too many params for default
diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr b/testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr
index 665ad223d2..d51ce8ff6c 100644
--- a/testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr
+++ b/testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr
@@ -1,6 +1,5 @@
-
-AssocTyDef06.hs:6:16:
- Unexpected type ‘Int’
- In the default declaration for ‘Typ’
- A default declaration should have form
- default Typ a b = ...
+
+AssocTyDef06.hs:6:5:
+ Number of parameters must match family declaration; expected 1
+ In the default type instance declaration for ‘Typ’
+ In the class declaration for ‘Cls’
diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
index b545a10caa..6abb044c8e 100644
--- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
+++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
@@ -1,52 +1,47 @@
-FrozenErrorTests.hs:12:12:
- Couldn't match type ‘Int’ with ‘Bool’
- Inaccessible code in
- a pattern with constructor: MkT3 :: forall a. (a ~ Bool) => T a,
- in a case alternative
- In the pattern: MkT3
- In a case alternative: MkT3 -> ()
- In the expression: case x of { MkT3 -> () }
+FrozenErrorTests.hs:12:12: error:
+ • Couldn't match type ‘Int’ with ‘Bool’
+ Inaccessible code in
+ a pattern with constructor: MkT3 :: forall a. (a ~ Bool) => T a,
+ in a case alternative
+ • In the pattern: MkT3
+ In a case alternative: MkT3 -> ()
+ In the expression: case x of { MkT3 -> () }
-FrozenErrorTests.hs:26:9:
- Occurs check: cannot construct the infinite type: a ~ [a]
- Expected type: [a]
- Actual type: F a Bool
- In the expression: goo1 False undefined
- In an equation for ‘test1’: test1 = goo1 False undefined
- Relevant bindings include
- test1 :: a (bound at FrozenErrorTests.hs:26:1)
+FrozenErrorTests.hs:26:9: error:
+ • Occurs check: cannot construct the infinite type: a ~ [a]
+ arising from a use of ‘goo1’
+ • In the expression: goo1 False undefined
+ In an equation for ‘test1’: test1 = goo1 False undefined
+ • Relevant bindings include
+ test1 :: a (bound at FrozenErrorTests.hs:26:1)
-FrozenErrorTests.hs:29:15:
- Couldn't match type ‘Int’ with ‘[Int]’
- Expected type: [[Int]]
- Actual type: F [Int] Bool
- In the first argument of ‘goo2’, namely ‘(goo1 False undefined)’
- In the expression: goo2 (goo1 False undefined)
- In an equation for ‘test2’: test2 = goo2 (goo1 False undefined)
+FrozenErrorTests.hs:29:15: error:
+ • Couldn't match type ‘Int’ with ‘[Int]’
+ arising from a use of ‘goo1’
+ • In the first argument of ‘goo2’, namely ‘(goo1 False undefined)’
+ In the expression: goo2 (goo1 False undefined)
+ In an equation for ‘test2’: test2 = goo2 (goo1 False undefined)
-FrozenErrorTests.hs:30:9:
- Couldn't match type ‘Int’ with ‘[Int]’
- Expected type: [[Int]]
- Actual type: F [Int] Bool
- In the expression: goo1 False (goo2 undefined)
- In an equation for ‘test3’: test3 = goo1 False (goo2 undefined)
+FrozenErrorTests.hs:30:9: error:
+ • Couldn't match type ‘Int’ with ‘[Int]’
+ arising from a use of ‘goo1’
+ • In the expression: goo1 False (goo2 undefined)
+ In an equation for ‘test3’: test3 = goo1 False (goo2 undefined)
-FrozenErrorTests.hs:45:15:
- Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
- Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
- Actual type: F (T2 (T2 c c) c) Bool
- In the first argument of ‘goo4’, namely ‘(goo3 False undefined)’
- In the expression: goo4 (goo3 False undefined)
- In an equation for ‘test4’: test4 = goo4 (goo3 False undefined)
- Relevant bindings include
- test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
+FrozenErrorTests.hs:45:15: error:
+ • Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
+ arising from a use of ‘goo3’
+ • In the first argument of ‘goo4’, namely ‘(goo3 False undefined)’
+ In the expression: goo4 (goo3 False undefined)
+ In an equation for ‘test4’: test4 = goo4 (goo3 False undefined)
+ • Relevant bindings include
+ test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
-FrozenErrorTests.hs:46:9:
- Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
- Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
- Actual type: F (T2 (T2 c c) c) Bool
- In the expression: goo3 False (goo4 undefined)
- In an equation for ‘test5’: test5 = goo3 False (goo4 undefined)
- Relevant bindings include
- test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
+FrozenErrorTests.hs:46:9: error:
+ • Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
+ arising from a use of ‘goo3’
+ • In the expression: goo3 False (goo4 undefined)
+ In an equation for ‘test5’: test5 = goo3 False (goo4 undefined)
+ • Relevant bindings include
+ test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
diff --git a/testsuite/tests/typecheck/should_fail/T10285.stderr b/testsuite/tests/typecheck/should_fail/T10285.stderr
index b7bba0f575..ebc5f97503 100644
--- a/testsuite/tests/typecheck/should_fail/T10285.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10285.stderr
@@ -3,7 +3,7 @@ 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).
+ Coercion :: forall k (a :: k) (b :: k).
Coercible a b =>
Coercion a b,
in an equation for ‘oops’
diff --git a/testsuite/tests/typecheck/should_fail/T11112.stderr b/testsuite/tests/typecheck/should_fail/T11112.stderr
index 3534d33b51..ec2154c8ce 100644
--- a/testsuite/tests/typecheck/should_fail/T11112.stderr
+++ b/testsuite/tests/typecheck/should_fail/T11112.stderr
@@ -1,5 +1,5 @@
T11112.hs:3:9: error:
- • Constraint ‘Ord s’ used as a type
+ • Expected a type, but ‘Ord s’ has kind ‘Constraint’
• In the type signature:
sort :: Ord s -> [s] -> [s]
diff --git a/testsuite/tests/typecheck/should_fail/T1633.hs b/testsuite/tests/typecheck/should_fail/T1633.hs
index 3fff8f2540..fb95956774 100644
--- a/testsuite/tests/typecheck/should_fail/T1633.hs
+++ b/testsuite/tests/typecheck/should_fail/T1633.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE FlexibleInstances #-}
+
-- This just tests what the kind error message looks like
-- Trac #1633
diff --git a/testsuite/tests/typecheck/should_fail/T1633.stderr b/testsuite/tests/typecheck/should_fail/T1633.stderr
index 63eced334d..300e6c3def 100644
--- a/testsuite/tests/typecheck/should_fail/T1633.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1633.stderr
@@ -1,5 +1,5 @@
-T1633.hs:6:18:
- The first argument of ‘Functor’ should have kind ‘* -> *’,
- but ‘Bool’ has kind ‘*’
+T1633.hs:8:18: error:
+ Expected kind ‘* -> *’, but ‘Bool’ has kind ‘*’
+ In the first argument of ‘Functor’, namely ‘Bool’
In the instance declaration for ‘Functor Bool’
diff --git a/testsuite/tests/typecheck/should_fail/T2994.stderr b/testsuite/tests/typecheck/should_fail/T2994.stderr
index 83e96b45da..e833cd637d 100644
--- a/testsuite/tests/typecheck/should_fail/T2994.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2994.stderr
@@ -1,16 +1,36 @@
-T2994.hs:11:10:
+T2994.hs:11:10: error:
Expecting one more argument to ‘MonadReader Int’
Expected a constraint,
but ‘MonadReader Int’ has kind ‘* -> Constraint’
In the instance declaration for ‘MonadReader Int’
-T2994.hs:13:23:
+T2994.hs:11:10: error:
+ Malformed instance head: MonadReader Int
+ In the instance declaration for ‘MonadReader Int’
+
+T2994.hs:13:10: error:
+ Expecting one more argument to ‘MonadReader (Reader' r)’
+ Expected a constraint,
+ but ‘MonadReader (Reader' r)’ has kind ‘* -> Constraint’
+ In the instance declaration for ‘MonadReader (Reader' r)’
+
+T2994.hs:13:10: error:
+ Malformed instance head: MonadReader (Reader' r)
+ In the instance declaration for ‘MonadReader (Reader' r)’
+
+T2994.hs:13:23: error:
Expecting one more argument to ‘Reader' r’
- The first argument of ‘MonadReader’ should have kind ‘*’,
- but ‘Reader' r’ has kind ‘* -> *’
+ Expected a type, but ‘Reader' r’ has kind ‘* -> *’
+ In the first argument of ‘MonadReader’, namely ‘Reader' r’
In the instance declaration for ‘MonadReader (Reader' r)’
-T2994.hs:15:10:
- ‘MonadReader’ is applied to too many type arguments
+T2994.hs:15:10: error:
+ Expecting one fewer argument to ‘MonadReader r r’
+ Expected kind ‘(* -> *) -> Constraint’,
+ but ‘MonadReader r r’ has kind ‘Constraint’
+ In the instance declaration for ‘MonadReader r r (Reader' r)’
+
+T2994.hs:15:10: error:
+ Malformed instance head: MonadReader r r (Reader' r)
In the instance declaration for ‘MonadReader r r (Reader' r)’
diff --git a/testsuite/tests/typecheck/should_fail/T3540.stderr b/testsuite/tests/typecheck/should_fail/T3540.stderr
index 75c9dc2ea1..03cd6565fc 100644
--- a/testsuite/tests/typecheck/should_fail/T3540.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3540.stderr
@@ -1,25 +1,37 @@
T3540.hs:4:12: error:
- • Constraint ‘a ~ Int’ used as a type
+ • Expected a type, but ‘a ~ Int’ has kind ‘Constraint’
• In the type signature:
thing :: a ~ Int
T3540.hs:7:20: error:
- • Constraint ‘a ~ Int’ used as a type
+ • Expected a type, but ‘a ~ Int’ has kind ‘Constraint’
• In the type signature:
thing1 :: Int -> (a ~ Int)
T3540.hs:10:13: error:
- • Constraint ‘a ~ Int’ used as a type
+ • Expected a type, but ‘a ~ Int’ has kind ‘Constraint’
• In the type signature:
thing2 :: (a ~ Int) -> Int
T3540.hs:13:12: error:
- • Constraint ‘?dude :: Int’ used as a type
+ • Expected a type, but ‘?dude::Int’ has kind ‘Constraint’
• In the type signature:
thing3 :: (?dude :: Int) -> Int
+T3540.hs:16:10: error:
+ • Could not deduce (Eq a0)
+ from the context: Eq a
+ bound by the type signature for:
+ thing4 :: Eq a => Int
+ at T3540.hs:16:10-22
+ The type variable ‘a0’ is ambiguous
+ • In the ambiguity check for ‘thing4’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature:
+ thing4 :: (Eq a) -> Int
+
T3540.hs:16:11: error:
- • Constraint ‘Eq a’ used as a type
+ • Expected a type, but ‘Eq a’ has kind ‘Constraint’
• In the type signature:
thing4 :: (Eq a) -> Int
diff --git a/testsuite/tests/typecheck/should_fail/T3950.stderr b/testsuite/tests/typecheck/should_fail/T3950.stderr
index 1771e2f5e4..fab70fd01b 100644
--- a/testsuite/tests/typecheck/should_fail/T3950.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3950.stderr
@@ -1,12 +1,12 @@
-T3950.hs:15:13:
- Couldn't match kind ‘* -> *’ with ‘*’
- When matching types
- w :: (* -> * -> *) -> *
- Sealed :: (* -> *) -> *
- Expected type: w (Id p)
- Actual type: Sealed (Id p0 x0)
- In the first argument of ‘Just’, namely ‘rp'’
- In the expression: Just rp'
- Relevant bindings include
- rp :: Bool -> Maybe (w (Id p)) (bound at T3950.hs:15:1)
+T3950.hs:15:13: error:
+ • Couldn't match kind ‘* -> *’ with ‘*’
+ When matching types
+ w :: (* -> * -> *) -> *
+ Sealed :: (* -> *) -> *
+ Expected type: w (Id p)
+ Actual type: Sealed (Id p x0)
+ • In the first argument of ‘Just’, namely ‘rp'’
+ In the expression: Just rp'
+ • Relevant bindings include
+ rp :: Bool -> Maybe (w (Id p)) (bound at T3950.hs:15:1)
diff --git a/testsuite/tests/typecheck/should_fail/T4875.stderr b/testsuite/tests/typecheck/should_fail/T4875.stderr
index 98584a44f0..80e1e0e99d 100644
--- a/testsuite/tests/typecheck/should_fail/T4875.stderr
+++ b/testsuite/tests/typecheck/should_fail/T4875.stderr
@@ -1,5 +1,7 @@
-
-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’
+
+T4875.hs:27:24: error:
+ • Expecting one fewer argument to ‘r’
+ Expected kind ‘* -> *’, but ‘r’ has kind ‘*’
+ • In the type signature:
+ multiplicities :: r c -> [c]
+ In the class declaration for ‘Morphic’
diff --git a/testsuite/tests/typecheck/should_fail/T5570.stderr b/testsuite/tests/typecheck/should_fail/T5570.stderr
index 45cdfd5679..8c4ace5173 100644
--- a/testsuite/tests/typecheck/should_fail/T5570.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5570.stderr
@@ -1,9 +1,7 @@
T5570.hs:7:16: error:
- Couldn't match kind ‘*’ with ‘#’
- When matching types
- r0 :: *
- Double# :: #
- In the second argument of ‘($)’, namely ‘D# $ 3.0##’
- In the expression: print $ D# $ 3.0##
- In an equation for ‘main’: main = print $ D# $ 3.0##
+ • Couldn't match a lifted type with an unlifted type
+ When matching the kind of ‘Double#’
+ • In the second argument of ‘($)’, namely ‘D# $ 3.0##’
+ In the expression: print $ D# $ 3.0##
+ In an equation for ‘main’: main = print $ D# $ 3.0##
diff --git a/testsuite/tests/typecheck/should_fail/T5853.stderr b/testsuite/tests/typecheck/should_fail/T5853.stderr
index 231d57dcdd..dc23d4a064 100644
--- a/testsuite/tests/typecheck/should_fail/T5853.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5853.stderr
@@ -1,18 +1,23 @@
T5853.hs:15:52: error:
- Could not deduce: Subst t1 (Elem t2) ~ t2
- from the context: (F t,
- Subst t (Elem t2) ~ t2,
- Subst t2 (Elem t) ~ t,
- F t1,
- Subst t1 (Elem t) ~ t,
- Subst t (Elem t1) ~ t1)
- bound by the RULE "map/map" at T5853.hs:15:2-57
+ • Could not deduce: Subst t1 (Elem t2) ~ t2
+ arising from a use of ‘<$>’
+ from the context: (F t,
+ Elem t ~ Elem t,
+ Elem t2 ~ Elem t2,
+ Subst t (Elem t2) ~ t2,
+ Subst t2 (Elem t) ~ t,
+ F t1,
+ Elem t1 ~ Elem t1,
+ Elem t ~ Elem t,
+ Subst t1 (Elem t) ~ t,
+ Subst t (Elem t1) ~ t1)
+ bound by the RULE "map/map" at T5853.hs:15:2-57
‘t2’ is a rigid type variable bound by
- the RULE "map/map" at T5853.hs:15:2
- In the expression: (f . g) <$> xs
- When checking the transformation rule "map/map"
- Relevant bindings include
- f :: Elem t -> Elem t2 (bound at T5853.hs:15:19)
- g :: Elem t1 -> Elem t (bound at T5853.hs:15:21)
- xs :: t1 (bound at T5853.hs:15:23)
+ the RULE "map/map" at T5853.hs:15:2
+ • In the expression: (f . g) <$> xs
+ When checking the transformation rule "map/map"
+ • Relevant bindings include
+ f :: Elem t -> Elem t2 (bound at T5853.hs:15:19)
+ g :: Elem t1 -> Elem t (bound at T5853.hs:15:21)
+ xs :: t1 (bound at T5853.hs:15:23)
diff --git a/testsuite/tests/typecheck/should_fail/T6018fail.stderr b/testsuite/tests/typecheck/should_fail/T6018fail.stderr
index a0f5439a7d..ac5c2b6fe0 100644
--- a/testsuite/tests/typecheck/should_fail/T6018fail.stderr
+++ b/testsuite/tests/typecheck/should_fail/T6018fail.stderr
@@ -66,7 +66,7 @@ T6018fail.hs:59:10: error:
T6018fail.hs:62:15: error:
Type family equation violates injectivity annotation.
- Kind variable ‘k1’ cannot be inferred from the right-hand side.
+ Kind variable ‘k’ cannot be inferred from the right-hand side.
(enabling -fprint-explicit-kinds might help)
In the type family equation:
PolyKindVars '[] = '[] -- Defined at T6018fail.hs:62:15
@@ -76,7 +76,7 @@ T6018fail.hs:66:15: error:
Kind variable ‘k’ cannot be inferred from the right-hand side.
(enabling -fprint-explicit-kinds might help)
In the type family equation:
- forall (k :: BOX) (a :: k) (b :: k).
+ forall k (a :: k) (b :: k).
Fc a b = Int -- Defined at T6018fail.hs:66:15
T6018fail.hs:70:15: error:
@@ -85,7 +85,7 @@ T6018fail.hs:70:15: error:
cannot be inferred from the right-hand side.
(enabling -fprint-explicit-kinds might help)
In the type family equation:
- forall (k :: BOX) (a :: k) (b :: k).
+ forall k (a :: k) (b :: k).
Gc a b = Int -- Defined at T6018fail.hs:70:15
T6018fail.hs:75:15: error:
@@ -142,7 +142,7 @@ T6018fail.hs:118:15: error:
cannot be inferred from the right-hand side.
(enabling -fprint-explicit-kinds might help)
In the type family equation:
- forall (k :: BOX) a b (c :: k).
+ forall k a b (c :: k).
G7 a b c = [G7a a b c] -- Defined at T6018fail.hs:118:15
T6018fail.hs:129:1: error:
diff --git a/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr b/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
index 2afafbe4cd..c151553a3a 100644
--- a/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
+++ b/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
@@ -28,7 +28,7 @@ T6018failclosed.hs:25:5: error:
cannot be inferred from the right-hand side.
(enabling -fprint-explicit-kinds might help)
In the type family equation:
- forall (k :: BOX) (k1 :: BOX) (b :: k) (c :: k1).
+ forall k k1 (b :: k) (c :: k1).
JClosed Int b c = Char -- Defined at T6018failclosed.hs:25:5
In the equations for closed type family ‘JClosed’
In the type family declaration for ‘JClosed’
@@ -44,7 +44,7 @@ T6018failclosed.hs:30:5: error:
T6018failclosed.hs:35:5: error:
Type family equation violates injectivity annotation.
RHS of injective type family equation cannot be a type family:
- forall (k :: BOX) (a :: k).
+ forall k (a :: k).
LClosed a = MaybeSynClosed a -- Defined at T6018failclosed.hs:35:5
In the equations for closed type family ‘LClosed’
In the type family declaration for ‘LClosed’
@@ -63,6 +63,13 @@ T6018failclosed.hs:43:5: error:
In the equations for closed type family ‘IClosed’
In the type family declaration for ‘IClosed’
+T6018failclosed.hs:49:3: error:
+ Type family equations violate injectivity annotation:
+ E2 'True = 'False -- Defined at T6018failclosed.hs:49:3
+ E2 a = 'False -- Defined at T6018failclosed.hs:50:3
+ In the equations for closed type family ‘E2’
+ In the type family declaration for ‘E2’
+
T6018failclosed.hs:50:3: error:
Type family equation violates injectivity annotation.
Type variable ‘a’ cannot be inferred from the right-hand side.
@@ -83,7 +90,7 @@ T6018failclosed.hs:66:5: error:
Kind variable ‘k’ cannot be inferred from the right-hand side.
(enabling -fprint-explicit-kinds might help)
In the type family equation:
- forall (k :: BOX) (a :: k) (b :: k).
+ forall k (a :: k) (b :: k).
Gc a b = Int -- Defined at T6018failclosed.hs:66:5
In the equations for closed type family ‘Gc’
In the type family declaration for ‘Gc’
diff --git a/testsuite/tests/typecheck/should_fail/T7368.stderr b/testsuite/tests/typecheck/should_fail/T7368.stderr
index c6c11e81b7..1c538ac7f9 100644
--- a/testsuite/tests/typecheck/should_fail/T7368.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7368.stderr
@@ -1,10 +1,6 @@
T7368.hs:3:10: error:
- Couldn't match kind ‘* -> *’ with ‘*’
- When matching types
- c0 :: (* -> *) -> *
- (->) a0 :: * -> *
- Expected type: a0 -> b0
- Actual type: c0 Maybe
- In the first argument of ‘b’, namely ‘(l Nothing)’
- In the expression: b (l Nothing)
+ • Couldn't match kind ‘*’ with ‘* -> *’
+ When matching the kind of ‘Maybe’
+ • In the first argument of ‘b’, namely ‘(l Nothing)’
+ In the expression: b (l Nothing)
diff --git a/testsuite/tests/typecheck/should_fail/T7368a.stderr b/testsuite/tests/typecheck/should_fail/T7368a.stderr
index a4f796ce6f..e55aab0e62 100644
--- a/testsuite/tests/typecheck/should_fail/T7368a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7368a.stderr
@@ -1,12 +1,12 @@
T7368a.hs:8:6: error:
- Couldn't match kind ‘*’ with ‘* -> *’
- When matching types
- f :: * -> *
- Bad :: (* -> *) -> *
- Expected type: f (Bad f)
- Actual type: Bad t0
- In the pattern: Bad x
- In an equation for ‘fun’: fun (Bad x) = True
- Relevant bindings include
- fun :: f (Bad f) -> Bool (bound at T7368a.hs:8:1)
+ • Couldn't match kind ‘*’ with ‘* -> *’
+ When matching types
+ f :: * -> *
+ Bad :: (* -> *) -> *
+ Expected type: f (Bad f)
+ Actual type: Bad (Bad f)
+ • In the pattern: Bad x
+ In an equation for ‘fun’: fun (Bad x) = True
+ • Relevant bindings include
+ fun :: f (Bad f) -> Bool (bound at T7368a.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/T7410.stderr b/testsuite/tests/typecheck/should_fail/T7410.stderr
index 46c7a8c2fc..0ca86ed872 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: 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)
+
+T7410.hs:3:9: error:
+ • Expecting one more argument to ‘Either Int’
+ Expected a type, 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 d3b76c54bf..efbc7497e5 100644
--- a/testsuite/tests/typecheck/should_fail/T7453.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7453.stderr
@@ -1,40 +1,50 @@
-T7453.hs:10:30: error:
- • Couldn't match expected type ‘t1’ with actual type ‘t’
- because type variable ‘t1’ would escape its scope
+T7453.hs:9:15: error:
+ • Couldn't match type ‘r’ with ‘t’
+ because type variable ‘t’ would escape its scope
This (rigid, skolem) type variable is bound by
the type signature for:
- z :: Id t1
+ z :: Id t
at T7453.hs:8:11-19
- • In the first argument of ‘Id’, namely ‘v’
- In the expression: Id v
+ Expected type: Id t
+ Actual type: Id r
+ • In the expression: aux
+ In an equation for ‘z’:
+ z = aux
+ where
+ aux = 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)
+ aux :: Id r (bound at T7453.hs:10:21)
+ z :: Id t (bound at T7453.hs:9:11)
+ v :: r (bound at T7453.hs:7:7)
+ cast1 :: r -> 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
+T7453.hs:15:15: error:
+ • Couldn't match type ‘r’ with ‘t1’
+ because type variable ‘t1’ would escape its scope
This (rigid, skolem) type variable is bound by
the type signature for:
- z :: () -> t2
+ z :: () -> t1
at T7453.hs:14:11-22
- • In the first argument of ‘const’, namely ‘v’
- In the expression: const v
+ Expected type: () -> t1
+ Actual type: () -> r
+ • In the expression: aux
+ In an equation for ‘z’:
+ z = aux
+ where
+ aux = 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)
+ aux :: forall b. b -> r (bound at T7453.hs:16:21)
+ z :: () -> t1 (bound at T7453.hs:15:11)
+ v :: r (bound at T7453.hs:13:7)
+ cast2 :: r -> t (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
+ • Couldn't match expected type ‘t1’ with actual type ‘r’
+ because type variable ‘t1’ would escape its scope
This (rigid, skolem) type variable is bound by
the type signature for:
- z :: t2
+ z :: t1
at T7453.hs:20:11-16
• In the expression: v
In an equation for ‘z’:
@@ -42,7 +52,7 @@ T7453.hs:21:15: error:
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)
+ aux :: forall b. b -> r (bound at T7453.hs:22:21)
+ z :: t1 (bound at T7453.hs:21:11)
+ v :: r (bound at T7453.hs:19:7)
+ cast3 :: r -> t (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 c5ed9fcad9..24339311b8 100644
--- a/testsuite/tests/typecheck/should_fail/T7609.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7609.stderr
@@ -1,10 +1,17 @@
-
-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
+
+T7609.hs:7:16: error:
+ • Expecting one more argument to ‘Maybe’
+ Expected a type, but ‘Maybe’ has kind ‘* -> *’
+ • In the type signature:
+ f :: (a `X` a, Maybe)
+
+T7609.hs:10:7: error:
+ • Expected a constraint, but ‘X a a’ has kind ‘*’
+ • In the type signature:
+ g :: (a `X` a) => Maybe
+
+T7609.hs:10:19: error:
+ • Expecting one more argument to ‘Maybe’
+ Expected a type, but ‘Maybe’ 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 17420143f8..1b3fe0ad76 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: 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)
+
+T7645.hs:6:23: error:
+ • Expecting one more argument to ‘Maybe’
+ Expected a type, 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 41f2296797..eef19a5cfc 100644
--- a/testsuite/tests/typecheck/should_fail/T7696.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7696.stderr
@@ -1,7 +1,7 @@
T7696.hs:7:6: error:
- • Couldn't match type ‘m0 a0’ with ‘()’
+ • Couldn't match type ‘() a0’ with ‘()’
Expected type: ((), w ())
- Actual type: (m0 a0, t0 m0)
+ Actual type: (() a0, w ())
• In the expression: f1
In an equation for ‘f2’: f2 = f1
diff --git a/testsuite/tests/typecheck/should_fail/T7734.stderr b/testsuite/tests/typecheck/should_fail/T7734.stderr
index 9cd71add8d..d4efb614df 100644
--- a/testsuite/tests/typecheck/should_fail/T7734.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7734.stderr
@@ -1,16 +1,16 @@
-T7734.hs:4:13:
- Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1
- In the first argument of ‘x’, namely ‘x’
- In the expression: x x
- Relevant bindings include
- x :: t2 -> t1 (bound at T7734.hs:4:1)
- f :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:4:1)
+T7734.hs:4:13: error:
+ • Occurs check: cannot construct the infinite type: r2 ~ r2 -> r1
+ • In the first argument of ‘x’, namely ‘x’
+ In the expression: x x
+ • Relevant bindings include
+ x :: r2 -> r1 (bound at T7734.hs:4:1)
+ f :: (r2 -> r1) -> r -> r1 (bound at T7734.hs:4:1)
-T7734.hs:5:13:
- Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1
- In the first argument of ‘x’, namely ‘x’
- In the expression: x x
- Relevant bindings include
- x :: t2 -> t1 (bound at T7734.hs:5:5)
- (&) :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:5:1)
+T7734.hs:5:13: error:
+ • Occurs check: cannot construct the infinite type: r2 ~ r2 -> r1
+ • In the first argument of ‘x’, namely ‘x’
+ In the expression: x x
+ • Relevant bindings include
+ x :: r2 -> r1 (bound at T7734.hs:5:5)
+ (&) :: (r2 -> r1) -> r -> r1 (bound at T7734.hs:5:1)
diff --git a/testsuite/tests/typecheck/should_fail/T7778.stderr b/testsuite/tests/typecheck/should_fail/T7778.stderr
index 7538c15cce..545d885129 100644
--- a/testsuite/tests/typecheck/should_fail/T7778.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7778.stderr
@@ -1,5 +1,12 @@
-
-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) ()) => ()
+
+T7778.hs:3:7: error:
+ • Expecting one fewer argument to ‘Num Int => Num’
+ Expected kind ‘* -> Constraint’, but ‘Num Int => Num’ has kind ‘*’
+ • In the type signature:
+ 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/T7857.stderr b/testsuite/tests/typecheck/should_fail/T7857.stderr
index e923a02472..2596efb51f 100644
--- a/testsuite/tests/typecheck/should_fail/T7857.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7857.stderr
@@ -1,17 +1,17 @@
T7857.hs:8:11: error:
- Could not deduce (PrintfType r0) arising from a use of ‘printf’
- from the context: PrintfArg t
- bound by the inferred type of g :: PrintfArg t => t -> b
- at T7857.hs:8:1-21
- The type variable ‘r0’ is ambiguous
- These potential instances exist:
- instance [safe] (a ~ ()) => PrintfType (IO a)
- -- Defined in ‘Text.Printf’
- instance [safe] (PrintfArg a, PrintfType r) => PrintfType (a -> r)
- -- Defined in ‘Text.Printf’
- instance [safe] IsChar c => PrintfType [c]
- -- Defined in ‘Text.Printf’
- In the second argument of ‘($)’, namely ‘printf "" i’
- In the expression: f $ printf "" i
- In an equation for ‘g’: g i = f $ printf "" i
+ • Could not deduce (PrintfType a0) arising from a use of ‘printf’
+ from the context: PrintfArg t
+ bound by the inferred type of g :: PrintfArg t => t -> b
+ at T7857.hs:8:1-21
+ The type variable ‘a0’ is ambiguous
+ These potential instances exist:
+ instance [safe] (a ~ ()) => PrintfType (IO a)
+ -- Defined in ‘Text.Printf’
+ instance [safe] (PrintfArg a, PrintfType r) => PrintfType (a -> r)
+ -- Defined in ‘Text.Printf’
+ instance [safe] IsChar c => PrintfType [c]
+ -- Defined in ‘Text.Printf’
+ • In the second argument of ‘($)’, namely ‘printf "" i’
+ In the expression: f $ printf "" i
+ In an equation for ‘g’: g i = f $ printf "" i
diff --git a/testsuite/tests/typecheck/should_fail/T7892.stderr b/testsuite/tests/typecheck/should_fail/T7892.stderr
index 559ac67270..d6120f936c 100644
--- a/testsuite/tests/typecheck/should_fail/T7892.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7892.stderr
@@ -1,2 +1,2 @@
-T7892.hs:5:4: Couldn't match kind ‘*’ against ‘* -> *’
+T7892.hs:5:4: error: Expected kind ‘* -> *’, but ‘f’ has kind ‘*’
diff --git a/testsuite/tests/typecheck/should_fail/T8030.stderr b/testsuite/tests/typecheck/should_fail/T8030.stderr
index c6c05f8cf1..6e902a4294 100644
--- a/testsuite/tests/typecheck/should_fail/T8030.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8030.stderr
@@ -6,7 +6,7 @@ T8030.hs:9:3: error:
• 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
+ op1 :: forall k (a :: k). C a => Pr a
In the class declaration for ‘C’
T8030.hs:10:3: error:
@@ -14,9 +14,9 @@ T8030.hs:10:3: error:
NB: ‘Pr’ is a type function, and may not be injective
The type variable ‘a0’ is ambiguous
Expected type: Pr a -> Pr a -> Pr a
- Actual type: Pr a0 -> Pr a0 -> Pr a0
+ Actual type: Pr a0 -> Pr a0 -> Pr a0
• 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
+ op2 :: forall k (a :: k). C a => Pr a -> Pr a -> Pr a
In the class declaration for ‘C’
diff --git a/testsuite/tests/typecheck/should_fail/T8262.stderr b/testsuite/tests/typecheck/should_fail/T8262.stderr
index b6f7ef7711..45e201cc76 100644
--- a/testsuite/tests/typecheck/should_fail/T8262.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8262.stderr
@@ -1,11 +1,7 @@
T8262.hs:5:15: error:
- Couldn't match kind ‘*’ with ‘#’
- When matching types
- a :: *
- Int# :: #
- In the first argument of ‘Just’, namely ‘(1#)’
- In the expression: Just (1#)
- In an equation for ‘foo’: foo x = Just (1#)
- Relevant bindings include
- foo :: t -> Maybe a (bound at T8262.hs:5:1)
+ • Couldn't match a lifted type with an unlifted type
+ When matching the kind of ‘Int#’
+ • In the first argument of ‘Just’, namely ‘(1#)’
+ In the expression: Just (1#)
+ In an equation for ‘foo’: foo x = Just (1#)
diff --git a/testsuite/tests/typecheck/should_fail/T8514.stderr b/testsuite/tests/typecheck/should_fail/T8514.stderr
index 41aeb3b52e..e3ea4cb385 100644
--- a/testsuite/tests/typecheck/should_fail/T8514.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8514.stderr
@@ -1,7 +1,6 @@
T8514.hs:3:16:
Expecting one more argument to ‘Maybe’
- The second argument of a tuple should have kind ‘*’,
- but ‘Maybe’ has kind ‘* -> *’
+ Expected a type, but ‘Maybe’ has kind ‘* -> *’
In the type ‘(a, Maybe)’
In the type declaration for ‘T’
diff --git a/testsuite/tests/typecheck/should_fail/T8603.stderr b/testsuite/tests/typecheck/should_fail/T8603.stderr
index a3d17ceb56..5bfd397167 100644
--- a/testsuite/tests/typecheck/should_fail/T8603.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8603.stderr
@@ -6,14 +6,10 @@ T8603.hs:13:10: error:
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)
+ When matching the kind of ‘[[a0]]’
• The function ‘lift’ is applied to two arguments,
- but its type ‘([a0] -> StateT s RV t0)
- -> t1 ((->) [a0]) (StateT s RV t0)’
+ but its type ‘[] [a0] (StateT s RV t0)
+ -> (->) [[a0]] (StateT s RV t0)’
has only one
In a stmt of a 'do' block: prize <- lift uniform [1, 2, 3]
In the expression:
@@ -22,7 +18,7 @@ T8603.hs:29:17: error:
T8603.hs:29:22: error:
• Couldn't match type ‘RV a0’ with ‘StateT s RV t0’
- Expected type: [a0] -> 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]
diff --git a/testsuite/tests/typecheck/should_fail/T8806.stderr b/testsuite/tests/typecheck/should_fail/T8806.stderr
index 0131dbd929..0c7a06291a 100644
--- a/testsuite/tests/typecheck/should_fail/T8806.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8806.stderr
@@ -1,8 +1,20 @@
-
-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
+
+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
+
+T8806.hs:8:7: error:
+ • Expected a constraint, but ‘Show a’ has kind ‘*’
+ • In the type signature:
+ g :: (Int => Show a) => Int
+
+T8806.hs:8:14: error:
+ • Expected a type, but ‘Show a’ has kind ‘Constraint’
+ • In the type signature:
+ g :: (Int => Show a) => Int
diff --git a/testsuite/tests/typecheck/should_fail/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr
index afd77c4f81..defd77572e 100644
--- a/testsuite/tests/typecheck/should_fail/T9109.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9109.stderr
@@ -1,14 +1,15 @@
-T9109.hs:8:13:
- Couldn't match expected type ‘t’ with actual type ‘Bool’
- ‘t’ is untouchable
- inside the constraints: t1 ~ Bool
- bound by a pattern with constructor: GBool :: G Bool,
- in an equation for ‘foo’
- at T9109.hs:8:5-9
- ‘t’ is a rigid type variable bound by
- the inferred type of foo :: G t1 -> t at T9109.hs:8:1
- Possible fix: add a type signature for ‘foo’
- In the expression: True
- In an equation for ‘foo’: foo GBool = True
- Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1)
+T9109.hs:8:13: error:
+ • Couldn't match expected type ‘r’ with actual type ‘Bool’
+ ‘r’ is untouchable
+ inside the constraints: r1 ~ Bool
+ bound by a pattern with constructor: GBool :: G Bool,
+ in an equation for ‘foo’
+ at T9109.hs:8:5-9
+ ‘r’ is a rigid type variable bound by
+ the inferred type of foo :: G r1 -> r at T9109.hs:8:1
+ Possible fix: add a type signature for ‘foo’
+ • In the expression: True
+ In an equation for ‘foo’: foo GBool = True
+ • Relevant bindings include
+ foo :: G r1 -> r (bound at T9109.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/T9196.stderr b/testsuite/tests/typecheck/should_fail/T9196.stderr
index fd10f24875..c6765a9a69 100644
--- a/testsuite/tests/typecheck/should_fail/T9196.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9196.stderr
@@ -1,8 +1,15 @@
-
-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
+
+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 ‘Ord a’ has kind ‘*’
+ • In the type signature:
+ g :: (Eq a => Ord a) => a -> a
+
+T9196.hs:7:15: error:
+ • Expected a type, but ‘Ord a’ has kind ‘Constraint’
+ • 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 2f1d0a2dae..b6c187548b 100644
--- a/testsuite/tests/typecheck/should_fail/T9201.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9201.stderr
@@ -1,6 +1,7 @@
T9201.hs:6:17: error:
- The first argument of ‘f’ should have kind ‘x1’,
- but ‘a’ has kind ‘y1’
- In the type signature: ret :: d a (f a)
- In the class declaration for ‘MonoidalCCC’
+ • Expected kind ‘x’, but ‘a’ has kind ‘y’
+ • In the first argument of ‘f’, namely ‘a’
+ In the second argument of ‘d’, namely ‘f a’
+ In the type signature:
+ ret :: d a (f a)
diff --git a/testsuite/tests/typecheck/should_fail/T9260.stderr b/testsuite/tests/typecheck/should_fail/T9260.stderr
index a163b16cbd..0773da2bf5 100644
--- a/testsuite/tests/typecheck/should_fail/T9260.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9260.stderr
@@ -1,7 +1,7 @@
T9260.hs:12:8: error:
- Couldn't match type ‘2’ with ‘1’
- Expected type: Fin 1
- Actual type: Fin (1 + 1)
- In the expression: Fsucc Fzero
- In an equation for ‘test’: test = Fsucc Fzero
+ • Couldn't match type ‘2’ with ‘1’
+ Expected type: Fin 1
+ Actual type: Fin (1 + 1)
+ • In the expression: Fsucc Fzero
+ In an equation for ‘test’: test = Fsucc Fzero
diff --git a/testsuite/tests/typecheck/should_fail/T9999.stderr b/testsuite/tests/typecheck/should_fail/T9999.stderr
index 0defd090b0..934da44f38 100644
--- a/testsuite/tests/typecheck/should_fail/T9999.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9999.stderr
@@ -1,10 +1,9 @@
T9999.hs:13:38: error:
- No instance for (Typeable F1) arising from a use of ‘typeRep’
- GHC can't yet do polykinded Typeable (F1 :: k0 -> *)
- In the second argument of ‘(==)’, namely
- ‘typeRep (Proxy :: Proxy F1)’
- In the expression:
- typeRep (Proxy :: Proxy F) == typeRep (Proxy :: Proxy F1)
- In an equation for ‘main’:
- main = typeRep (Proxy :: Proxy F) == typeRep (Proxy :: Proxy F1)
+ • No instance for (Typeable k0) arising from a use of ‘typeRep’
+ • In the second argument of ‘(==)’, namely
+ ‘typeRep (Proxy :: Proxy F1)’
+ In the expression:
+ typeRep (Proxy :: Proxy F) == typeRep (Proxy :: Proxy F1)
+ In an equation for ‘main’:
+ main = typeRep (Proxy :: Proxy F) == typeRep (Proxy :: Proxy F1)
diff --git a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
index c97acc25a7..8141caf5b5 100644
--- a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
+++ b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
@@ -1,64 +1,68 @@
TcCoercibleFail.hs:11:8: error:
- Couldn't match representation of type ‘Int’ with that of ‘()’
- arising from a use of ‘coerce’
- In the expression: coerce
- In the expression: coerce $ one :: ()
- In an equation for ‘foo1’: foo1 = coerce $ one :: ()
+ • Couldn't match representation of type ‘Int’ with that of ‘()’
+ arising from a use of ‘coerce’
+ • In the expression: coerce
+ In the expression: coerce $ one :: ()
+ In an equation for ‘foo1’: foo1 = coerce $ one :: ()
TcCoercibleFail.hs:14:8: error:
- Couldn't match representation of type ‘m Int’ with that of ‘m Age’
- arising from a use of ‘coerce’
- NB: We cannot know what roles the parameters to ‘m’ have;
- we must assume that the role is nominal
- In the expression: coerce
- In the expression: coerce $ (return one :: m Int)
- In an equation for ‘foo2’: foo2 = coerce $ (return one :: m Int)
- Relevant bindings include
- foo2 :: m Age (bound at TcCoercibleFail.hs:14:1)
+ • Couldn't match representation of type ‘m Int’
+ with that of ‘m Age’
+ arising from a use of ‘coerce’
+ NB: We cannot know what roles the parameters to ‘m’ have;
+ we must assume that the role is nominal
+ • In the expression: coerce
+ In the expression: coerce $ (return one :: m Int)
+ In an equation for ‘foo2’: foo2 = coerce $ (return one :: m Int)
+ • Relevant bindings include
+ foo2 :: m Age (bound at TcCoercibleFail.hs:14:1)
TcCoercibleFail.hs:16:8: error:
- Couldn't match type ‘Int’ with ‘Age’ arising from a use of ‘coerce’
- In the expression: coerce
- In the expression: coerce $ Map one () :: Map Age ()
- In an equation for ‘foo3’: foo3 = coerce $ Map one () :: Map Age ()
+ • Couldn't match type ‘Int’ with ‘Age’
+ arising from a use of ‘coerce’
+ • In the expression: coerce
+ In the expression: coerce $ Map one () :: Map Age ()
+ In an equation for ‘foo3’: foo3 = coerce $ Map one () :: Map Age ()
TcCoercibleFail.hs:18:8: error:
- Couldn't match representation of type ‘Int’ with that of ‘Down Int’
- arising from a use of ‘coerce’
- The data constructor ‘Down’ of newtype ‘Down’ is not in scope
- In the expression: coerce
- In the expression: coerce $ one :: Down Int
- In an equation for ‘foo4’: foo4 = coerce $ one :: Down Int
+ • Couldn't match representation of type ‘Int’
+ with that of ‘Down Int’
+ arising from a use of ‘coerce’
+ The data constructor ‘Down’ of newtype ‘Down’ is not in scope
+ • In the expression: coerce
+ In the expression: coerce $ one :: Down Int
+ In an equation for ‘foo4’: foo4 = coerce $ one :: Down Int
TcCoercibleFail.hs:21:8: error:
- Couldn't match representation of type ‘Void’ with that of ‘()’
- arising from a use of ‘coerce’
- In the expression: coerce :: Void -> ()
- In an equation for ‘foo5’: foo5 = coerce :: Void -> ()
+ • Couldn't match representation of type ‘Void’ with that of ‘()’
+ arising from a use of ‘coerce’
+ • In the expression: coerce :: Void -> ()
+ In an equation for ‘foo5’: foo5 = coerce :: Void -> ()
TcCoercibleFail.hs:24:9: error:
- Couldn't match representation of type ‘VoidBad ()’
- with that of ‘()’
- arising from a use of ‘coerce’
- In the expression: coerce :: (VoidBad ()) -> ()
- In an equation for ‘foo5'’: foo5' = coerce :: (VoidBad ()) -> ()
+ • Couldn't match representation of type ‘VoidBad ()’
+ with that of ‘()’
+ arising from a use of ‘coerce’
+ • In the expression: coerce :: (VoidBad ()) -> ()
+ In an equation for ‘foo5'’: foo5' = coerce :: (VoidBad ()) -> ()
TcCoercibleFail.hs:28:8: error:
- Reduction stack overflow; size = 201
- When simplifying the following type: Fix (Either Age)
- 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 expression: coerce :: Fix (Either Int) -> Fix (Either Age)
- In an equation for ‘foo6’:
- foo6 = coerce :: Fix (Either Int) -> Fix (Either Age)
+ • Reduction stack overflow; size = 201
+ When simplifying the following type:
+ Coercible (Fix (Either Int)) (Fix (Either Age))
+ 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 expression: coerce :: Fix (Either Int) -> Fix (Either Age)
+ In an equation for ‘foo6’:
+ foo6 = coerce :: Fix (Either Int) -> Fix (Either Age)
TcCoercibleFail.hs:29:8: error:
- Couldn't match representation of type ‘Either
- Int (Fix (Either Int))’
- with that of ‘()’
- arising from a use of ‘coerce’
- In the expression: coerce :: Fix (Either Int) -> ()
- In an equation for ‘foo7’: foo7 = coerce :: Fix (Either Int) -> ()
+ • Couldn't match representation of type ‘Either
+ Int (Fix (Either Int))’
+ with that of ‘()’
+ arising from a use of ‘coerce’
+ • In the expression: coerce :: Fix (Either Int) -> ()
+ In an equation for ‘foo7’: foo7 = coerce :: Fix (Either Int) -> ()
diff --git a/testsuite/tests/typecheck/should_fail/TcCoercibleFail2.hs b/testsuite/tests/typecheck/should_fail/TcCoercibleFail2.hs
index 8d89b52639..d165648a32 100644
--- a/testsuite/tests/typecheck/should_fail/TcCoercibleFail2.hs
+++ b/testsuite/tests/typecheck/should_fail/TcCoercibleFail2.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
import Data.Coerce (Coercible)
instance Coercible () ()
diff --git a/testsuite/tests/typecheck/should_fail/TcCoercibleFail2.stderr b/testsuite/tests/typecheck/should_fail/TcCoercibleFail2.stderr
index 29c268d22f..b121f91c65 100644
--- a/testsuite/tests/typecheck/should_fail/TcCoercibleFail2.stderr
+++ b/testsuite/tests/typecheck/should_fail/TcCoercibleFail2.stderr
@@ -1,5 +1,5 @@
-TcCoercibleFail2.hs:3:10:
+TcCoercibleFail2.hs:5:10: error:
Illegal instance declaration for ‘Coercible () ()’
- The class is abstract, manual instances are not permitted.
+ Manual instances of this class are not permitted.
In the instance declaration for ‘Coercible () ()’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail002.stderr b/testsuite/tests/typecheck/should_fail/tcfail002.stderr
index 4017239930..285b6bf577 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail002.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail002.stderr
@@ -1,8 +1,8 @@
-tcfail002.hs:4:7:
- Occurs check: cannot construct the infinite type: t ~ [t]
- In the expression: z
- In an equation for ‘c’: c z = z
- Relevant bindings include
- z :: [t] (bound at tcfail002.hs:4:3)
- c :: [t] -> t (bound at tcfail002.hs:3:1)
+tcfail002.hs:4:7: error:
+ • Occurs check: cannot construct the infinite type: r ~ [r]
+ • In the expression: z
+ In an equation for ‘c’: c z = z
+ • Relevant bindings include
+ z :: [r] (bound at tcfail002.hs:4:3)
+ c :: [r] -> r (bound at tcfail002.hs:3:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail004.stderr b/testsuite/tests/typecheck/should_fail/tcfail004.stderr
index 9c51edc5b2..2294a6166f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail004.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail004.stderr
@@ -1,9 +1,9 @@
-
-tcfail004.hs:3:9:
- Couldn't match expected type ‘(t, t1)’
- with actual type ‘(Integer, Integer, Integer)’
- In the expression: (1, 2, 3)
- In a pattern binding: (f, g) = (1, 2, 3)
- Relevant bindings include
- f :: t (bound at tcfail004.hs:3:2)
- g :: t1 (bound at tcfail004.hs:3:4)
+
+tcfail004.hs:3:9: error:
+ • Couldn't match expected type ‘(r, r1)’
+ with actual type ‘(Integer, Integer, Integer)’
+ • In the expression: (1, 2, 3)
+ In a pattern binding: (f, g) = (1, 2, 3)
+ • Relevant bindings include
+ f :: r (bound at tcfail004.hs:3:2)
+ g :: r1 (bound at tcfail004.hs:3:4)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail005.stderr b/testsuite/tests/typecheck/should_fail/tcfail005.stderr
index c9d3360243..4c585af3da 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail005.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail005.stderr
@@ -1,9 +1,9 @@
-
-tcfail005.hs:3:9:
- Couldn't match expected type ‘[t]’
- with actual type ‘(Integer, Char)’
- In the expression: (1, 'a')
- In a pattern binding: (h : i) = (1, 'a')
- Relevant bindings include
- h :: t (bound at tcfail005.hs:3:2)
- i :: [t] (bound at tcfail005.hs:3:4)
+
+tcfail005.hs:3:9: error:
+ • Couldn't match expected type ‘[r]’
+ with actual type ‘(Integer, Char)’
+ • In the expression: (1, 'a')
+ In a pattern binding: (h : i) = (1, 'a')
+ • Relevant bindings include
+ h :: r (bound at tcfail005.hs:3:2)
+ i :: [r] (bound at tcfail005.hs:3:4)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail010.stderr b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
index abffc1acd2..92ee3d8f8e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail010.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
@@ -1,6 +1,6 @@
tcfail010.hs:3:17:
- No instance for (Num [t0]) arising from a use of ‘+’
+ No instance for (Num [r0]) arising from a use of ‘+’
In the expression: z + 2
In the expression: \ (y : z) -> z + 2
In an equation for ‘q’: q = \ (y : z) -> z + 2
diff --git a/testsuite/tests/typecheck/should_fail/tcfail013.stderr b/testsuite/tests/typecheck/should_fail/tcfail013.stderr
index 2f200abcce..332f10e729 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail013.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail013.stderr
@@ -1,6 +1,7 @@
-tcfail013.hs:4:3:
- Couldn't match expected type ‘[t]’ with actual type ‘Bool’
- In the pattern: True
- In an equation for ‘f’: f True = 2
- Relevant bindings include f :: [t] -> a (bound at tcfail013.hs:3:1)
+tcfail013.hs:4:3: error:
+ • Couldn't match expected type ‘[r]’ with actual type ‘Bool’
+ • In the pattern: True
+ In an equation for ‘f’: f True = 2
+ • Relevant bindings include
+ f :: [r] -> a (bound at tcfail013.hs:3:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail014.stderr b/testsuite/tests/typecheck/should_fail/tcfail014.stderr
index bf28aa76b7..92307b3830 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail014.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail014.stderr
@@ -1,8 +1,8 @@
-tcfail014.hs:5:33:
- Occurs check: cannot construct the infinite type: t8 ~ t8 -> t7
- In the first argument of ‘z’, namely ‘z’
- In the expression: z z
- Relevant bindings include
- z :: t8 -> t7 (bound at tcfail014.hs:5:27)
- h :: (t8 -> t7) -> t7 (bound at tcfail014.hs:5:25)
+tcfail014.hs:5:33: error:
+ • Occurs check: cannot construct the infinite type: r8 ~ r8 -> r7
+ • In the first argument of ‘z’, namely ‘z’
+ In the expression: z z
+ • Relevant bindings include
+ z :: r8 -> r7 (bound at tcfail014.hs:5:27)
+ h :: (r8 -> r7) -> r7 (bound at tcfail014.hs:5:25)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail018.stderr b/testsuite/tests/typecheck/should_fail/tcfail018.stderr
index ef32705126..88c08a8a8b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail018.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail018.stderr
@@ -1,5 +1,5 @@
tcfail018.hs:5:10:
- No instance for (Num [t0]) arising from the literal ‘1’
+ No instance for (Num [r0]) arising from the literal ‘1’
In the expression: 1
In a pattern binding: (a : []) = 1
diff --git a/testsuite/tests/typecheck/should_fail/tcfail032.stderr b/testsuite/tests/typecheck/should_fail/tcfail032.stderr
index 649acb0b07..05d33a5e05 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail032.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail032.stderr
@@ -1,13 +1,13 @@
-tcfail032.hs:14:8:
- Couldn't match expected type ‘a1 -> Int’ with actual type ‘t’
- because type variable ‘a1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- an expression type signature: Eq a1 => a1 -> Int
- at tcfail032.hs:14:8-30
- In the expression: (x :: (Eq a) => a -> Int)
- In an equation for ‘f’: f x = (x :: (Eq a) => a -> Int)
- Relevant bindings include
- x :: t (bound at tcfail032.hs:14:3)
- f :: t -> a -> Int (bound at tcfail032.hs:14:1)
-
+tcfail032.hs:14:8: error:
+ • Couldn't match expected type ‘a1 -> Int’ with actual type ‘r’
+ because type variable ‘a1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ an expression type signature:
+ Eq a1 => a1 -> Int
+ at tcfail032.hs:14:8-30
+ • In the expression: (x :: (Eq a) => a -> Int)
+ In an equation for ‘f’: f x = (x :: (Eq a) => a -> Int)
+ • Relevant bindings include
+ x :: r (bound at tcfail032.hs:14:3)
+ f :: r -> a -> Int (bound at tcfail032.hs:14:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail036.hs b/testsuite/tests/typecheck/should_fail/tcfail036.hs
index ade1720ccc..62c7b7e26b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail036.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail036.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE FlexibleInstances #-}
+
-- !!! prelude class name in an instance-tycon position
--
module ShouldFail where
diff --git a/testsuite/tests/typecheck/should_fail/tcfail036.stderr b/testsuite/tests/typecheck/should_fail/tcfail036.stderr
index a9aef1192b..e94ba6a2a4 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail036.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail036.stderr
@@ -1,11 +1,11 @@
-tcfail036.hs:6:10:
+tcfail036.hs:8:10:
Duplicate instance declarations:
- instance Num NUM -- Defined at tcfail036.hs:6:10
instance Num NUM -- Defined at tcfail036.hs:8:10
+ instance Num NUM -- Defined at tcfail036.hs:10:10
-tcfail036.hs:9:13:
+tcfail036.hs:11:13:
Expecting one more argument to ‘Num’
- The first argument of ‘Eq’ should have kind ‘*’,
- but ‘Num’ has kind ‘* -> Constraint’
+ Expected a type, but ‘Num’ has kind ‘* -> Constraint’
+ In the first argument of ‘Eq’, namely ‘Num’
In the instance declaration for ‘Eq Num’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail049.stderr b/testsuite/tests/typecheck/should_fail/tcfail049.stderr
index 12fc06db98..1b74ce0070 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail049.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail049.stderr
@@ -1,2 +1,2 @@
-
-tcfail049.hs:3:7: error: Variable not in scope: g :: t1 -> t
+
+tcfail049.hs:3:7: error: Variable not in scope: g :: t -> t1
diff --git a/testsuite/tests/typecheck/should_fail/tcfail050.stderr b/testsuite/tests/typecheck/should_fail/tcfail050.stderr
index 881e497b4d..2ca5065938 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail050.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail050.stderr
@@ -1,3 +1,3 @@
-
-tcfail050.hs:3:7: error:
- Data constructor not in scope: B :: t1 -> t
+
+tcfail050.hs:3:7: error:
+ Data constructor not in scope: B :: t -> t1
diff --git a/testsuite/tests/typecheck/should_fail/tcfail057.stderr b/testsuite/tests/typecheck/should_fail/tcfail057.stderr
index 07a8116173..945c81c1cd 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail057.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail057.stderr
@@ -1,5 +1,5 @@
tcfail057.hs:5:7: error:
- • Constraint ‘RealFrac a’ used as a type
+ • Expected a type, but ‘RealFrac a’ has kind ‘Constraint’
• In the type signature:
f :: (RealFrac a) -> a -> a
diff --git a/testsuite/tests/typecheck/should_fail/tcfail070.stderr b/testsuite/tests/typecheck/should_fail/tcfail070.stderr
index d98857de4c..6236947709 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail070.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail070.stderr
@@ -1,5 +1,6 @@
tcfail070.hs:15:15:
- ‘[Int]’ is applied to too many type arguments
+ Expecting one fewer argument to ‘[Int]’
+ Expected kind ‘* -> k0’, but ‘[Int]’ has kind ‘*’
In the type ‘[Int] Bool’
In the type declaration for ‘State’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail078.stderr b/testsuite/tests/typecheck/should_fail/tcfail078.stderr
index 8a7837df00..f68b142340 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail078.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail078.stderr
@@ -1,4 +1,6 @@
-
-tcfail078.hs:5:6: error:
- ‘Integer’ is applied to too many type arguments
- In the type signature: f :: Integer i => i
+
+tcfail078.hs:5:6: error:
+ • Expecting one fewer argument to ‘Integer’
+ Expected kind ‘* -> Constraint’, but ‘Integer’ has kind ‘*’
+ • In the type signature:
+ f :: Integer i => i
diff --git a/testsuite/tests/typecheck/should_fail/tcfail088.stderr b/testsuite/tests/typecheck/should_fail/tcfail088.stderr
index d9cd5427b7..1aedd2a43c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail088.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail088.stderr
@@ -1,4 +1,4 @@
tcfail088.hs:9:19:
- Illegal polymorphic or qualified type: forall s. T s a
+ Illegal polymorphic or qualified type: forall s1. T s1 a
In the instance declaration for ‘Ord (forall s. T s a)’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail090.stderr b/testsuite/tests/typecheck/should_fail/tcfail090.stderr
index 6c6f97d932..662d7da804 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail090.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail090.stderr
@@ -1,8 +1,6 @@
tcfail090.hs:11:9: error:
- Couldn't match kind ‘*’ with ‘#’
- When matching types
- a0 :: *
- ByteArray# :: #
- In the expression: my_undefined
- In an equation for ‘die’: die _ = my_undefined
+ • Couldn't match a lifted type with an unlifted type
+ When matching the kind of ‘ByteArray#’
+ • In the expression: my_undefined
+ In an equation for ‘die’: die _ = my_undefined
diff --git a/testsuite/tests/typecheck/should_fail/tcfail099.stderr b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
index 9fdccb3335..687fafb6da 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail099.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
@@ -1,14 +1,14 @@
-
-tcfail099.hs:9:20:
- Couldn't match expected type ‘a’ with actual type ‘t’
- because type variable ‘a’ would escape its scope
- This (rigid, skolem) type variable is bound by
- a pattern with constructor: C :: forall a. (a -> Int) -> DS,
- in an equation for ‘call’
- at tcfail099.hs:9:7-9
- In the first argument of ‘f’, namely ‘arg’
- In the expression: f arg
- Relevant bindings include
- arg :: t (bound at tcfail099.hs:9:12)
- f :: a -> Int (bound at tcfail099.hs:9:9)
- call :: DS -> t -> Int (bound at tcfail099.hs:9:1)
+
+tcfail099.hs:9:20: error:
+ • Couldn't match expected type ‘a’ with actual type ‘r’
+ because type variable ‘a’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ a pattern with constructor: C :: forall a. (a -> Int) -> DS,
+ in an equation for ‘call’
+ at tcfail099.hs:9:7-9
+ • In the first argument of ‘f’, namely ‘arg’
+ In the expression: f arg
+ • Relevant bindings include
+ arg :: r (bound at tcfail099.hs:9:12)
+ f :: a -> Int (bound at tcfail099.hs:9:9)
+ call :: DS -> r -> Int (bound at tcfail099.hs:9:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail113.stderr b/testsuite/tests/typecheck/should_fail/tcfail113.stderr
index 06837f6f73..b84151ac73 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail113.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail113.stderr
@@ -1,14 +1,18 @@
-
-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
+
+tcfail113.hs:12:7: error:
+ • Expecting one more argument to ‘Maybe’
+ Expected a type, but ‘Maybe’ has kind ‘* -> *’
+ • In the type signature:
+ f :: [Maybe]
+
+tcfail113.hs:15:8: error:
+ • Expected kind ‘* -> *’, but ‘Int’ has kind ‘*’
+ • In the first argument of ‘T’, namely ‘Int’
+ In the type signature:
+ g :: T Int
+
+tcfail113.hs:18:6: error:
+ • Expecting one fewer argument to ‘Int’
+ Expected kind ‘* -> *’, but ‘Int’ has kind ‘*’
+ • In the type signature:
+ h :: Int Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail122.stderr b/testsuite/tests/typecheck/should_fail/tcfail122.stderr
index 47b391df6d..ab743441f9 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail122.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail122.stderr
@@ -1,18 +1,15 @@
tcfail122.hs:8:9: error:
- Couldn't match kind ‘* -> *’ with ‘*’
- When matching types
- c0 :: (* -> *) -> *
- a :: * -> *
- Expected type: a b
- Actual type: c0 d0
- In the expression:
- undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d
- In the expression:
- [undefined :: forall a b. a b,
- undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d]
- In an equation for ‘foo’:
- foo
- = [undefined :: forall a b. a b,
- undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d]
- Relevant bindings include foo :: [a b] (bound at tcfail122.hs:7:1)
+ • Couldn't match kind ‘* -> *’ with ‘*’
+ When matching the kind of ‘a’
+ • In the expression:
+ undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d
+ In the expression:
+ [undefined :: forall a b. a b,
+ undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d]
+ In an equation for ‘foo’:
+ foo
+ = [undefined :: forall a b. a b,
+ undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d]
+ • Relevant bindings include
+ foo :: [a b] (bound at tcfail122.hs:7:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail123.stderr b/testsuite/tests/typecheck/should_fail/tcfail123.stderr
index 396d63c9f8..00b8bbdd10 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail123.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail123.stderr
@@ -1,9 +1,7 @@
tcfail123.hs:11:9: error:
- Couldn't match kind ‘*’ with ‘#’
- When matching types
- t0 :: *
- Int# :: #
+ Couldn't match a lifted type with an unlifted type
+ When matching the kind of ‘Int#’
In the first argument of ‘f’, namely ‘3#’
In the expression: f 3#
In an equation for ‘h’: h v = f 3#
diff --git a/testsuite/tests/typecheck/should_fail/tcfail132.stderr b/testsuite/tests/typecheck/should_fail/tcfail132.stderr
index 16fee3fbb4..9ec35d7d9f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail132.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail132.stderr
@@ -1,6 +1,15 @@
-tcfail132.hs:17:37:
- The first argument of ‘T’ should have kind ‘* -> * -> * -> *’,
+tcfail132.hs:17:37: error:
+ Expecting one fewer argument to ‘Object f' f t’
+ Expected kind ‘* -> * -> * -> *’,
but ‘Object f' f t’ has kind ‘* -> * -> *’
+ In the first argument of ‘T’, namely ‘Object f' f t’
+ In the type ‘T (Object f' f t) (DUnit t)’
+ In the type declaration for ‘LiftObject’
+
+tcfail132.hs:17:53: error:
+ Expected kind ‘* -> * -> * -> *’,
+ but ‘DUnit t’ has kind ‘* -> * -> *’
+ In the second argument of ‘T’, namely ‘DUnit t’
In the type ‘T (Object f' f t) (DUnit t)’
In the type declaration for ‘LiftObject’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
index 32f73422af..f629ea0140 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
@@ -3,9 +3,9 @@ tcfail133.hs:2:61: warning:
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail133.hs:68:7: error:
- Ambiguous type variable ‘r0’ arising from a use of ‘show’
- prevents the constraint ‘(Show r0)’ from being solved.
- Probable fix: use a type annotation to specify what ‘r0’ should be.
+ Ambiguous type variable ‘a0’ arising from a use of ‘show’
+ prevents the constraint ‘(Show a0)’ from being solved.
+ Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance Show Module -- Defined in ‘GHC.Show’
instance Show Ordering -- Defined in ‘GHC.Show’
@@ -18,7 +18,7 @@ tcfail133.hs:68:7: error:
foo = show $ add (One :@ Zero) (One :@ One)
tcfail133.hs:68:14: error:
- No instance for (AddDigit (Zero :@ (One :@ One)) One r0)
+ No instance for (AddDigit (Zero :@ (One :@ One)) One a0)
arising from a use of ‘add’
In the second argument of ‘($)’, namely
‘add (One :@ Zero) (One :@ One)’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail140.stderr b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
index 09eb70c588..41268ec6df 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail140.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
@@ -1,38 +1,40 @@
-
-tcfail140.hs:10:7: error:
- Couldn't match expected type ‘Integer -> t’ with actual type ‘Int’
- The function ‘f’ is applied to two arguments,
- but its type ‘Int -> Int’ has only one
- In the expression: f 3 9
- In an equation for ‘bar’: bar = f 3 9
- Relevant bindings include bar :: t (bound at tcfail140.hs:10:1)
-
-tcfail140.hs:12:10: error:
- Couldn't match expected type ‘Integer -> t1’ with actual type ‘Int’
- The operator ‘f’ takes two arguments,
- but its type ‘Int -> Int’ has only one
- In the expression: 3 `f` 4
- In an equation for ‘rot’: rot xs = 3 `f` 4
- Relevant bindings include
- rot :: t -> t1 (bound at tcfail140.hs:12:1)
-
-tcfail140.hs:14:15: error:
- Couldn't match expected type ‘a -> b’ with actual type ‘Int’
- The operator ‘f’ takes two arguments,
- but its type ‘Int -> Int’ has only one
- In the first argument of ‘map’, namely ‘(3 `f`)’
- In the expression: map (3 `f`) xs
- Relevant bindings include
- xs :: [a] (bound at tcfail140.hs:14:5)
- bot :: [a] -> [b] (bound at tcfail140.hs:14:1)
-
-tcfail140.hs:16:8: error:
- The constructor ‘Just’ should have 1 argument, but has been given none
- In the pattern: Just
- In the expression: (\ Just x -> x) :: Maybe a -> a
- In the expression: ((\ Just x -> x) :: Maybe a -> a) (Just 1)
-
-tcfail140.hs:19:1: error:
- Couldn't match expected type ‘t0 -> Bool’ with actual type ‘Int’
- The equation(s) for ‘g’ have two arguments,
- but its type ‘Int -> Int’ has only one
+
+tcfail140.hs:10:7: error:
+ • Couldn't match expected type ‘Integer -> t’
+ with actual type ‘Int’
+ • The function ‘f’ is applied to two arguments,
+ but its type ‘Int -> Int’ has only one
+ In the expression: f 3 9
+ In an equation for ‘bar’: bar = f 3 9
+ • Relevant bindings include bar :: t (bound at tcfail140.hs:10:1)
+
+tcfail140.hs:12:10: error:
+ • Couldn't match expected type ‘Integer -> t’
+ with actual type ‘Int’
+ • The operator ‘f’ takes two arguments,
+ but its type ‘Int -> Int’ has only one
+ In the expression: 3 `f` 4
+ In an equation for ‘rot’: rot xs = 3 `f` 4
+ • Relevant bindings include
+ rot :: r -> t (bound at tcfail140.hs:12:1)
+
+tcfail140.hs:14:15: error:
+ • Couldn't match expected type ‘a -> b’ with actual type ‘Int’
+ • The operator ‘f’ takes two arguments,
+ but its type ‘Int -> Int’ has only one
+ In the first argument of ‘map’, namely ‘(3 `f`)’
+ In the expression: map (3 `f`) xs
+ • Relevant bindings include
+ xs :: [a] (bound at tcfail140.hs:14:5)
+ bot :: [a] -> [b] (bound at tcfail140.hs:14:1)
+
+tcfail140.hs:16:8: error:
+ • The constructor ‘Just’ should have 1 argument, but has been given none
+ • In the pattern: Just
+ In the expression: (\ Just x -> x) :: Maybe a -> a
+ In the expression: ((\ Just x -> x) :: Maybe a -> a) (Just 1)
+
+tcfail140.hs:19:1: error:
+ • Couldn't match expected type ‘t0 -> Bool’ with actual type ‘Int’
+ • The equation(s) for ‘g’ have two arguments,
+ but its type ‘Int -> Int’ has only one
diff --git a/testsuite/tests/typecheck/should_fail/tcfail146.stderr b/testsuite/tests/typecheck/should_fail/tcfail146.stderr
index c1cce251a9..cf9341dfb3 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail146.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail146.stderr
@@ -1,6 +1,6 @@
tcfail146.hs:7:22: error:
- Constraint ‘SClass a’ used as a type
- In the type ‘SClass a’
- In the definition of data constructor ‘SCon’
- In the data declaration for ‘SData’
+ • Expected a type, but ‘SClass a’ has kind ‘Constraint’
+ • In the type ‘SClass a’
+ In the definition of data constructor ‘SCon’
+ In the data declaration for ‘SData’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail147.stderr b/testsuite/tests/typecheck/should_fail/tcfail147.stderr
index 68ec767eed..0c4db9a88e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail147.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail147.stderr
@@ -1,7 +1,7 @@
-tcfail147.hs:7:19:
+tcfail147.hs:7:19: error:
Expecting one more argument to ‘XClass’
- Expected a type, but ‘XClass’ has kind ‘k0 -> Constraint’
+ Expected a type, but ‘XClass’ has kind ‘* -> Constraint’
In the type ‘XClass’
In the definition of data constructor ‘XCon’
In the data declaration for ‘XData’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail151.stderr b/testsuite/tests/typecheck/should_fail/tcfail151.stderr
index 3e675c2ef0..5e4dcfcf2f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail151.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail151.stderr
@@ -6,3 +6,10 @@ tcfail151.hs:8:6:
Expecting one more argument to ‘Name a’
Expected a constraint, but ‘Name a’ has kind ‘* -> Constraint’
In the data declaration for ‘Exp’
+
+tcfail151.hs:8:30:
+ Expecting one more argument to ‘a’
+ Expected a type, but ‘a’ has kind ‘* -> *’
+ In the type ‘a’
+ In the definition of data constructor ‘MkExp’
+ In the data declaration for ‘Exp’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail159.stderr b/testsuite/tests/typecheck/should_fail/tcfail159.stderr
index 48c4ceb406..e28363a707 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail159.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail159.stderr
@@ -1,9 +1,7 @@
tcfail159.hs:9:11: error:
- Couldn't match kind ‘*’ with ‘#’
- When matching types
- t0 :: *
- (# Int, Int #) :: #
+ Couldn't match a lifted type with an unlifted type
+ When matching the kind of ‘(# Int, Int #)’
In the pattern: ~(# p, q #)
In a case alternative: ~(# p, q #) -> p
In the expression: case h x of { ~(# p, q #) -> p }
diff --git a/testsuite/tests/typecheck/should_fail/tcfail160.stderr b/testsuite/tests/typecheck/should_fail/tcfail160.stderr
index 7e17d5c476..46a7640cf9 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail160.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail160.stderr
@@ -1,5 +1,6 @@
-
-tcfail160.hs:7:8: error:
- The first argument of ‘T’ should have kind ‘* -> *’,
- but ‘Int’ has kind ‘*’
- In the type signature: g :: T Int
+
+tcfail160.hs:7:8: error:
+ • Expected kind ‘* -> *’, but ‘Int’ has kind ‘*’
+ • In the first argument of ‘T’, namely ‘Int’
+ 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 afe989206f..ce783bb5ab 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail161.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail161.stderr
@@ -1,5 +1,6 @@
-
-tcfail161.hs:5:7: error:
- Expecting one more argument to ‘Maybe’
- Expected kind ‘*’, but ‘Maybe’ has kind ‘* -> *’
- In the type signature: f :: [Maybe]
+
+tcfail161.hs:5:7: error:
+ • Expecting one more argument to ‘Maybe’
+ Expected a type, but ‘Maybe’ has kind ‘* -> *’
+ • In the type signature:
+ f :: [Maybe]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail181.stderr b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
index 6d483798b1..18309c10d1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail181.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
@@ -3,7 +3,7 @@ tcfail181.hs:17:9: error:
Could not deduce (Monad m0) arising from a use of ‘foo’
from the context: Monad m
bound by the inferred type of
- wog :: Monad m => t -> Something (m Bool) e
+ wog :: Monad m => r -> Something (m Bool) e
at tcfail181.hs:17:1-30
The type variable ‘m0’ is ambiguous
These potential instances exist:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail184.stderr b/testsuite/tests/typecheck/should_fail/tcfail184.stderr
index 8d349cd864..ed33280cf6 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail184.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail184.stderr
@@ -1,7 +1,7 @@
tcfail184.hs:8:19:
Illegal polymorphic or qualified type:
- forall a. Ord a => [a] -> [a]
+ forall a1. Ord a1 => [a1] -> [a1]
Perhaps you intended to use RankNTypes or Rank2Types
In the definition of data constructor ‘MkSwizzle’
In the newtype declaration for ‘Swizzle’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail195.stderr b/testsuite/tests/typecheck/should_fail/tcfail195.stderr
index c1cb85abce..c044a37117 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail195.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail195.stderr
@@ -1,5 +1,5 @@
-
-tcfail195.hs:6:3: error:
- Illegal polymorphic or qualified type: forall a. a
- In the definition of data constructor ‘Foo’
- In the data type declaration for ‘Foo’
+
+tcfail195.hs:6:3: error:
+ Illegal polymorphic or qualified type: forall a1. a1
+ In the definition of data constructor ‘Foo’
+ In the data type declaration for ‘Foo’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail196.stderr b/testsuite/tests/typecheck/should_fail/tcfail196.stderr
index bcb2c32700..0dbbda8f13 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail196.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail196.stderr
@@ -1,4 +1,5 @@
-
-tcfail196.hs:5:8: error:
- Illegal polymorphic or qualified type: forall a. a
- In the type signature: bar :: Num (forall a. a) => Int -> Int
+
+tcfail196.hs:5:8: error:
+ • Illegal polymorphic or qualified type: forall a1. a1
+ • 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 8b814870f2..802a77fa47 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail197.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail197.stderr
@@ -1,5 +1,6 @@
-
-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
+
+tcfail197.hs:5:8: error:
+ • Illegal polymorphic or qualified type: forall a1. a1
+ GHC doesn't yet support impredicative polymorphism
+ • In the type signature:
+ foo :: [forall a. a] -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail200.stderr b/testsuite/tests/typecheck/should_fail/tcfail200.stderr
index 7570047d0c..c8a6fa94f2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail200.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail200.stderr
@@ -1,11 +1,7 @@
tcfail200.hs:5:15: error:
- Couldn't match kind ‘*’ with ‘#’
- When matching types
- t1 :: *
- Int# :: #
- In the expression: 1#
- In the expression: (1#, 'c')
- In an equation for ‘x’: x = (1#, 'c')
- Relevant bindings include
- x :: (t1, Char) (bound at tcfail200.hs:5:9)
+ • Couldn't match a lifted type with an unlifted type
+ When matching the kind of ‘Int#’
+ • In the expression: 1#
+ In the expression: (1#, 'c')
+ In an equation for ‘x’: x = (1#, 'c')
diff --git a/testsuite/tests/typecheck/should_fail/tcfail201.stderr b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
index 03efc08ff2..c19aa0c274 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
@@ -3,7 +3,7 @@ tcfail201.hs:17:58: error:
• 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 a (c :: * -> *).
+ gfoldl' :: forall (c :: * -> *) a.
(forall a1 b. c (a1 -> b) -> a1 -> c b)
-> (forall g. g -> c g) -> a -> c a
at tcfail201.hs:15:12
diff --git a/testsuite/tests/typecheck/should_fail/tcfail212.stderr b/testsuite/tests/typecheck/should_fail/tcfail212.stderr
index e14e62bddf..8eb7e6e57f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail212.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail212.stderr
@@ -1,10 +1,22 @@
-
-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#)
+
+tcfail212.hs:10:7: error:
+ • Expecting one more argument to ‘Maybe’
+ Expected a type, but ‘Maybe’ has kind ‘* -> *’
+ • In the type signature:
+ f :: (Maybe, Either Int)
+
+tcfail212.hs:10:14: error:
+ • Expecting one more argument to ‘Either Int’
+ Expected a type, but ‘Either Int’ 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#)
+
+tcfail212.hs:13:13: error:
+ • Expecting a lifted type, but ‘Int#’ is unlifted
+ • In the type signature:
+ g :: (Int#, Int#)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail213.hs b/testsuite/tests/typecheck/should_fail/tcfail213.hs
index c93c4ad999..f9e44f8cf4 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail213.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail213.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TypeFamilies, ConstraintKinds #-}
module ShouldFail where
-import GHC.Prim( Constraint )
+import GHC.Exts( Constraint )
type family F a :: Constraint
diff --git a/testsuite/tests/typecheck/should_fail/tcfail214.hs b/testsuite/tests/typecheck/should_fail/tcfail214.hs
index 81162e678e..a88bbf2196 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail214.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail214.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TypeFamilies, ConstraintKinds #-}
module ShouldFail where
-import GHC.Prim( Constraint )
+import GHC.Exts( Constraint )
type family F a :: Constraint
diff --git a/testsuite/tests/typecheck/should_fail/tcfail217.stderr b/testsuite/tests/typecheck/should_fail/tcfail217.stderr
index c51b97d8b5..0dc1a593b1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail217.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail217.stderr
@@ -1,4 +1,4 @@
-tcfail217.hs:7:1:
+tcfail217.hs:7:1: error:
Cycle in class declaration (via superclasses): A -> Aish -> A
In the class declaration for ‘A’
diff --git a/testsuite/tests/typecheck/should_run/T10284.hs b/testsuite/tests/typecheck/should_run/T10284.hs
index 8fc86351a0..c703284e51 100644
--- a/testsuite/tests/typecheck/should_run/T10284.hs
+++ b/testsuite/tests/typecheck/should_run/T10284.hs
@@ -1,17 +1,16 @@
{-# OPTIONS_GHC -fdefer-type-errors -fno-warn-deferred-type-errors #-}
import Control.Exception
+import Data.Functor
a :: Int
a = 'a'
main :: IO ()
main = do
- catch (evaluate a)
+ catch (void $ evaluate a)
(\e -> do let err = show (e :: TypeError)
- putStrLn ("As expected, TypeError: " ++ err)
- return "")
- catch (evaluate a)
+ putStrLn ("As expected, TypeError: " ++ err))
+ catch (void $ evaluate a)
(\e -> do let err = show (e :: ErrorCall)
- putStrLn ("Something went horribly wrong: " ++ err)
- return "")
+ putStrLn ("Something went horribly wrong: " ++ err))
diff --git a/testsuite/tests/typecheck/should_run/T10284.stderr b/testsuite/tests/typecheck/should_run/T10284.stderr
index c7133f0172..622e2bfa45 100644
--- a/testsuite/tests/typecheck/should_run/T10284.stderr
+++ b/testsuite/tests/typecheck/should_run/T10284.stderr
@@ -1,5 +1,5 @@
-T10284: T10284.hs:14:19: error:
- Couldn't match expected type ‘()’ with actual type ‘Int’
- In the first argument of ‘evaluate’, namely ‘a’
- In the first argument of ‘catch’, namely ‘(evaluate a)’
+T10284: T10284.hs:7:5: error:
+ • Couldn't match expected type ‘Int’ with actual type ‘Char’
+ • In the expression: 'a'
+ In an equation for ‘a’: a = 'a'
(deferred type error)
diff --git a/testsuite/tests/typecheck/should_run/T10284.stdout b/testsuite/tests/typecheck/should_run/T10284.stdout
index 82f9518fc7..5d5c564c18 100644
--- a/testsuite/tests/typecheck/should_run/T10284.stdout
+++ b/testsuite/tests/typecheck/should_run/T10284.stdout
@@ -1,4 +1,4 @@
-As expected, TypeError: T10284.hs:6:5: error:
+As expected, TypeError: T10284.hs:7:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘Char’
• In the expression: 'a'
In an equation for ‘a’: a = 'a'
diff --git a/testsuite/tests/typecheck/should_run/T7861.stdout b/testsuite/tests/typecheck/should_run/T7861.stdout
index 6578f4363d..0f2678faac 100644
--- a/testsuite/tests/typecheck/should_run/T7861.stdout
+++ b/testsuite/tests/typecheck/should_run/T7861.stdout
@@ -1,2 +1 @@
"Hello 1"
-"Hello 2"
diff --git a/testsuite/tests/typecheck/should_run/tcrun043.hs b/testsuite/tests/typecheck/should_run/tcrun043.hs
index 4a745cf0b0..78accb8604 100644
--- a/testsuite/tests/typecheck/should_run/tcrun043.hs
+++ b/testsuite/tests/typecheck/should_run/tcrun043.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE GADTs, TypeFamilies, ConstraintKinds #-}
-import GHC.Prim ( Constraint )
+import GHC.Exts ( Constraint )
type Showish = Show
diff --git a/testsuite/tests/typecheck/should_run/tcrun044.hs b/testsuite/tests/typecheck/should_run/tcrun044.hs
index 029c4f9050..3e2f99381c 100644
--- a/testsuite/tests/typecheck/should_run/tcrun044.hs
+++ b/testsuite/tests/typecheck/should_run/tcrun044.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TypeFamilies, ConstraintKinds #-}
import qualified Data.Set as S
-import GHC.Prim ( Constraint )
+import GHC.Exts ( Constraint )
class RMonad m where
type RMonadCtxt m a :: Constraint
@@ -22,7 +22,7 @@ instance RMonad S.Set where
main = do
- print $ (returnR 1 ++ returnR 2) `bindR`
+ print $ (returnR 1 ++ returnR 2) `bindR`
(\x -> returnR (x + 1) ++ returnR (x + 2))
- print $ (returnR 1 `S.union` returnR 2) `bindR`
+ print $ (returnR 1 `S.union` returnR 2) `bindR`
(\x -> returnR (x + 1) `S.union` returnR (x + 2))
diff --git a/testsuite/tests/warnings/should_compile/T11077.stderr b/testsuite/tests/warnings/should_compile/T11077.stderr
index 3cb2cba2d0..b2cfa61546 100644
--- a/testsuite/tests/warnings/should_compile/T11077.stderr
+++ b/testsuite/tests/warnings/should_compile/T11077.stderr
@@ -1,3 +1,3 @@
T11077.hs:3:1: warning:
- Top-level binding with no type signature: foo :: forall t. t
+ Top-level binding with no type signature: foo :: forall r. r