Fix GHC 9.2 build

Close #1513.

GHC 9.2 needs explicit kind signature here, I don't really understand
why.

This kind signature is correct and not too restritive, because `HasLink`
is technically defined `class HasLink endpoint` which means that it is
infered as `k -> Constraint`. In the instance signature, we have
`HasLink ((arr :: a -> b) :> sub)`, so here the `k` is the same kind as
the one of `:>` which is not polykinded.
This commit is contained in:
Guillaume Bouchard 2022-01-24 17:10:33 +01:00
parent 75db4a5327
commit 22d5790e73

View file

@ -649,7 +649,7 @@ simpleToLink _ toA _ = toLink toA (Proxy :: Proxy sub)
-- Erroring instance for 'HasLink' when a combinator is not fully applied -- Erroring instance for 'HasLink' when a combinator is not fully applied
instance TypeError (PartialApplication HasLink arr) => HasLink ((arr :: a -> b) :> sub) instance TypeError (PartialApplication HasLink arr) => HasLink ((arr :: a -> b) :> sub)
where where
type MkLink (arr :> sub) _ = TypeError (PartialApplication HasLink arr) type MkLink (arr :> sub) _ = TypeError (PartialApplication (HasLink :: * -> Constraint) arr)
toLink = error "unreachable" toLink = error "unreachable"
-- Erroring instances for 'HasLink' for unknown API combinators -- Erroring instances for 'HasLink' for unknown API combinators