
#10651: Type checking issue with existential quantification, rank-n types and constraint kinds -------------------------------------+------------------------------------- Reporter: Roboguy | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.10.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Roboguy): It looks like the following works (on GHC 8.2.1 at least). Is this because the `Proxy b` makes it so that `b` is no longer untouchable? I also notice the explicit type annotation in the lambda argument is still necessary. {{{ constrMapM :: Monad m => (forall a. c a => a -> m b) -> ConstrList c -> m [b] constrMapM = ... constrMapM_ :: forall m c b. Monad m => (forall a. (c a) => a -> m b) -> Proxy b -> ConstrList c -> m () constrMapM_ f Proxy x = constrMapM f x >>= (\(x1 :: [b]) -> return ()) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10651#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler