[Hugs-bugs] type-cheker woes
Iavor S. Diatchki
diatchki at cse.ogi.edu
Wed Feb 4 11:21:35 EST 2004
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 |
==================================================
More information about the Hugs-Bugs
mailing list