
12 Nov
2008
12 Nov
'08
9:03 a.m.
On 12 Nov 2008, at 14:47, Mitchell, Neil wrote:
It's possible that there's some more direct approach that represents types as some kind of runtime values, but nobody (to my knowledge) has done that.
It don't think its possible - I tried it and failed.
Consider:
show (f [])
Where f has the semantics of id, but has either the return type [Int] or [Char] - you get different results. Without computing the types everywhere, I don't see how you can determine the precise type of [].
Surely all this means is that part of the semantics of Haskell is the semantics of the type system -- isn't this expected? Bob