diff options
author | Richard Eisenberg <rae@cs.brynmawr.edu> | 2017-12-21 13:38:35 -0500 |
---|---|---|
committer | Richard Eisenberg <rae@cs.brynmawr.edu> | 2017-12-21 13:39:20 -0500 |
commit | 05551d00eabaea2734f9ddb5521a2e15233e9ee9 (patch) | |
tree | 414c32a1e546f24ca105075be7688c03c84d5408 | |
parent | bcb519c5f81497bab42304db9ef956d51548479b (diff) | |
download | haskell-05551d00eabaea2734f9ddb5521a2e15233e9ee9.tar.gz |
Comments only [skip ci]
This fixes a typo and elaborates the Note [TyVarBndrs ...]
in TyCoRep, which was previously subtly wrong about
Required ForAllTys.
-rw-r--r-- | compiler/typecheck/TcSimplify.hs | 2 | ||||
-rw-r--r-- | compiler/types/TyCoRep.hs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index 8001fd628c..56d6c78e6e 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -749,7 +749,7 @@ ctsPreds cts = [ ctEvPred ev | ct <- bagToList cts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider f = e -where f's type is infeered to be something like (a, Proxy k (Int |> co)) +where f's type is inferred to be something like (a, Proxy k (Int |> co)) and we have an as-yet-unsolved, or perhaps insoluble, constraint [W] co :: Type ~ k We can't form types like (forall co. blah), so we can't generalise over diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs index b7d92a2a4e..64e1068941 100644 --- a/compiler/types/TyCoRep.hs +++ b/compiler/types/TyCoRep.hs @@ -486,7 +486,8 @@ This table summarises the visibility rules: | tvis :: ArgFlag | tvis = Inferred: f :: forall {a}. type Arg not allowed: f | tvis = Specified: f :: forall a. type Arg optional: f or f @Int -| tvis = Required: Illegal: See Note [No Required TyBinder in terms] +| tvis = Required: T :: forall k -> type Arg required: T * +| This last form is illegal in terms: See Note [No Required TyBinder in terms] | | TvBndr k cvis :: TyConBinder, in the TyConBinders of a TyCon | cvis :: TyConBndrVis |