type-cheker woes

"Iavor S. Diatchki" <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
hello,
sorry for the many posts, today seems to have turned
into a bug reporting day.  there seems to be
a probelm with the type checker of the
current cvs version:

 > class {-(Monad m, Monad n) =>-} HasBaseMonad m n | m -> n where
 >  mapBase :: (forall a. n a -> n a) -> m a -> m a
 >
 > instance HasBaseMonad IO IO where
 >  mapBase f x = f x

ERROR "hugs-bug.lhs":10 - Illegal type in class constraint

if i comment-in the commented-out part (the Monad constraints)
i get the following:

ERROR "hugs-bug.lhs":11 - Inferred type is not general enough
*** Expression    : mapBase
*** Expected type : HasBaseMonad IO IO => (forall c. a c -> a c) -> IO b 
-> IO b
*** Inferred type : HasBaseMonad IO IO => (forall b. IO b -> IO b) -> IO 
a -> IO a

if i remove the instance the script loads fine.

-iavor

-- 
==================================================
| Iavor S. Diatchki, Ph.D. student               | 
| Department of Computer Science and Engineering |
| School of OGI at OHSU                          |
| http://www.cse.ogi.edu/~diatchki               |
==================================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.