
5 Nov
2007
5 Nov
'07
3:38 p.m.
Simon Peyton-Jones wrote:
Well it's debatable. Suppose we have
newtype Foo = MkFoo String deriving( Num )
Do you want to generate
instance Num String => Num Foo
?
Personally, I think I would like that -- along with a warning message. It makes it clearer to me that I can do newtype Foo a = MkFoo a deriving( Num ) without requiring that Foo can only be instantiated with types in Num. I'm not sure though. Isaac