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 | ==================================================
participants (1)
-
Iavor S. Diatchki