
31 Jul
2001
31 Jul
'01
8:18 p.m.
At 2001-07-31 01:55, Simon Marlow wrote:
The type T is undoubtedly useful, but I think the example you give isn't a good one. It works perfectly well without the T data type:
class HasTypeName t where getTypeName :: t -> String
Perhaps. I think your use of 'undefined' is a bit ugly. The type 't -> String' suggests you need a value of type 't' to get a name for 't', which is not what I want to imply. 'undefined :: t' is intended to represent the type 't', which is not something intuitively "undefined". -- Ashley Yakeley, Seattle WA