diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-07-05 16:15:01 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-06 03:45:28 -0500 |
commit | e07e383a3250cb27a9128ad8d5c68def5c3df336 (patch) | |
tree | b580fd84319138a3508303356318ac9b78750009 /testsuite/tests | |
parent | 2125b1d6bea0c620e3a089603dace6bb38020c81 (diff) | |
download | haskell-e07e383a3250cb27a9128ad8d5c68def5c3df336.tar.gz |
Replace HsImplicitBndrs with HsOuterTyVarBndrs
This refactors the GHC AST to remove `HsImplicitBndrs` and replace it with
`HsOuterTyVarBndrs`, a type which records whether the outermost quantification
in a type is explicit (i.e., with an outermost, invisible `forall`) or
implicit. As a result of this refactoring, it is now evident in the AST where
the `forall`-or-nothing rule applies: it's all the places that use
`HsOuterTyVarBndrs`. See the revamped `Note [forall-or-nothing rule]` in
`GHC.Hs.Type` (previously in `GHC.Rename.HsType`).
Moreover, the places where `ScopedTypeVariables` brings lexically scoped type
variables into scope are a subset of the places that adhere to the
`forall`-or-nothing rule, so this also makes places that interact with
`ScopedTypeVariables` easier to find. See the revamped
`Note [Lexically scoped type variables]` in `GHC.Hs.Type` (previously in
`GHC.Tc.Gen.Sig`).
`HsOuterTyVarBndrs` are used in type signatures (see `HsOuterSigTyVarBndrs`)
and type family equations (see `HsOuterFamEqnTyVarBndrs`). The main difference
between the former and the latter is that the former cares about specificity
but the latter does not.
There are a number of knock-on consequences:
* There is now a dedicated `HsSigType` type, which is the combination of
`HsOuterSigTyVarBndrs` and `HsType`. `LHsSigType` is now an alias for an
`XRec` of `HsSigType`.
* Working out the details led us to a substantial refactoring of
the handling of explicit (user-written) and implicit type-variable
bindings in `GHC.Tc.Gen.HsType`.
Instead of a confusing family of higher order functions, we now
have a local data type, `SkolemInfo`, that controls how these
binders are kind-checked.
It remains very fiddly, not fully satisfying. But it's better
than it was.
Fixes #16762. Bumps the Haddock submodule.
Co-authored-by: Simon Peyton Jones <simonpj@microsoft.com>
Co-authored-by: Richard Eisenberg <rae@richarde.dev>
Co-authored-by: Zubin Duggal <zubin@cmi.ac.in>
Diffstat (limited to 'testsuite/tests')
38 files changed, 1318 insertions, 1186 deletions
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope5.stderr b/testsuite/tests/dependent/should_fail/BadTelescope5.stderr index d2ec36e5df..02daf9d742 100644 --- a/testsuite/tests/dependent/should_fail/BadTelescope5.stderr +++ b/testsuite/tests/dependent/should_fail/BadTelescope5.stderr @@ -2,10 +2,9 @@ BadTelescope5.hs:10:81: error: • Expected kind ‘k’, but ‘d’ has kind ‘Proxy a’ ‘k’ is a rigid type variable bound by - ‘forall a k (b :: k) (c :: Proxy b) (d :: Proxy a). - Proxy c -> SameKind b d’ + an explicit forall a k (b :: k) (c :: Proxy b) (d :: Proxy a) at BadTelescope5.hs:10:17 • In the second argument of ‘SameKind’, namely ‘d’ In the type signature: - bar :: forall a k (b :: k) (c :: Proxy b) (d :: Proxy a). - Proxy c -> SameKind b d + bar :: forall a k (b :: k) (c :: Proxy b) (d :: Proxy a). Proxy c + -> SameKind b d diff --git a/testsuite/tests/dependent/should_fail/T14066.stderr b/testsuite/tests/dependent/should_fail/T14066.stderr index d958f9a519..240108c296 100644 --- a/testsuite/tests/dependent/should_fail/T14066.stderr +++ b/testsuite/tests/dependent/should_fail/T14066.stderr @@ -3,7 +3,7 @@ T14066.hs:15:59: error: • Expected kind ‘k0’, but ‘b’ has kind ‘k’ because kind variable ‘k’ would escape its scope This (rigid, skolem) kind variable is bound by - ‘forall k (b :: k). SameKind a b’ + an explicit forall k (b :: k) at T14066.hs:15:29-59 • In the second argument of ‘SameKind’, namely ‘b’ In the type signature: g :: forall k (b :: k). SameKind a b diff --git a/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr b/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr index a919095337..d642d6201c 100644 --- a/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr +++ b/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr @@ -3,7 +3,7 @@ TypeSkolEscape.hs:9:52: error: • Expected kind ‘k0’, but ‘a’ has kind ‘TYPE v’ because kind variable ‘v’ would escape its scope This (rigid, skolem) kind variable is bound by - ‘forall (v :: RuntimeRep) (a :: TYPE v). a’ + an explicit forall (v :: RuntimeRep) (a :: TYPE v) at TypeSkolEscape.hs:9:12-52 • In the type ‘forall (v :: RuntimeRep) (a :: TYPE v). a’ In the type declaration for ‘Bad’ diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr index 2e5452129b..2d9cede53c 100644 --- a/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr @@ -39,33 +39,36 @@ [({ T17544.hs:6:3-4 } (Unqual {OccName: f1}))] - (HsIB - (NoExtField) - ({ T17544.hs:6:9-16 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ T17544.hs:6:9 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:6:9 } - (Unqual - {OccName: a})))) - ({ T17544.hs:6:14-16 } - (HsDocTy - (NoExtField) - ({ T17544.hs:6:14-16 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:6:14-16 } - (Unqual - {OccName: Int})))) - ({ T17544.hs:7:5-23 } - (HsDocString - " comment on Int")))))))))] + ({ T17544.hs:6:9-16 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:6:9-16 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ T17544.hs:6:9 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:6:9 } + (Unqual + {OccName: a})))) + ({ T17544.hs:6:14-16 } + (HsDocTy + (NoExtField) + ({ T17544.hs:6:14-16 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:6:14-16 } + (Unqual + {OccName: Int})))) + ({ T17544.hs:7:5-23 } + (HsDocString + " comment on Int"))))))))))] {Bag(Located (HsBind GhcPs)): []} [] @@ -100,27 +103,30 @@ [({ T17544.hs:10:3-4 } (Unqual {OccName: f2}))] - (HsIB - (NoExtField) - ({ T17544.hs:10:9-16 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ T17544.hs:10:9 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:10:9 } - (Unqual - {OccName: a})))) - ({ T17544.hs:10:14-16 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:10:14-16 } - (Unqual - {OccName: Int})))))))))] + ({ T17544.hs:10:9-16 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:10:9-16 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ T17544.hs:10:9 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:10:9 } + (Unqual + {OccName: a})))) + ({ T17544.hs:10:14-16 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:10:14-16 } + (Unqual + {OccName: Int}))))))))))] {Bag(Located (HsBind GhcPs)): []} [] @@ -158,27 +164,30 @@ [({ T17544.hs:14:3-4 } (Unqual {OccName: f3}))] - (HsIB - (NoExtField) - ({ T17544.hs:14:9-16 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ T17544.hs:14:9 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:14:9 } - (Unqual - {OccName: a})))) - ({ T17544.hs:14:14-16 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:14:14-16 } - (Unqual - {OccName: Int})))))))))] + ({ T17544.hs:14:9-16 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:14:9-16 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ T17544.hs:14:9 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:14:9 } + (Unqual + {OccName: a})))) + ({ T17544.hs:14:14-16 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:14:14-16 } + (Unqual + {OccName: Int}))))))))))] {Bag(Located (HsBind GhcPs)): []} [] @@ -219,27 +228,30 @@ [({ T17544.hs:18:3-4 } (Unqual {OccName: f4}))] - (HsIB - (NoExtField) - ({ T17544.hs:18:9-16 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ T17544.hs:18:9 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:18:9 } - (Unqual - {OccName: a})))) - ({ T17544.hs:18:14-16 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:18:14-16 } - (Unqual - {OccName: Int}))))))))) + ({ T17544.hs:18:9-16 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:18:9-16 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ T17544.hs:18:9 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:18:9 } + (Unqual + {OccName: a})))) + ({ T17544.hs:18:14-16 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:18:14-16 } + (Unqual + {OccName: Int})))))))))) ,({ T17544.hs:20:3-16 } (ClassOpSig (NoExtField) @@ -247,27 +259,30 @@ [({ T17544.hs:20:3-4 } (Unqual {OccName: g4}))] - (HsIB - (NoExtField) - ({ T17544.hs:20:9-16 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ T17544.hs:20:9 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:20:9 } - (Unqual - {OccName: a})))) - ({ T17544.hs:20:14-16 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:20:14-16 } - (Unqual - {OccName: Int})))))))))] + ({ T17544.hs:20:9-16 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:20:9-16 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ T17544.hs:20:9 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:20:9 } + (Unqual + {OccName: a})))) + ({ T17544.hs:20:14-16 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:20:14-16 } + (Unqual + {OccName: Int}))))))))))] {Bag(Located (HsBind GhcPs)): []} [] @@ -327,87 +342,89 @@ (NoExtField) (ClsInstDecl (NoExtField) - (HsIB - (NoExtField) - ({ T17544.hs:23:10-15 } - (HsAppTy - (NoExtField) - ({ T17544.hs:23:10-11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:23:10-11 } - (Unqual - {OccName: C5})))) - ({ T17544.hs:23:13-15 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:23:13-15 } - (Unqual - {OccName: Int}))))))) + ({ T17544.hs:23:10-15 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:23:10-15 } + (HsAppTy + (NoExtField) + ({ T17544.hs:23:10-11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:23:10-11 } + (Unqual + {OccName: C5})))) + ({ T17544.hs:23:13-15 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:23:13-15 } + (Unqual + {OccName: Int})))))))) {Bag(Located (HsBind GhcPs)): []} [] [] [({ T17544.hs:(24,3)-(25,18) } (DataFamInstDecl - (HsIB + (FamEqn (NoExtField) - (FamEqn + ({ T17544.hs:24:8-9 } + (Unqual + {OccName: D5})) + (HsOuterImplicit + (NoExtField)) + [(HsValArg + ({ T17544.hs:24:11-13 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:24:11-13 } + (Unqual + {OccName: Int})))))] + (Prefix) + (HsDataDefn (NoExtField) - ({ T17544.hs:24:8-9 } - (Unqual - {OccName: D5})) + (DataType) + ({ <no location info> } + []) + (Nothing) (Nothing) - [(HsValArg - ({ T17544.hs:24:11-13 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:24:11-13 } + [({ T17544.hs:25:5-18 } + (ConDeclGADT + (NoExtField) + [({ T17544.hs:25:5-8 } (Unqual - {OccName: Int})))))] - (Prefix) - (HsDataDefn - (NoExtField) - (DataType) - ({ <no location info> } - []) - (Nothing) - (Nothing) - [({ T17544.hs:25:5-18 } - (ConDeclGADT - (NoExtField) - [({ T17544.hs:25:5-8 } - (Unqual - {OccName: MkD5}))] - ({ T17544.hs:25:13-18 } - (False)) - [] - (Nothing) - (PrefixConGADT - []) - ({ T17544.hs:25:13-18 } - (HsAppTy - (NoExtField) - ({ T17544.hs:25:13-14 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:25:13-14 } - (Unqual - {OccName: D5})))) - ({ T17544.hs:25:16-18 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:25:16-18 } - (Unqual - {OccName: Int})))))) - (Nothing)))] - ({ <no location info> } - []))))))] + {OccName: MkD5}))] + ({ T17544.hs:25:13-18 } + (HsOuterImplicit + (NoExtField))) + (Nothing) + (PrefixConGADT + []) + ({ T17544.hs:25:13-18 } + (HsAppTy + (NoExtField) + ({ T17544.hs:25:13-14 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:25:13-14 } + (Unqual + {OccName: D5})))) + ({ T17544.hs:25:16-18 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:25:16-18 } + (Unqual + {OccName: Int})))))) + (Nothing)))] + ({ <no location info> } + [])))))] (Nothing))))) ,({ T17544.hs:28:1-30 } (TyClD @@ -463,87 +480,89 @@ (NoExtField) (ClsInstDecl (NoExtField) - (HsIB - (NoExtField) - ({ T17544.hs:29:10-15 } - (HsAppTy - (NoExtField) - ({ T17544.hs:29:10-11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:29:10-11 } - (Unqual - {OccName: C6})))) - ({ T17544.hs:29:13-15 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:29:13-15 } - (Unqual - {OccName: Int}))))))) + ({ T17544.hs:29:10-15 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:29:10-15 } + (HsAppTy + (NoExtField) + ({ T17544.hs:29:10-11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:29:10-11 } + (Unqual + {OccName: C6})))) + ({ T17544.hs:29:13-15 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:29:13-15 } + (Unqual + {OccName: Int})))))))) {Bag(Located (HsBind GhcPs)): []} [] [] [({ T17544.hs:(30,3)-(31,18) } (DataFamInstDecl - (HsIB + (FamEqn (NoExtField) - (FamEqn + ({ T17544.hs:30:8-9 } + (Unqual + {OccName: D6})) + (HsOuterImplicit + (NoExtField)) + [(HsValArg + ({ T17544.hs:30:11-13 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:30:11-13 } + (Unqual + {OccName: Int})))))] + (Prefix) + (HsDataDefn (NoExtField) - ({ T17544.hs:30:8-9 } - (Unqual - {OccName: D6})) + (DataType) + ({ <no location info> } + []) + (Nothing) (Nothing) - [(HsValArg - ({ T17544.hs:30:11-13 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:30:11-13 } + [({ T17544.hs:31:5-18 } + (ConDeclGADT + (NoExtField) + [({ T17544.hs:31:5-8 } (Unqual - {OccName: Int})))))] - (Prefix) - (HsDataDefn - (NoExtField) - (DataType) - ({ <no location info> } - []) - (Nothing) - (Nothing) - [({ T17544.hs:31:5-18 } - (ConDeclGADT - (NoExtField) - [({ T17544.hs:31:5-8 } - (Unqual - {OccName: MkD6}))] - ({ T17544.hs:31:13-18 } - (False)) - [] - (Nothing) - (PrefixConGADT - []) - ({ T17544.hs:31:13-18 } - (HsAppTy - (NoExtField) - ({ T17544.hs:31:13-14 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:31:13-14 } - (Unqual - {OccName: D6})))) - ({ T17544.hs:31:16-18 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:31:16-18 } - (Unqual - {OccName: Int})))))) - (Nothing)))] - ({ <no location info> } - []))))))] + {OccName: MkD6}))] + ({ T17544.hs:31:13-18 } + (HsOuterImplicit + (NoExtField))) + (Nothing) + (PrefixConGADT + []) + ({ T17544.hs:31:13-18 } + (HsAppTy + (NoExtField) + ({ T17544.hs:31:13-14 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:31:13-14 } + (Unqual + {OccName: D6})))) + ({ T17544.hs:31:16-18 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:31:16-18 } + (Unqual + {OccName: Int})))))) + (Nothing)))] + ({ <no location info> } + [])))))] (Nothing))))) ,({ T17544.hs:34:1-30 } (TyClD @@ -599,87 +618,89 @@ (NoExtField) (ClsInstDecl (NoExtField) - (HsIB - (NoExtField) - ({ T17544.hs:35:10-15 } - (HsAppTy - (NoExtField) - ({ T17544.hs:35:10-11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:35:10-11 } - (Unqual - {OccName: C7})))) - ({ T17544.hs:35:13-15 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:35:13-15 } - (Unqual - {OccName: Int}))))))) + ({ T17544.hs:35:10-15 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:35:10-15 } + (HsAppTy + (NoExtField) + ({ T17544.hs:35:10-11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:35:10-11 } + (Unqual + {OccName: C7})))) + ({ T17544.hs:35:13-15 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:35:13-15 } + (Unqual + {OccName: Int})))))))) {Bag(Located (HsBind GhcPs)): []} [] [] [({ T17544.hs:(36,3)-(37,18) } (DataFamInstDecl - (HsIB + (FamEqn (NoExtField) - (FamEqn + ({ T17544.hs:36:8-9 } + (Unqual + {OccName: D7})) + (HsOuterImplicit + (NoExtField)) + [(HsValArg + ({ T17544.hs:36:11-13 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:36:11-13 } + (Unqual + {OccName: Int})))))] + (Prefix) + (HsDataDefn (NoExtField) - ({ T17544.hs:36:8-9 } - (Unqual - {OccName: D7})) + (DataType) + ({ <no location info> } + []) + (Nothing) (Nothing) - [(HsValArg - ({ T17544.hs:36:11-13 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:36:11-13 } + [({ T17544.hs:37:5-18 } + (ConDeclGADT + (NoExtField) + [({ T17544.hs:37:5-8 } (Unqual - {OccName: Int})))))] - (Prefix) - (HsDataDefn - (NoExtField) - (DataType) - ({ <no location info> } - []) - (Nothing) - (Nothing) - [({ T17544.hs:37:5-18 } - (ConDeclGADT - (NoExtField) - [({ T17544.hs:37:5-8 } - (Unqual - {OccName: MkD7}))] - ({ T17544.hs:37:13-18 } - (False)) - [] - (Nothing) - (PrefixConGADT - []) - ({ T17544.hs:37:13-18 } - (HsAppTy - (NoExtField) - ({ T17544.hs:37:13-14 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:37:13-14 } - (Unqual - {OccName: D7})))) - ({ T17544.hs:37:16-18 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:37:16-18 } - (Unqual - {OccName: Int})))))) - (Nothing)))] - ({ <no location info> } - []))))))] + {OccName: MkD7}))] + ({ T17544.hs:37:13-18 } + (HsOuterImplicit + (NoExtField))) + (Nothing) + (PrefixConGADT + []) + ({ T17544.hs:37:13-18 } + (HsAppTy + (NoExtField) + ({ T17544.hs:37:13-14 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:37:13-14 } + (Unqual + {OccName: D7})))) + ({ T17544.hs:37:16-18 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:37:16-18 } + (Unqual + {OccName: Int})))))) + (Nothing)))] + ({ <no location info> } + [])))))] (Nothing))))) ,({ T17544.hs:40:1-30 } (TyClD @@ -735,87 +756,89 @@ (NoExtField) (ClsInstDecl (NoExtField) - (HsIB - (NoExtField) - ({ T17544.hs:41:10-15 } - (HsAppTy - (NoExtField) - ({ T17544.hs:41:10-11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:41:10-11 } - (Unqual - {OccName: C8})))) - ({ T17544.hs:41:13-15 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:41:13-15 } - (Unqual - {OccName: Int}))))))) + ({ T17544.hs:41:10-15 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:41:10-15 } + (HsAppTy + (NoExtField) + ({ T17544.hs:41:10-11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:41:10-11 } + (Unqual + {OccName: C8})))) + ({ T17544.hs:41:13-15 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:41:13-15 } + (Unqual + {OccName: Int})))))))) {Bag(Located (HsBind GhcPs)): []} [] [] [({ T17544.hs:(42,3)-(43,18) } (DataFamInstDecl - (HsIB + (FamEqn (NoExtField) - (FamEqn + ({ T17544.hs:42:8-9 } + (Unqual + {OccName: D8})) + (HsOuterImplicit + (NoExtField)) + [(HsValArg + ({ T17544.hs:42:11-13 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:42:11-13 } + (Unqual + {OccName: Int})))))] + (Prefix) + (HsDataDefn (NoExtField) - ({ T17544.hs:42:8-9 } - (Unqual - {OccName: D8})) + (DataType) + ({ <no location info> } + []) + (Nothing) (Nothing) - [(HsValArg - ({ T17544.hs:42:11-13 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:42:11-13 } + [({ T17544.hs:43:5-18 } + (ConDeclGADT + (NoExtField) + [({ T17544.hs:43:5-8 } (Unqual - {OccName: Int})))))] - (Prefix) - (HsDataDefn - (NoExtField) - (DataType) - ({ <no location info> } - []) - (Nothing) - (Nothing) - [({ T17544.hs:43:5-18 } - (ConDeclGADT - (NoExtField) - [({ T17544.hs:43:5-8 } - (Unqual - {OccName: MkD8}))] - ({ T17544.hs:43:13-18 } - (False)) - [] - (Nothing) - (PrefixConGADT - []) - ({ T17544.hs:43:13-18 } - (HsAppTy - (NoExtField) - ({ T17544.hs:43:13-14 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:43:13-14 } - (Unqual - {OccName: D8})))) - ({ T17544.hs:43:16-18 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:43:16-18 } - (Unqual - {OccName: Int})))))) - (Nothing)))] - ({ <no location info> } - []))))))] + {OccName: MkD8}))] + ({ T17544.hs:43:13-18 } + (HsOuterImplicit + (NoExtField))) + (Nothing) + (PrefixConGADT + []) + ({ T17544.hs:43:13-18 } + (HsAppTy + (NoExtField) + ({ T17544.hs:43:13-14 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:43:13-14 } + (Unqual + {OccName: D8})))) + ({ T17544.hs:43:16-18 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:43:16-18 } + (Unqual + {OccName: Int})))))) + (Nothing)))] + ({ <no location info> } + [])))))] (Nothing))))) ,({ T17544.hs:46:1-30 } (TyClD @@ -871,87 +894,89 @@ (NoExtField) (ClsInstDecl (NoExtField) - (HsIB - (NoExtField) - ({ T17544.hs:47:10-15 } - (HsAppTy - (NoExtField) - ({ T17544.hs:47:10-11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:47:10-11 } - (Unqual - {OccName: C9})))) - ({ T17544.hs:47:13-15 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:47:13-15 } - (Unqual - {OccName: Int}))))))) + ({ T17544.hs:47:10-15 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:47:10-15 } + (HsAppTy + (NoExtField) + ({ T17544.hs:47:10-11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:47:10-11 } + (Unqual + {OccName: C9})))) + ({ T17544.hs:47:13-15 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:47:13-15 } + (Unqual + {OccName: Int})))))))) {Bag(Located (HsBind GhcPs)): []} [] [] [({ T17544.hs:(48,3)-(49,18) } (DataFamInstDecl - (HsIB + (FamEqn (NoExtField) - (FamEqn + ({ T17544.hs:48:8-9 } + (Unqual + {OccName: D9})) + (HsOuterImplicit + (NoExtField)) + [(HsValArg + ({ T17544.hs:48:11-13 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:48:11-13 } + (Unqual + {OccName: Int})))))] + (Prefix) + (HsDataDefn (NoExtField) - ({ T17544.hs:48:8-9 } - (Unqual - {OccName: D9})) + (DataType) + ({ <no location info> } + []) + (Nothing) (Nothing) - [(HsValArg - ({ T17544.hs:48:11-13 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:48:11-13 } + [({ T17544.hs:49:5-18 } + (ConDeclGADT + (NoExtField) + [({ T17544.hs:49:5-8 } (Unqual - {OccName: Int})))))] - (Prefix) - (HsDataDefn - (NoExtField) - (DataType) - ({ <no location info> } - []) - (Nothing) - (Nothing) - [({ T17544.hs:49:5-18 } - (ConDeclGADT - (NoExtField) - [({ T17544.hs:49:5-8 } - (Unqual - {OccName: MkD9}))] - ({ T17544.hs:49:13-18 } - (False)) - [] - (Nothing) - (PrefixConGADT - []) - ({ T17544.hs:49:13-18 } - (HsAppTy - (NoExtField) - ({ T17544.hs:49:13-14 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:49:13-14 } - (Unqual - {OccName: D9})))) - ({ T17544.hs:49:16-18 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:49:16-18 } - (Unqual - {OccName: Int})))))) - (Nothing)))] - ({ <no location info> } - []))))))] + {OccName: MkD9}))] + ({ T17544.hs:49:13-18 } + (HsOuterImplicit + (NoExtField))) + (Nothing) + (PrefixConGADT + []) + ({ T17544.hs:49:13-18 } + (HsAppTy + (NoExtField) + ({ T17544.hs:49:13-14 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:49:13-14 } + (Unqual + {OccName: D9})))) + ({ T17544.hs:49:16-18 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:49:16-18 } + (Unqual + {OccName: Int})))))) + (Nothing)))] + ({ <no location info> } + [])))))] (Nothing))))) ,({ T17544.hs:52:1-32 } (TyClD @@ -1007,87 +1032,89 @@ (NoExtField) (ClsInstDecl (NoExtField) - (HsIB - (NoExtField) - ({ T17544.hs:53:10-16 } - (HsAppTy - (NoExtField) - ({ T17544.hs:53:10-12 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:53:10-12 } - (Unqual - {OccName: C10})))) - ({ T17544.hs:53:14-16 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:53:14-16 } - (Unqual - {OccName: Int}))))))) + ({ T17544.hs:53:10-16 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544.hs:53:10-16 } + (HsAppTy + (NoExtField) + ({ T17544.hs:53:10-12 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:53:10-12 } + (Unqual + {OccName: C10})))) + ({ T17544.hs:53:14-16 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:53:14-16 } + (Unqual + {OccName: Int})))))))) {Bag(Located (HsBind GhcPs)): []} [] [] [({ T17544.hs:(54,3)-(55,20) } (DataFamInstDecl - (HsIB + (FamEqn (NoExtField) - (FamEqn + ({ T17544.hs:54:8-10 } + (Unqual + {OccName: D10})) + (HsOuterImplicit + (NoExtField)) + [(HsValArg + ({ T17544.hs:54:12-14 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:54:12-14 } + (Unqual + {OccName: Int})))))] + (Prefix) + (HsDataDefn (NoExtField) - ({ T17544.hs:54:8-10 } - (Unqual - {OccName: D10})) + (DataType) + ({ <no location info> } + []) + (Nothing) (Nothing) - [(HsValArg - ({ T17544.hs:54:12-14 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:54:12-14 } + [({ T17544.hs:55:5-20 } + (ConDeclGADT + (NoExtField) + [({ T17544.hs:55:5-9 } (Unqual - {OccName: Int})))))] - (Prefix) - (HsDataDefn - (NoExtField) - (DataType) - ({ <no location info> } - []) - (Nothing) - (Nothing) - [({ T17544.hs:55:5-20 } - (ConDeclGADT - (NoExtField) - [({ T17544.hs:55:5-9 } - (Unqual - {OccName: MkD10}))] - ({ T17544.hs:55:14-20 } - (False)) - [] - (Nothing) - (PrefixConGADT - []) - ({ T17544.hs:55:14-20 } - (HsAppTy - (NoExtField) - ({ T17544.hs:55:14-16 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:55:14-16 } - (Unqual - {OccName: D10})))) - ({ T17544.hs:55:18-20 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544.hs:55:18-20 } - (Unqual - {OccName: Int})))))) - (Nothing)))] - ({ <no location info> } - []))))))] + {OccName: MkD10}))] + ({ T17544.hs:55:14-20 } + (HsOuterImplicit + (NoExtField))) + (Nothing) + (PrefixConGADT + []) + ({ T17544.hs:55:14-20 } + (HsAppTy + (NoExtField) + ({ T17544.hs:55:14-16 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:55:14-16 } + (Unqual + {OccName: D10})))) + ({ T17544.hs:55:18-20 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544.hs:55:18-20 } + (Unqual + {OccName: Int})))))) + (Nothing)))] + ({ <no location info> } + [])))))] (Nothing))))) ,({ T17544.hs:56:1-38 } (DocD diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr index d1ff09f56c..b8cb9eedf2 100644 --- a/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr @@ -36,8 +36,8 @@ (Unqual {OccName: MkFoo}))] ({ T17544_kw.hs:16:18-20 } - (False)) - [] + (HsOuterImplicit + (NoExtField))) (Nothing) (PrefixConGADT []) @@ -80,8 +80,8 @@ (Unqual {OccName: MkBar}))] ({ T17544_kw.hs:19:18-26 } - (False)) - [] + (HsOuterImplicit + (NoExtField))) (Nothing) (PrefixConGADT [(HsScaled @@ -134,15 +134,18 @@ [({ T17544_kw.hs:24:5-13 } (Unqual {OccName: clsmethod}))] - (HsIB - (NoExtField) - ({ T17544_kw.hs:24:18 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ T17544_kw.hs:24:18 } - (Unqual - {OccName: a})))))))] + ({ T17544_kw.hs:24:18 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ T17544_kw.hs:24:18 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ T17544_kw.hs:24:18 } + (Unqual + {OccName: a}))))))))] {Bag(Located (HsBind GhcPs)): []} [] diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr index dc48459d17..31f8b10c25 100644 --- a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr @@ -88,92 +88,90 @@ (ClosedTypeFamily (Just [({ DumpParsedAst.hs:10:3-36 } - (HsIB + (FamEqn (NoExtField) - (FamEqn - (NoExtField) - ({ DumpParsedAst.hs:10:3-8 } - (Unqual - {OccName: Length})) - (Nothing) - [(HsValArg - ({ DumpParsedAst.hs:10:10-17 } - (HsParTy - (NoExtField) - ({ DumpParsedAst.hs:10:11-16 } - (HsOpTy - (NoExtField) - ({ DumpParsedAst.hs:10:11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:10:11 } - (Unqual - {OccName: a})))) - ({ DumpParsedAst.hs:10:13 } - (Exact - {Name: :})) - ({ DumpParsedAst.hs:10:15-16 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:10:15-16 } - (Unqual - {OccName: as})))))))))] - (Prefix) - ({ DumpParsedAst.hs:10:21-36 } - (HsAppTy - (NoExtField) - ({ DumpParsedAst.hs:10:21-24 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:10:21-24 } - (Unqual - {OccName: Succ})))) - ({ DumpParsedAst.hs:10:26-36 } - (HsParTy - (NoExtField) - ({ DumpParsedAst.hs:10:27-35 } - (HsAppTy - (NoExtField) - ({ DumpParsedAst.hs:10:27-32 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:10:27-32 } - (Unqual - {OccName: Length})))) - ({ DumpParsedAst.hs:10:34-35 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:10:34-35 } - (Unqual - {OccName: as}))))))))))))) + ({ DumpParsedAst.hs:10:3-8 } + (Unqual + {OccName: Length})) + (HsOuterImplicit + (NoExtField)) + [(HsValArg + ({ DumpParsedAst.hs:10:10-17 } + (HsParTy + (NoExtField) + ({ DumpParsedAst.hs:10:11-16 } + (HsOpTy + (NoExtField) + ({ DumpParsedAst.hs:10:11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:10:11 } + (Unqual + {OccName: a})))) + ({ DumpParsedAst.hs:10:13 } + (Exact + {Name: :})) + ({ DumpParsedAst.hs:10:15-16 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:10:15-16 } + (Unqual + {OccName: as})))))))))] + (Prefix) + ({ DumpParsedAst.hs:10:21-36 } + (HsAppTy + (NoExtField) + ({ DumpParsedAst.hs:10:21-24 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:10:21-24 } + (Unqual + {OccName: Succ})))) + ({ DumpParsedAst.hs:10:26-36 } + (HsParTy + (NoExtField) + ({ DumpParsedAst.hs:10:27-35 } + (HsAppTy + (NoExtField) + ({ DumpParsedAst.hs:10:27-32 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:10:27-32 } + (Unqual + {OccName: Length})))) + ({ DumpParsedAst.hs:10:34-35 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:10:34-35 } + (Unqual + {OccName: as})))))))))))) ,({ DumpParsedAst.hs:11:3-24 } - (HsIB + (FamEqn (NoExtField) - (FamEqn - (NoExtField) - ({ DumpParsedAst.hs:11:3-8 } - (Unqual - {OccName: Length})) - (Nothing) - [(HsValArg - ({ DumpParsedAst.hs:11:10-12 } - (HsExplicitListTy - (NoExtField) - (IsPromoted) - [])))] - (Prefix) - ({ DumpParsedAst.hs:11:21-24 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:11:21-24 } - (Unqual - {OccName: Zero})))))))])) + ({ DumpParsedAst.hs:11:3-8 } + (Unqual + {OccName: Length})) + (HsOuterImplicit + (NoExtField)) + [(HsValArg + ({ DumpParsedAst.hs:11:10-12 } + (HsExplicitListTy + (NoExtField) + (IsPromoted) + [])))] + (Prefix) + ({ DumpParsedAst.hs:11:21-24 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:11:21-24 } + (Unqual + {OccName: Zero}))))))])) ({ DumpParsedAst.hs:9:13-18 } (Unqual {OccName: Length})) @@ -294,77 +292,76 @@ (ClosedTypeFamily (Just [({ DumpParsedAst.hs:17:3-30 } - (HsIB + (FamEqn (NoExtField) - (FamEqn - (NoExtField) - ({ DumpParsedAst.hs:17:3-4 } - (Unqual - {OccName: F1})) - (Nothing) - [(HsTypeArg - { DumpParsedAst.hs:17:6-11 } - ({ DumpParsedAst.hs:17:7-11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:17:7-11 } - (Unqual - {OccName: Peano}))))) - ,(HsValArg - ({ DumpParsedAst.hs:17:13 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:17:13 } - (Unqual - {OccName: a}))))) - ,(HsValArg - ({ DumpParsedAst.hs:17:15 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:17:15 } - (Unqual - {OccName: f})))))] - (Prefix) - ({ DumpParsedAst.hs:17:19-30 } - (HsAppTy - (NoExtField) - ({ DumpParsedAst.hs:17:19-28 } - (HsAppTy - (NoExtField) - ({ DumpParsedAst.hs:17:19-26 } - (HsAppKindTy - { DumpParsedAst.hs:17:21-26 } - ({ DumpParsedAst.hs:17:19 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:17:19 } - (Unqual - {OccName: T})))) - ({ DumpParsedAst.hs:17:22-26 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:17:22-26 } - (Unqual - {OccName: Peano})))))) - ({ DumpParsedAst.hs:17:28 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:17:28 } - (Unqual - {OccName: f})))))) - ({ DumpParsedAst.hs:17:30 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpParsedAst.hs:17:30 } - (Unqual - {OccName: a})))))))))])) + ({ DumpParsedAst.hs:17:3-4 } + (Unqual + {OccName: F1})) + (HsOuterImplicit + (NoExtField)) + [(HsTypeArg + { DumpParsedAst.hs:17:6-11 } + ({ DumpParsedAst.hs:17:7-11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:17:7-11 } + (Unqual + {OccName: Peano}))))) + ,(HsValArg + ({ DumpParsedAst.hs:17:13 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:17:13 } + (Unqual + {OccName: a}))))) + ,(HsValArg + ({ DumpParsedAst.hs:17:15 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:17:15 } + (Unqual + {OccName: f})))))] + (Prefix) + ({ DumpParsedAst.hs:17:19-30 } + (HsAppTy + (NoExtField) + ({ DumpParsedAst.hs:17:19-28 } + (HsAppTy + (NoExtField) + ({ DumpParsedAst.hs:17:19-26 } + (HsAppKindTy + { DumpParsedAst.hs:17:21-26 } + ({ DumpParsedAst.hs:17:19 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:17:19 } + (Unqual + {OccName: T})))) + ({ DumpParsedAst.hs:17:22-26 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:17:22-26 } + (Unqual + {OccName: Peano})))))) + ({ DumpParsedAst.hs:17:28 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:17:28 } + (Unqual + {OccName: f})))))) + ({ DumpParsedAst.hs:17:30 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpParsedAst.hs:17:30 } + (Unqual + {OccName: a}))))))))])) ({ DumpParsedAst.hs:16:13-14 } (Unqual {OccName: F1})) diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr index e869299a76..29377597ae 100644 --- a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr @@ -124,84 +124,82 @@ (ClosedTypeFamily (Just [({ DumpRenamedAst.hs:12:3-36 } - (HsIB - [{Name: a} - ,{Name: as}] - (FamEqn - (NoExtField) - ({ DumpRenamedAst.hs:12:3-8 } - {Name: DumpRenamedAst.Length}) - (Nothing) - [(HsValArg - ({ DumpRenamedAst.hs:12:10-17 } - (HsParTy - (NoExtField) - ({ DumpRenamedAst.hs:12:11-16 } - (HsOpTy - (NoExtField) - ({ DumpRenamedAst.hs:12:11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:12:11 } - {Name: a}))) - ({ DumpRenamedAst.hs:12:13 } - {Name: :}) - ({ DumpRenamedAst.hs:12:15-16 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:12:15-16 } - {Name: as}))))))))] - (Prefix) - ({ DumpRenamedAst.hs:12:21-36 } - (HsAppTy - (NoExtField) - ({ DumpRenamedAst.hs:12:21-24 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:12:21-24 } - {Name: DumpRenamedAst.Succ}))) - ({ DumpRenamedAst.hs:12:26-36 } - (HsParTy - (NoExtField) - ({ DumpRenamedAst.hs:12:27-35 } - (HsAppTy - (NoExtField) - ({ DumpRenamedAst.hs:12:27-32 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:12:27-32 } - {Name: DumpRenamedAst.Length}))) - ({ DumpRenamedAst.hs:12:34-35 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:12:34-35 } - {Name: as})))))))))))) + (FamEqn + (NoExtField) + ({ DumpRenamedAst.hs:12:3-8 } + {Name: DumpRenamedAst.Length}) + (HsOuterImplicit + [{Name: a} + ,{Name: as}]) + [(HsValArg + ({ DumpRenamedAst.hs:12:10-17 } + (HsParTy + (NoExtField) + ({ DumpRenamedAst.hs:12:11-16 } + (HsOpTy + (NoExtField) + ({ DumpRenamedAst.hs:12:11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:12:11 } + {Name: a}))) + ({ DumpRenamedAst.hs:12:13 } + {Name: :}) + ({ DumpRenamedAst.hs:12:15-16 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:12:15-16 } + {Name: as}))))))))] + (Prefix) + ({ DumpRenamedAst.hs:12:21-36 } + (HsAppTy + (NoExtField) + ({ DumpRenamedAst.hs:12:21-24 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:12:21-24 } + {Name: DumpRenamedAst.Succ}))) + ({ DumpRenamedAst.hs:12:26-36 } + (HsParTy + (NoExtField) + ({ DumpRenamedAst.hs:12:27-35 } + (HsAppTy + (NoExtField) + ({ DumpRenamedAst.hs:12:27-32 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:12:27-32 } + {Name: DumpRenamedAst.Length}))) + ({ DumpRenamedAst.hs:12:34-35 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:12:34-35 } + {Name: as}))))))))))) ,({ DumpRenamedAst.hs:13:3-24 } - (HsIB - [] - (FamEqn - (NoExtField) - ({ DumpRenamedAst.hs:13:3-8 } - {Name: DumpRenamedAst.Length}) - (Nothing) - [(HsValArg - ({ DumpRenamedAst.hs:13:10-12 } - (HsExplicitListTy - (NoExtField) - (IsPromoted) - [])))] - (Prefix) - ({ DumpRenamedAst.hs:13:21-24 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:13:21-24 } - {Name: DumpRenamedAst.Zero}))))))])) + (FamEqn + (NoExtField) + ({ DumpRenamedAst.hs:13:3-8 } + {Name: DumpRenamedAst.Length}) + (HsOuterImplicit + []) + [(HsValArg + ({ DumpRenamedAst.hs:13:10-12 } + (HsExplicitListTy + (NoExtField) + (IsPromoted) + [])))] + (Prefix) + ({ DumpRenamedAst.hs:13:21-24 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:13:21-24 } + {Name: DumpRenamedAst.Zero})))))])) ({ DumpRenamedAst.hs:11:13-18 } {Name: DumpRenamedAst.Length}) (HsQTvs @@ -287,173 +285,172 @@ (DataFamInstD (NoExtField) (DataFamInstDecl - (HsIB - [{Name: a} - ,{Name: k}] - (FamEqn + (FamEqn + (NoExtField) + ({ DumpRenamedAst.hs:18:18-20 } + {Name: DumpRenamedAst.Nat}) + (HsOuterImplicit + [{Name: a} + ,{Name: k}]) + [(HsValArg + ({ DumpRenamedAst.hs:18:22-37 } + (HsParTy + (NoExtField) + ({ DumpRenamedAst.hs:18:23-36 } + (HsKindSig + (NoExtField) + ({ DumpRenamedAst.hs:18:23 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:18:23 } + {Name: a}))) + ({ DumpRenamedAst.hs:18:28-36 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ DumpRenamedAst.hs:18:28 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:18:28 } + {Name: k}))) + ({ DumpRenamedAst.hs:18:33-36 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:18:33-36 } + {Name: GHC.Types.Type}))))))))))] + (Prefix) + (HsDataDefn (NoExtField) - ({ DumpRenamedAst.hs:18:18-20 } - {Name: DumpRenamedAst.Nat}) + (NewType) + ({ <no location info> } + []) (Nothing) - [(HsValArg - ({ DumpRenamedAst.hs:18:22-37 } - (HsParTy - (NoExtField) - ({ DumpRenamedAst.hs:18:23-36 } - (HsKindSig - (NoExtField) - ({ DumpRenamedAst.hs:18:23 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:18:23 } - {Name: a}))) - ({ DumpRenamedAst.hs:18:28-36 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ DumpRenamedAst.hs:18:28 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:18:28 } - {Name: k}))) - ({ DumpRenamedAst.hs:18:33-36 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:18:33-36 } - {Name: GHC.Types.Type}))))))))))] - (Prefix) - (HsDataDefn - (NoExtField) - (NewType) - ({ <no location info> } - []) - (Nothing) - (Just - ({ DumpRenamedAst.hs:18:42-60 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ DumpRenamedAst.hs:18:42-52 } - (HsParTy - (NoExtField) - ({ DumpRenamedAst.hs:18:43-51 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ DumpRenamedAst.hs:18:43 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:18:43 } - {Name: k}))) - ({ DumpRenamedAst.hs:18:48-51 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:18:48-51 } - {Name: GHC.Types.Type}))))))) - ({ DumpRenamedAst.hs:18:57-60 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:18:57-60 } - {Name: GHC.Types.Type})))))) - [({ DumpRenamedAst.hs:19:3-45 } - (ConDeclGADT - [{Name: f} - ,{Name: g}] - [({ DumpRenamedAst.hs:19:3-5 } - {Name: DumpRenamedAst.Nat})] - ({ DumpRenamedAst.hs:19:10-45 } - (False)) - [] - (Nothing) - (PrefixConGADT - [(HsScaled + (Just + ({ DumpRenamedAst.hs:18:42-60 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ DumpRenamedAst.hs:18:42-52 } + (HsParTy + (NoExtField) + ({ DumpRenamedAst.hs:18:43-51 } + (HsFunTy + (NoExtField) (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:19:10-34 } - (HsParTy + ({ DumpRenamedAst.hs:18:43 } + (HsTyVar (NoExtField) - ({ DumpRenamedAst.hs:19:11-33 } - (HsForAllTy - (NoExtField) - (HsForAllInvis - (NoExtField) - [({ DumpRenamedAst.hs:19:18-19 } - (UserTyVar - (NoExtField) - (SpecifiedSpec) - ({ DumpRenamedAst.hs:19:18-19 } - {Name: xx})))]) - ({ DumpRenamedAst.hs:19:22-33 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ DumpRenamedAst.hs:19:22-25 } - (HsAppTy - (NoExtField) - ({ DumpRenamedAst.hs:19:22 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:19:22 } - {Name: f}))) - ({ DumpRenamedAst.hs:19:24-25 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:19:24-25 } - {Name: xx}))))) - ({ DumpRenamedAst.hs:19:30-33 } - (HsAppTy - (NoExtField) - ({ DumpRenamedAst.hs:19:30 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:19:30 } - {Name: g}))) - ({ DumpRenamedAst.hs:19:32-33 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:19:32-33 } - {Name: xx}))))))))))))]) - ({ DumpRenamedAst.hs:19:39-45 } - (HsAppTy - (NoExtField) - ({ DumpRenamedAst.hs:19:39-43 } - (HsAppTy + (NotPromoted) + ({ DumpRenamedAst.hs:18:43 } + {Name: k}))) + ({ DumpRenamedAst.hs:18:48-51 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:18:48-51 } + {Name: GHC.Types.Type}))))))) + ({ DumpRenamedAst.hs:18:57-60 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:18:57-60 } + {Name: GHC.Types.Type})))))) + [({ DumpRenamedAst.hs:19:3-45 } + (ConDeclGADT + (NoExtField) + [({ DumpRenamedAst.hs:19:3-5 } + {Name: DumpRenamedAst.Nat})] + ({ DumpRenamedAst.hs:19:10-45 } + (HsOuterImplicit + [{Name: f} + ,{Name: g}])) + (Nothing) + (PrefixConGADT + [(HsScaled + (HsUnrestrictedArrow + (NormalSyntax)) + ({ DumpRenamedAst.hs:19:10-34 } + (HsParTy (NoExtField) - ({ DumpRenamedAst.hs:19:39-41 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:19:39-41 } - {Name: DumpRenamedAst.Nat}))) - ({ DumpRenamedAst.hs:19:43 } - (HsTyVar + ({ DumpRenamedAst.hs:19:11-33 } + (HsForAllTy (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:19:43 } - {Name: f}))))) - ({ DumpRenamedAst.hs:19:45 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:19:45 } - {Name: g}))))) - (Nothing)))] - ({ <no location info> } - [])))))))]) + (HsForAllInvis + (NoExtField) + [({ DumpRenamedAst.hs:19:18-19 } + (UserTyVar + (NoExtField) + (SpecifiedSpec) + ({ DumpRenamedAst.hs:19:18-19 } + {Name: xx})))]) + ({ DumpRenamedAst.hs:19:22-33 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ DumpRenamedAst.hs:19:22-25 } + (HsAppTy + (NoExtField) + ({ DumpRenamedAst.hs:19:22 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:19:22 } + {Name: f}))) + ({ DumpRenamedAst.hs:19:24-25 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:19:24-25 } + {Name: xx}))))) + ({ DumpRenamedAst.hs:19:30-33 } + (HsAppTy + (NoExtField) + ({ DumpRenamedAst.hs:19:30 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:19:30 } + {Name: g}))) + ({ DumpRenamedAst.hs:19:32-33 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:19:32-33 } + {Name: xx}))))))))))))]) + ({ DumpRenamedAst.hs:19:39-45 } + (HsAppTy + (NoExtField) + ({ DumpRenamedAst.hs:19:39-43 } + (HsAppTy + (NoExtField) + ({ DumpRenamedAst.hs:19:39-41 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:19:39-41 } + {Name: DumpRenamedAst.Nat}))) + ({ DumpRenamedAst.hs:19:43 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:19:43 } + {Name: f}))))) + ({ DumpRenamedAst.hs:19:45 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:19:45 } + {Name: g}))))) + (Nothing)))] + ({ <no location info> } + []))))))]) ,(TyClGroup (NoExtField) [({ DumpRenamedAst.hs:21:1-29 } @@ -540,70 +537,69 @@ (ClosedTypeFamily (Just [({ DumpRenamedAst.hs:24:3-30 } - (HsIB - [{Name: a} - ,{Name: f}] - (FamEqn - (NoExtField) - ({ DumpRenamedAst.hs:24:3-4 } - {Name: DumpRenamedAst.F1}) - (Nothing) - [(HsTypeArg - { DumpRenamedAst.hs:24:6-11 } - ({ DumpRenamedAst.hs:24:7-11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:24:7-11 } - {Name: DumpRenamedAst.Peano})))) - ,(HsValArg - ({ DumpRenamedAst.hs:24:13 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:24:13 } - {Name: a})))) - ,(HsValArg - ({ DumpRenamedAst.hs:24:15 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:24:15 } - {Name: f}))))] - (Prefix) - ({ DumpRenamedAst.hs:24:19-30 } - (HsAppTy - (NoExtField) - ({ DumpRenamedAst.hs:24:19-28 } - (HsAppTy - (NoExtField) - ({ DumpRenamedAst.hs:24:19-26 } - (HsAppKindTy - { DumpRenamedAst.hs:24:21-26 } - ({ DumpRenamedAst.hs:24:19 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:24:19 } - {Name: DumpRenamedAst.T}))) - ({ DumpRenamedAst.hs:24:22-26 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:24:22-26 } - {Name: DumpRenamedAst.Peano}))))) - ({ DumpRenamedAst.hs:24:28 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:24:28 } - {Name: f}))))) - ({ DumpRenamedAst.hs:24:30 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ DumpRenamedAst.hs:24:30 } - {Name: a}))))))))])) + (FamEqn + (NoExtField) + ({ DumpRenamedAst.hs:24:3-4 } + {Name: DumpRenamedAst.F1}) + (HsOuterImplicit + [{Name: a} + ,{Name: f}]) + [(HsTypeArg + { DumpRenamedAst.hs:24:6-11 } + ({ DumpRenamedAst.hs:24:7-11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:24:7-11 } + {Name: DumpRenamedAst.Peano})))) + ,(HsValArg + ({ DumpRenamedAst.hs:24:13 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:24:13 } + {Name: a})))) + ,(HsValArg + ({ DumpRenamedAst.hs:24:15 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:24:15 } + {Name: f}))))] + (Prefix) + ({ DumpRenamedAst.hs:24:19-30 } + (HsAppTy + (NoExtField) + ({ DumpRenamedAst.hs:24:19-28 } + (HsAppTy + (NoExtField) + ({ DumpRenamedAst.hs:24:19-26 } + (HsAppKindTy + { DumpRenamedAst.hs:24:21-26 } + ({ DumpRenamedAst.hs:24:19 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:24:19 } + {Name: DumpRenamedAst.T}))) + ({ DumpRenamedAst.hs:24:22-26 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:24:22-26 } + {Name: DumpRenamedAst.Peano}))))) + ({ DumpRenamedAst.hs:24:28 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:24:28 } + {Name: f}))))) + ({ DumpRenamedAst.hs:24:30 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ DumpRenamedAst.hs:24:30 } + {Name: a})))))))])) ({ DumpRenamedAst.hs:23:13-14 } {Name: DumpRenamedAst.F1}) (HsQTvs diff --git a/testsuite/tests/parser/should_compile/KindSigs.stderr b/testsuite/tests/parser/should_compile/KindSigs.stderr index 13aa2e6147..a8597046e2 100644 --- a/testsuite/tests/parser/should_compile/KindSigs.stderr +++ b/testsuite/tests/parser/should_compile/KindSigs.stderr @@ -32,40 +32,39 @@ (ClosedTypeFamily (Just [({ KindSigs.hs:12:3-21 } - (HsIB + (FamEqn (NoExtField) - (FamEqn - (NoExtField) - ({ KindSigs.hs:12:3-5 } - (Unqual - {OccName: Foo})) - (Nothing) - [(HsValArg - ({ KindSigs.hs:12:7 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ KindSigs.hs:12:7 } - (Unqual - {OccName: a})))))] - (Prefix) - ({ KindSigs.hs:12:11-21 } - (HsKindSig - (NoExtField) - ({ KindSigs.hs:12:11-13 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ KindSigs.hs:12:11-13 } - (Unqual - {OccName: Int})))) - ({ KindSigs.hs:12:18-21 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ KindSigs.hs:12:18-21 } - (Unqual - {OccName: Type})))))))))])) + ({ KindSigs.hs:12:3-5 } + (Unqual + {OccName: Foo})) + (HsOuterImplicit + (NoExtField)) + [(HsValArg + ({ KindSigs.hs:12:7 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ KindSigs.hs:12:7 } + (Unqual + {OccName: a})))))] + (Prefix) + ({ KindSigs.hs:12:11-21 } + (HsKindSig + (NoExtField) + ({ KindSigs.hs:12:11-13 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ KindSigs.hs:12:11-13 } + (Unqual + {OccName: Int})))) + ({ KindSigs.hs:12:18-21 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ KindSigs.hs:12:18-21 } + (Unqual + {OccName: Type}))))))))])) ({ KindSigs.hs:11:13-15 } (Unqual {OccName: Foo})) @@ -271,63 +270,66 @@ {OccName: qux}))] (HsWC (NoExtField) - (HsIB - (NoExtField) - ({ KindSigs.hs:22:8-44 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ KindSigs.hs:22:8-20 } - (HsParTy - (NoExtField) - ({ KindSigs.hs:22:9-19 } - (HsKindSig - (NoExtField) - ({ KindSigs.hs:22:9-11 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ KindSigs.hs:22:9-11 } - (Unqual - {OccName: Int})))) - ({ KindSigs.hs:22:16-19 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ KindSigs.hs:22:16-19 } - (Unqual - {OccName: Type})))))))) - ({ KindSigs.hs:22:25-44 } - (HsFunTy - (NoExtField) - (HsUnrestrictedArrow - (NormalSyntax)) - ({ KindSigs.hs:22:25-28 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ KindSigs.hs:22:25-28 } - (Unqual - {OccName: Bool})))) - ({ KindSigs.hs:22:33-44 } - (HsParTy - (NoExtField) - ({ KindSigs.hs:22:34-43 } - (HsKindSig - (NoExtField) - ({ KindSigs.hs:22:34-35 } - (HsTupleTy - (NoExtField) - (HsBoxedOrConstraintTuple) - [])) - ({ KindSigs.hs:22:40-43 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ KindSigs.hs:22:40-43 } - (Unqual - {OccName: Type}))))))))))))))))) + ({ KindSigs.hs:22:8-44 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ KindSigs.hs:22:8-44 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ KindSigs.hs:22:8-20 } + (HsParTy + (NoExtField) + ({ KindSigs.hs:22:9-19 } + (HsKindSig + (NoExtField) + ({ KindSigs.hs:22:9-11 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ KindSigs.hs:22:9-11 } + (Unqual + {OccName: Int})))) + ({ KindSigs.hs:22:16-19 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ KindSigs.hs:22:16-19 } + (Unqual + {OccName: Type})))))))) + ({ KindSigs.hs:22:25-44 } + (HsFunTy + (NoExtField) + (HsUnrestrictedArrow + (NormalSyntax)) + ({ KindSigs.hs:22:25-28 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ KindSigs.hs:22:25-28 } + (Unqual + {OccName: Bool})))) + ({ KindSigs.hs:22:33-44 } + (HsParTy + (NoExtField) + ({ KindSigs.hs:22:34-43 } + (HsKindSig + (NoExtField) + ({ KindSigs.hs:22:34-35 } + (HsTupleTy + (NoExtField) + (HsBoxedOrConstraintTuple) + [])) + ({ KindSigs.hs:22:40-43 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ KindSigs.hs:22:40-43 } + (Unqual + {OccName: Type})))))))))))))))))) ,({ KindSigs.hs:23:1-12 } (ValD (NoExtField) @@ -552,28 +554,31 @@ {OccName: true}))] (HsWC (NoExtField) - (HsIB - (NoExtField) - ({ KindSigs.hs:34:9-22 } - (HsParTy - (NoExtField) - ({ KindSigs.hs:34:10-21 } - (HsKindSig - (NoExtField) - ({ KindSigs.hs:34:10-13 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ KindSigs.hs:34:10-13 } - (Unqual - {OccName: Bool})))) - ({ KindSigs.hs:34:18-21 } - (HsTyVar - (NoExtField) - (NotPromoted) - ({ KindSigs.hs:34:18-21 } - (Unqual - {OccName: Type}))))))))))))) + ({ KindSigs.hs:34:9-22 } + (HsSig + (NoExtField) + (HsOuterImplicit + (NoExtField)) + ({ KindSigs.hs:34:9-22 } + (HsParTy + (NoExtField) + ({ KindSigs.hs:34:10-21 } + (HsKindSig + (NoExtField) + ({ KindSigs.hs:34:10-13 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ KindSigs.hs:34:10-13 } + (Unqual + {OccName: Bool})))) + ({ KindSigs.hs:34:18-21 } + (HsTyVar + (NoExtField) + (NotPromoted) + ({ KindSigs.hs:34:18-21 } + (Unqual + {OccName: Type})))))))))))))) ,({ KindSigs.hs:35:1-11 } (ValD (NoExtField) @@ -614,3 +619,5 @@ [])))] (Nothing) (Nothing))) + + diff --git a/testsuite/tests/parser/should_compile/T15323.stderr b/testsuite/tests/parser/should_compile/T15323.stderr index 8539599660..ae19f0a174 100644 --- a/testsuite/tests/parser/should_compile/T15323.stderr +++ b/testsuite/tests/parser/should_compile/T15323.stderr @@ -42,14 +42,15 @@ (Unqual {OccName: TestParens}))] ({ T15323.hs:6:20-54 } - (True)) - [({ T15323.hs:6:27 } - (UserTyVar - (NoExtField) - (SpecifiedSpec) - ({ T15323.hs:6:27 } - (Unqual - {OccName: v}))))] + (HsOuterExplicit + (NoExtField) + [({ T15323.hs:6:27 } + (UserTyVar + (NoExtField) + (SpecifiedSpec) + ({ T15323.hs:6:27 } + (Unqual + {OccName: v}))))])) (Just ({ T15323.hs:6:31-36 } [({ T15323.hs:6:31-36 } diff --git a/testsuite/tests/partial-sigs/should_compile/T16762d.hs b/testsuite/tests/partial-sigs/should_compile/T16762d.hs new file mode 100644 index 0000000000..02c2c57fcd --- /dev/null +++ b/testsuite/tests/partial-sigs/should_compile/T16762d.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE TypeFamilies, PolyKinds, ExplicitForAll #-} + +module Foo where + +import Data.Kind +import Data.Proxy + + +type family F (a::k) (b::k) + +-- Tricky because we can't quantify the '_' variable outside. +-- See Note [Generalising in tcTyFamInstEqnGuts] in TyCl + +type instance forall k (x::k). F x _ = Int diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T index e8d84fe3bb..8bb939addd 100644 --- a/testsuite/tests/partial-sigs/should_compile/all.T +++ b/testsuite/tests/partial-sigs/should_compile/all.T @@ -96,3 +96,4 @@ test('T16728', normal, compile, ['']) test('T16728a', normal, compile, ['']) test('T16728b', normal, compile, ['']) test('T18008', normal, compile, ['']) +test('T16762d', normal, compile, ['']) diff --git a/testsuite/tests/partial-sigs/should_fail/T14040a.stderr b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr index be667ec3a6..8e2d02e9b3 100644 --- a/testsuite/tests/partial-sigs/should_fail/T14040a.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr @@ -5,8 +5,8 @@ T14040a.hs:26:46: error: but ‘xs’ has kind ‘WeirdList (WeirdList z)’ because kind variable ‘z’ would escape its scope This (rigid, skolem) kind variable is bound by - ‘forall (z :: Type) (x :: z) (xs :: WeirdList (WeirdList z)). - Sing x -> Sing xs -> p _ xs -> p _ (WeirdCons x xs)’ + an explicit forall (z :: Type) (x :: z) + (xs :: WeirdList (WeirdList z)) at T14040a.hs:(25,19)-(27,41) • In the second argument of ‘p’, namely ‘xs’ In the type ‘Sing wl @@ -17,12 +17,17 @@ T14040a.hs:26:46: error: In the type signature: elimWeirdList :: forall (a :: Type) (wl :: WeirdList a) - (p :: forall (x :: Type). x -> WeirdList x -> Type). - Sing wl - -> (forall (y :: Type). p _ WeirdNil) - -> (forall (z :: Type) (x :: z) (xs :: WeirdList (WeirdList z)). - Sing x -> Sing xs -> p _ xs -> p _ (WeirdCons x xs)) - -> p _ wl + (p :: forall (x :: Type). x -> WeirdList x -> Type). Sing wl + -> (forall (y :: Type). + p _ WeirdNil) + -> (forall (z :: Type) + (x :: z) + (xs :: WeirdList (WeirdList z)). + Sing x + -> Sing xs + -> p _ xs + -> p _ (WeirdCons x xs)) + -> p _ wl T14040a.hs:27:27: error: • Couldn't match kind ‘k0’ with ‘z’ @@ -30,8 +35,8 @@ T14040a.hs:27:27: error: but ‘WeirdCons x xs’ has kind ‘WeirdList z’ because kind variable ‘z’ would escape its scope This (rigid, skolem) kind variable is bound by - ‘forall (z :: Type) (x :: z) (xs :: WeirdList (WeirdList z)). - Sing x -> Sing xs -> p _ xs -> p _ (WeirdCons x xs)’ + an explicit forall (z :: Type) (x :: z) + (xs :: WeirdList (WeirdList z)) at T14040a.hs:(25,19)-(27,41) • In the second argument of ‘p’, namely ‘(WeirdCons x xs)’ In the type ‘Sing wl @@ -42,9 +47,14 @@ T14040a.hs:27:27: error: In the type signature: elimWeirdList :: forall (a :: Type) (wl :: WeirdList a) - (p :: forall (x :: Type). x -> WeirdList x -> Type). - Sing wl - -> (forall (y :: Type). p _ WeirdNil) - -> (forall (z :: Type) (x :: z) (xs :: WeirdList (WeirdList z)). - Sing x -> Sing xs -> p _ xs -> p _ (WeirdCons x xs)) - -> p _ wl + (p :: forall (x :: Type). x -> WeirdList x -> Type). Sing wl + -> (forall (y :: Type). + p _ WeirdNil) + -> (forall (z :: Type) + (x :: z) + (xs :: WeirdList (WeirdList z)). + Sing x + -> Sing xs + -> p _ xs + -> p _ (WeirdCons x xs)) + -> p _ wl diff --git a/testsuite/tests/patsyn/should_fail/T11039.stderr b/testsuite/tests/patsyn/should_fail/T11039.stderr index f8f4d35768..aa20358e10 100644 --- a/testsuite/tests/patsyn/should_fail/T11039.stderr +++ b/testsuite/tests/patsyn/should_fail/T11039.stderr @@ -5,6 +5,6 @@ T11039.hs:8:15: error: Actual: A a ‘f’ is a rigid type variable bound by the signature for pattern synonym ‘Q’ - at T11039.hs:7:1-38 + at T11039.hs:7:14-38 • In the pattern: A a In the declaration for pattern synonym ‘Q’ diff --git a/testsuite/tests/patsyn/should_fail/T11667.stderr b/testsuite/tests/patsyn/should_fail/T11667.stderr index c9c00c9165..f4dafc0f28 100644 --- a/testsuite/tests/patsyn/should_fail/T11667.stderr +++ b/testsuite/tests/patsyn/should_fail/T11667.stderr @@ -17,7 +17,7 @@ T11667.hs:18:28: error: the signature of ‘Pat2’ ‘b’ is a rigid type variable bound by the signature for pattern synonym ‘Pat2’ - at T11667.hs:17:1-50 + at T11667.hs:17:17-50 • In the declaration for pattern synonym ‘Pat2’ • Relevant bindings include y :: b (bound at T11667.hs:18:21) diff --git a/testsuite/tests/patsyn/should_fail/T15694.stderr b/testsuite/tests/patsyn/should_fail/T15694.stderr index 7e1507c332..2b0b7b77b1 100644 --- a/testsuite/tests/patsyn/should_fail/T15694.stderr +++ b/testsuite/tests/patsyn/should_fail/T15694.stderr @@ -2,6 +2,7 @@ T15694.hs:22:35: error: • Expected kind ‘k1 -> k0’, but ‘f a1’ has kind ‘ks’ ‘ks’ is a rigid type variable bound by - the data constructor ‘ASSO’ + an explicit forall ks k (f :: k -> ks) (a1 :: k) (ctx :: Ctx ks) + (ks1 :: Type) k1 (a2 :: k1) (ctx1 :: Ctx ks1) a3 at T15694.hs:18:30-31 • In the first argument of ‘(~~)’, namely ‘f a1 a2’ diff --git a/testsuite/tests/polykinds/T11142.stderr b/testsuite/tests/polykinds/T11142.stderr index 780bbdc63f..f96278a5e7 100644 --- a/testsuite/tests/polykinds/T11142.stderr +++ b/testsuite/tests/polykinds/T11142.stderr @@ -3,7 +3,7 @@ T11142.hs:9:49: error: • Expected kind ‘k’, but ‘b’ has kind ‘k0’ because kind variable ‘k’ would escape its scope This (rigid, skolem) kind variable is bound by - ‘forall k (a :: k). SameKind a b’ + an explicit forall k (a :: k) at T11142.hs:9:19-49 • In the second argument of ‘SameKind’, namely ‘b’ In the type signature: diff --git a/testsuite/tests/polykinds/T11516.stderr b/testsuite/tests/polykinds/T11516.stderr index 5f8083309c..0bee63f2b3 100644 --- a/testsuite/tests/polykinds/T11516.stderr +++ b/testsuite/tests/polykinds/T11516.stderr @@ -1,5 +1,5 @@ T11516.hs:12:16: error: - • Expected kind ‘i0 -> i0 -> *’, but ‘()’ has kind ‘*’ + • Expected kind ‘i -> i -> *’, but ‘()’ has kind ‘*’ • In the first argument of ‘Varpi’, namely ‘()’ In the instance declaration for ‘Varpi (->) (->) (Either f)’ diff --git a/testsuite/tests/polykinds/T11520.stderr b/testsuite/tests/polykinds/T11520.stderr index 156f8490e8..90a5826266 100644 --- a/testsuite/tests/polykinds/T11520.stderr +++ b/testsuite/tests/polykinds/T11520.stderr @@ -1,9 +1,9 @@ T11520.hs:15:77: error: - • Expected kind ‘k20 -> k10’, but ‘g’ has kind ‘k’ - ‘k’ is a rigid type variable bound by - the instance declaration - at T11520.hs:(15,1)-(16,23) + • Expected kind ‘k2 -> k1’, but ‘g’ has kind ‘k4’ + ‘k4’ is a rigid type variable bound by + an instance declaration + at T11520.hs:15:10-78 • In the second argument of ‘Compose’, namely ‘g’ In the first argument of ‘Typeable’, namely ‘(Compose f g)’ In the instance declaration for ‘Typeable (Compose f g)’ diff --git a/testsuite/tests/polykinds/T15787.stderr b/testsuite/tests/polykinds/T15787.stderr index 7241e2f7fb..b22e6c7b5b 100644 --- a/testsuite/tests/polykinds/T15787.stderr +++ b/testsuite/tests/polykinds/T15787.stderr @@ -1,7 +1,7 @@ T15787.hs:15:14: error: - • Expected a type, but ‘k’ has kind ‘ob’ - ‘ob’ is a rigid type variable bound by + • Expected a type, but ‘k’ has kind ‘ob1’ + ‘ob1’ is a rigid type variable bound by the data constructor ‘Kl’ at T15787.hs:15:3-43 • In the type ‘k’ diff --git a/testsuite/tests/polykinds/T16221a.stderr b/testsuite/tests/polykinds/T16221a.stderr index 7b550b6c8f..5aa099b0f1 100644 --- a/testsuite/tests/polykinds/T16221a.stderr +++ b/testsuite/tests/polykinds/T16221a.stderr @@ -2,7 +2,7 @@ T16221a.hs:6:49: error: • Expected kind ‘k’, but ‘b’ has kind ‘k1’ ‘k1’ is a rigid type variable bound by - the data constructor ‘MkT2’ + an explicit forall k (b :: k) at T16221a.hs:6:20 ‘k’ is a rigid type variable bound by the data constructor ‘MkT2’ diff --git a/testsuite/tests/polykinds/T16762.hs b/testsuite/tests/polykinds/T16762.hs new file mode 100644 index 0000000000..720f8f5725 --- /dev/null +++ b/testsuite/tests/polykinds/T16762.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE GADTs, DataKinds, PolyKinds, ExplicitForAll #-} + +module BadTelescope2 where + +import Data.Kind + +data SameKind :: k -> k -> * + +-- This declaration made GHC 8.10 produce a Core Lint error +data T a b where + MkT :: forall a kx (b :: kx). SameKind a b -> T a b diff --git a/testsuite/tests/polykinds/T16762.stderr b/testsuite/tests/polykinds/T16762.stderr new file mode 100644 index 0000000000..6335fa4c50 --- /dev/null +++ b/testsuite/tests/polykinds/T16762.stderr @@ -0,0 +1,7 @@ + +T16762.hs:11:3: error: + • These kind and type variables: a kx (b :: kx) + are out of dependency order. Perhaps try this ordering: + kx (a :: kx) (b :: kx) + • In the definition of data constructor ‘MkT’ + In the data declaration for ‘T’ diff --git a/testsuite/tests/polykinds/T16762a.hs b/testsuite/tests/polykinds/T16762a.hs new file mode 100644 index 0000000000..4f56c8b3e9 --- /dev/null +++ b/testsuite/tests/polykinds/T16762a.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE TypeFamilies, GADTs, DataKinds, PolyKinds, ExplicitForAll #-} + +module T16762a where + +import Data.Kind + +data SameKind :: k -> k -> Type + +type family F a + +-- This should jolly well be rejected! +type instance forall a k (b::k). F (SameKind a b) = Int diff --git a/testsuite/tests/polykinds/T16762a.stderr b/testsuite/tests/polykinds/T16762a.stderr new file mode 100644 index 0000000000..0a96f77d82 --- /dev/null +++ b/testsuite/tests/polykinds/T16762a.stderr @@ -0,0 +1,6 @@ + +T16762a.hs:12:22: 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 instance declaration for ‘F’ diff --git a/testsuite/tests/polykinds/T16762b.hs b/testsuite/tests/polykinds/T16762b.hs new file mode 100644 index 0000000000..cad6bff33f --- /dev/null +++ b/testsuite/tests/polykinds/T16762b.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE ExplicitForAll #-} +{-# LANGUAGE StandaloneKindSignatures #-} +module T16762b where + +import Data.Kind + +type T :: forall k. Type +data T diff --git a/testsuite/tests/polykinds/T16762b.stderr b/testsuite/tests/polykinds/T16762b.stderr new file mode 100644 index 0000000000..ffb29b70dc --- /dev/null +++ b/testsuite/tests/polykinds/T16762b.stderr @@ -0,0 +1,4 @@ + +T16762b.hs:7:11: error: + Illegal kind: forall k. Type + Did you mean to enable PolyKinds? diff --git a/testsuite/tests/polykinds/T16762c.hs b/testsuite/tests/polykinds/T16762c.hs new file mode 100644 index 0000000000..c74c30ee47 --- /dev/null +++ b/testsuite/tests/polykinds/T16762c.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE TypeFamilies, GADTs, DataKinds, PolyKinds, ExplicitForAll #-} + +module Foo where + +import Data.Kind + +data SameKind :: k -> k -> Type + +-- Bad telescope +data T = forall a k (b::k). MkT (SameKind a b) diff --git a/testsuite/tests/polykinds/T16762c.stderr b/testsuite/tests/polykinds/T16762c.stderr new file mode 100644 index 0000000000..5be6fbb462 --- /dev/null +++ b/testsuite/tests/polykinds/T16762c.stderr @@ -0,0 +1,7 @@ + +T16762c.hs:10:10: 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 definition of data constructor ‘MkT’ + In the data declaration for ‘T’ diff --git a/testsuite/tests/polykinds/T7278.stderr b/testsuite/tests/polykinds/T7278.stderr index 5f4ff6d18f..93b0e9aa3d 100644 --- a/testsuite/tests/polykinds/T7278.stderr +++ b/testsuite/tests/polykinds/T7278.stderr @@ -1,7 +1,7 @@ T7278.hs:9:43: error: - • Expected kind ‘* -> * -> *’, but ‘t’ has kind ‘k’ - ‘k’ is a rigid type variable bound by + • Expected kind ‘* -> * -> *’, but ‘t’ has kind ‘k1’ + ‘k1’ is a rigid type variable bound by the type signature for ‘f’ at T7278.hs:9:1-49 • In the type signature: diff --git a/testsuite/tests/polykinds/TyVarTvKinds3.stderr b/testsuite/tests/polykinds/TyVarTvKinds3.stderr index b0b7924444..872fe96684 100644 --- a/testsuite/tests/polykinds/TyVarTvKinds3.stderr +++ b/testsuite/tests/polykinds/TyVarTvKinds3.stderr @@ -2,10 +2,10 @@ TyVarTvKinds3.hs:9:62: error: • Expected kind ‘k1’, but ‘b’ has kind ‘k2’ ‘k2’ is a rigid type variable bound by - the data constructor ‘MkBad’ + an explicit forall k1 k2 (a :: k1) (b :: k2) at TyVarTvKinds3.hs:9:22-23 ‘k1’ is a rigid type variable bound by - the data constructor ‘MkBad’ + an explicit forall k1 k2 (a :: k1) (b :: k2) at TyVarTvKinds3.hs:9:19-20 • In the second argument of ‘SameKind’, namely ‘b’ In the first argument of ‘Bad’, namely ‘(SameKind a b)’ diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 009172537b..a509dfd665 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -216,6 +216,10 @@ test('T16245', normal, compile_fail, ['']) test('T16245a', normal, compile_fail, ['']) test('T16342', normal, compile, ['']) test('T16263', normal, compile_fail, ['']) +test('T16762', normal, compile_fail, ['']) +test('T16762a', normal, compile_fail, ['']) +test('T16762b', normal, compile_fail, ['']) +test('T16762c', normal, compile_fail, ['']) test('T16902', normal, compile_fail, ['']) test('CuskFam', normal, compile, ['']) test('T17841', normal, compile_fail, ['']) diff --git a/testsuite/tests/printer/T18791.stderr b/testsuite/tests/printer/T18791.stderr index e245ef0fbe..af6d93019c 100644 --- a/testsuite/tests/printer/T18791.stderr +++ b/testsuite/tests/printer/T18791.stderr @@ -36,8 +36,8 @@ (Unqual {OccName: MkT}))] ({ T18791.hs:5:10-17 } - (False)) - [] + (HsOuterImplicit + (NoExtField))) (Nothing) (PrefixConGADT [(HsScaled diff --git a/testsuite/tests/saks/should_fail/saks_fail020.stderr b/testsuite/tests/saks/should_fail/saks_fail020.stderr index c71b772786..002d7b27b3 100644 --- a/testsuite/tests/saks/should_fail/saks_fail020.stderr +++ b/testsuite/tests/saks/should_fail/saks_fail020.stderr @@ -1,10 +1,12 @@ saks_fail020.hs:9:49: error: - • Expected kind ‘k’, but ‘a’ has kind ‘k0’ - because kind variable ‘k’ would escape its scope - This (rigid, skolem) kind variable is bound by - ‘forall (k :: Type) -> Proxy (a :: k)’ - at saks_fail020.hs:9:20-55 + • Expected kind ‘k1’, but ‘a’ has kind ‘k’ + ‘k’ is a rigid type variable bound by + a standalone kind signature for ‘Foo2’ + at saks_fail020.hs:9:14-55 + ‘k1’ is a rigid type variable bound by + an explicit forall (k :: Type) + at saks_fail020.hs:9:28 • In the first argument of ‘Proxy’, namely ‘(a :: k)’ In a standalone kind signature for ‘Foo2’: () -> forall (k :: Type) -> Proxy (a :: k) diff --git a/testsuite/tests/typecheck/should_fail/T12102b.stderr b/testsuite/tests/typecheck/should_fail/T12102b.stderr index d93b7fda9c..49bce53985 100644 --- a/testsuite/tests/typecheck/should_fail/T12102b.stderr +++ b/testsuite/tests/typecheck/should_fail/T12102b.stderr @@ -1,7 +1,6 @@ T12102b.hs:21:25: error: • Couldn't match expected kind ‘'True’ - with actual kind ‘IsTypeLit a0’ - The type variable ‘a0’ is ambiguous + with actual kind ‘IsTypeLit a’ • In the first argument of ‘Show’, namely ‘(T a)’ In the stand-alone deriving instance for ‘Show (T a)’ diff --git a/testsuite/tests/typecheck/should_fail/T13909.stderr b/testsuite/tests/typecheck/should_fail/T13909.stderr index 0cbae70733..6ea5b32e66 100644 --- a/testsuite/tests/typecheck/should_fail/T13909.stderr +++ b/testsuite/tests/typecheck/should_fail/T13909.stderr @@ -1,7 +1,9 @@ T13909.hs:11:18: error: - • Expected kind ‘k0’, but ‘Hm’ has kind ‘forall k -> k -> *’ - Cannot instantiate unification variable ‘k0’ - with a kind involving polytypes: forall k -> k -> * + • Expecting two more arguments to ‘Hm’ + Expected kind ‘k’, but ‘Hm’ has kind ‘forall k -> k -> *’ + ‘k’ is a rigid type variable bound by + an instance declaration + at T13909.hs:11:10-19 • In the first argument of ‘HasName’, namely ‘Hm’ In the instance declaration for ‘HasName Hm’ diff --git a/testsuite/tests/typecheck/should_fail/T15629.stderr b/testsuite/tests/typecheck/should_fail/T15629.stderr index 09d59fdf62..3599acef73 100644 --- a/testsuite/tests/typecheck/should_fail/T15629.stderr +++ b/testsuite/tests/typecheck/should_fail/T15629.stderr @@ -4,16 +4,14 @@ T15629.hs:26:37: error: Expected kind ‘x ~> F x ab’, but ‘F1Sym :: x ~> F x z’ has kind ‘x ~> F x z’ ‘z’ is a rigid type variable bound by - ‘forall z ab. - Proxy ((Comp (F1Sym :: x ~> F x z) F2Sym) :: F x ab ~> F x ab)’ + an explicit forall z ab at T15629.hs:26:17 ‘ab’ is a rigid type variable bound by - ‘forall z ab. - Proxy ((Comp (F1Sym :: x ~> F x z) F2Sym) :: F x ab ~> F x ab)’ + an explicit forall z ab at T15629.hs:26:19-20 • In the first argument of ‘Comp’, namely ‘(F1Sym :: x ~> F x z)’ In the first argument of ‘Proxy’, namely ‘((Comp (F1Sym :: x ~> F x z) F2Sym) :: F x ab ~> F x ab)’ In the type signature: - g :: forall z ab. - Proxy ((Comp (F1Sym :: x ~> F x z) F2Sym) :: F x ab ~> F x ab) + g :: forall z ab. Proxy ((Comp (F1Sym :: x + ~> F x z) F2Sym) :: F x ab ~> F x ab) diff --git a/testsuite/tests/typecheck/should_fail/T15799.stderr b/testsuite/tests/typecheck/should_fail/T15799.stderr index 6823cadb8c..161cfe026a 100644 --- a/testsuite/tests/typecheck/should_fail/T15799.stderr +++ b/testsuite/tests/typecheck/should_fail/T15799.stderr @@ -1,5 +1,9 @@ T15799.hs:46:62: error: - Couldn't match kind ‘TypeLits.Natural’ with ‘Op Nat’ - • Expected kind ‘Op Nat’, but ‘UnOp b’ has kind ‘Nat’ - • In the first argument of ‘(<=)’, namely ‘UnOp b’ + Expected a constraint, but ‘UnOp b <= a’ has kind ‘*’ + +T15799.hs:46:67: error: + • Couldn't match kind ‘TypeLits.Natural’ with ‘Op Nat’ + Expected kind ‘Op (Op Nat)’, but ‘b’ has kind ‘Op Nat’ + • In the first argument of ‘UnOp’, namely ‘b’ + In the first argument of ‘(<=)’, namely ‘UnOp b’ diff --git a/testsuite/tests/typecheck/should_fail/T16517.stderr b/testsuite/tests/typecheck/should_fail/T16517.stderr index 1e17286cff..252e8ad793 100644 --- a/testsuite/tests/typecheck/should_fail/T16517.stderr +++ b/testsuite/tests/typecheck/should_fail/T16517.stderr @@ -1,8 +1,10 @@ T16517.hs:5:29: error: - • Expected kind ‘k’, but ‘a’ has kind ‘k0’ - because kind variable ‘k’ would escape its scope - This (rigid, skolem) kind variable is bound by + • Expected kind ‘k1’, but ‘a’ has kind ‘k’ + ‘k1’ is a rigid type variable bound by + the type signature for ‘m’ + at T16517.hs:5:22-35 + ‘k’ is a rigid type variable bound by the class declaration for ‘C’ at T16517.hs:5:22-35 • In the first argument of ‘Proxy’, namely ‘(a :: k)’ |