[Haskell-cafe] Class Instance with ExistentialQuantification

Andrew Gibiansky andrew.gibiansky at gmail.com
Tue Jan 7 03:17:21 UTC 2014


Why is the following not allowed?

{-# LANGUAGE ExistentialQuantification, ExplicitForAll, RankNTypes,
FlexibleInstances #-}

class Class a where
  test :: a -> Bool

instance Class (forall m. m -> m) where
  test _ = True

main = do
  putStrLn $ test id

Is there a reason that this is forbidden? Just curious.

-- Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140106/8f727d49/attachment.html>


More information about the Haskell-Cafe mailing list