[Haskell-cafe] newbie type signature question

Brock Peabody brock.peabody at npcinternational.com
Fri Jun 9 12:45:56 EDT 2006

Please excuse my newbiness, but in this snippet:

   data (Monad m) => DataType m = DataType { f :: Char -> m () }
   test_function :: (Monad m) => DataType m -> m ()
   test_function d =  f d 'C'

Why is "(Monad m) =>" required, when the definition of DataType already
implies it?  Is there an easier way to do this or will I have to have it
in all signatures containing DataType?



More information about the Haskell-Cafe mailing list