git.iko.soy/typeable/servant
on master help sign in
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.

commit22d5790e73f6b74401ac2cec32a627edc77a34d8 authorGuillaume Bouchard <guillaum.bouchard@gmail.com> dateMon 24 Jan 2022, 17:10 (5 years ago) parent75db4a5
1 file changed+1−1
servant/src/Servant/Links.hs+1−1
servant/src/Servant/Links.hs+1−1
@@ -649,7 +649,7 @@ simpleToLink _ toA _ = toLink toA (Proxy :: Proxy sub)
649649-- Erroring instance for 'HasLink' when a combinator is not fully applied
650650instance TypeError (PartialApplication HasLink arr) => HasLink ((arr :: a -> b) :> sub)
651651 where
652− type MkLink (arr :> sub) _ = TypeError (PartialApplication HasLink arr)
652+ type MkLink (arr :> sub) _ = TypeError (PartialApplication (HasLink :: * -> Constraint) arr)
653653 toLink = error "unreachable"
654654
655655-- Erroring instances for 'HasLink' for unknown API combinators