Ronald J. Legere:
> Is there anyway to make a 'subtype' of lists? I have a type
> that is essentially a list,but I want to be able to overide
> 'show' for example. So in order to do that, I have to leave
> the world of type synonyms:
>
> newtype SS = SS [Int]
I'm forgetting the obvious here: you can also, when defining the
Show instance for a given type, include a non-default definition
of showList -- that's how Show String ends up being different
from the default list behaviour. But that doesn't directly help
with the Int example, for obvious reasons...
I hope that one thing Haskell 2 will treat of with some care is
more user-definability when it comes to handling default instances,
and instance handling in general; the current scheme sometimes
ends up being too 'implicit' for its own good...
Cheers,
Alex.