[Haskell-cafe] newbie type signature question

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Jun 9 15:26:30 EDT 2006


Hello Brian,

Friday, June 9, 2006, 9:50:30 PM, you wrote:

>>   data (Monad m) => DataType m = DataType { f :: Char -> m () }
>>
>>   test_function :: (Monad m) => DataType m -> m ()
>>                    ^^^^^^^^^^^^
> There was a post a while back (unfortunately I can't seem to locate it)
> where someone posted a link to some guidelines on haskell coding style where
> one guideline was never to use contexts in data declarations.

afaiu, this is considered as drawback of H98, and may be even
addressed some day. at least in h' mail-list it was discussed: adding
the datatype context to the context of functions that use it. we can
even ask GHC team to add this as one more glasgow extension




-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list