#4347: Asymmetry of (impredicative) instantiation/higher rank types ----------------------------------------+----------------------------------- Reporter: dolio | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.4.1 Component: Compiler (Type checker) | Version: 7.1 Keywords: | Testcase: Blockedby: | Difficulty: Os: Linux | Blocking: Architecture: x86_64 (amd64) | Failure: GHC rejects valid program ----------------------------------------+-----------------------------------
Comment(by carlhowells): Yes, I have a very small example: {{{ {-# LANGUAGE ImpredicativeTypes #-} import Control.Concurrent.MVar import System.Random dumbTrick :: IO (forall a. Random a => (forall g. RandomGen g => g -> (a, g)) -> IO a) dumbTrick = do gen <- newMVar =<< newStdGen let apply :: forall b. Random b => (forall g'. RandomGen g' => g' -> (b, g')) -> IO b apply f = modifyMVar gen $ (\(a, b) -> return (b, a)) . f return apply }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4347#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs