
This looks like a bug, which I've now filed: https://gitlab.haskell.org/ghc/ghc/-/issues/20318 The workaround is to enable ImpredicativeTypes. Sadly, ImpredicativeTypes is really a bug in GHC 8.10, fixed to work properly in GHC 9.2. So if I were doing this, I would define the offending synonym in a module all by itself so that the scope of ImpredicativeTypes is as small as possible. Richard
On Aug 31, 2021, at 11:45 AM, Michael Sperber
wrote: I'm working on Conal's ConCat code, and keep putting quantified constraints like this in instance constraints:
(okk ~ Ok k, forall x y. (okk x, okk y) => okk (Prod k x y))
(The okk ~ Ok k is necessary because Ok is an associated type.)
Is there any way to define a type synonym for this? Like
type OkProd k = (okk ~ Ok k, forall x y. (okk x, okk y) => okk (Prod k x y))
ghc (8.10.4) complains about an impredicative type.
Help would be much appreciated!
-- Regards, Mike
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.