In article <[EMAIL PROTECTED]>,
 John Meacham <[EMAIL PROTECTED]> wrote:

> Ah. I think I see the objection now. Will have to think about it some.

Here's a simpler example:

  class HasInt a where
      getInt :: a -> Int
  instance HasInt Int where
      getInt = id

  newtype HasInt a => T a = T Int a

  instance Monad T where     -- problem
      return a = T (getInt a) a
      (T i _) >> (T _ b) = T i b

  foo :: (Monad m) => m Int
  foo = (return True) >> (return 3)

  fooT :: T Int
  fooT = foo

-- 
Ashley Yakeley, Seattle WA

_______________________________________________
Haskell-prime mailing list
[email protected]
http://haskell.org/mailman/listinfo/haskell-prime

Reply via email to