Strange error in show for datatype
Thu, 4 Oct 2001 06:05:16 -0700
| > My claim was that
| > forall a. Show a =3D> T
| > could be implemented by passing a bottom dictionary for Show.
| Excuse me, but Jan-Willem Maessen has already shown that this=20
| implementation can give unexpected results.=20
Yes, I was quite wrong about that. How embarassing.
But there's still something lurking there. Consider:
data T a =3D T1 Int | T2 a
It's clear that (T1 Int) has no a's in it, not even bottom. Mark
and ruminated in the corridor about a kind system to make this apparent.
That is, T1 would have type
T1 :: forall a::Pure . Int -> T a
Then if we see (forall a::Pure. Show a =3D> <type>)
we're justified in fixing a to Empty. You need a sub-kinding system to
this work, so the cost has just gone up. My implemention mood has
Isn't laziness wonderful?