On 16/03/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
There is a wide-spread opinion that one ought not to give context to a
data type declaration (please search for `restricted datatypes
Haskell'). Someone said that in GHC typechecker such contexts called
stupidctx. There has been a proposal
Ok, so I'm inching closer to understanding monads, and this question
popped up today. Consider the following 2 declarations:
data Foo a = Bar a
data (Ord a) = Baz a = Bah a
Note that both of these have kind * - *. However, Baz could never be
an instance of monad, because there is a restriction
Andrew Wagner wrote
data Foo a = Bar a
data (Ord a) = Baz a = Bah a
Note that both of these have kind * - *. However, Baz could never be
an instance of monad, because there is a restriction on the types it
can operate on.
There is a wide-spread opinion that one ought not to give context to