Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

Cannot satisfy QuantifiedConstraints
<!-- READ THIS FIRST: If the feature you are proposing changes the language that GHC accepts or adds any warnings to `-Wall`, it should be written as a [GHC Proposal](https://github.com/ghc-proposals/ghc-proposals/). Other features, appropriate for a GitLab feature request, include GHC API/plugin innovations, new low-impact compiler flags, or other similar additions to GHC. --> ## Motivation I cannot satisfy a quantified constraint, even if I can satisfy the constraint for every value of the type variable. Example: ```haskell {-# LANGUAGE QuantifiedConstraints, UndecidableInstances, RankNTypes, KindSignatures, TypeApplications, ScopedTypeVariables, GADTs #-} module QuantifiedConstraints where import Data.Kind class IsUnit (a :: Type) where isUnit :: forall r. (a ~ () => r) -> r class C (a :: Type) instance C () -- requires quantified constraint I want to satisfy f1 :: (forall a. IsUnit a => C a) => Int f1 = 3 -- can satisfy C for any particular a (that has IsUnit) f2 :: forall a r. IsUnit a => (C a => r) -> r f2 cr = isUnit @a cr f :: Int f = f2 f1 -- GHC (correctly) rejects this, but no other option ``` ## Proposal Provide some way of satisfying quantified constraints in this manner. Sorry I don't have a concrete proposal, nor is this strictly a defect in GHC, I just want to raise the issue.
issue