It seems that until recent years, the usual way to pass an extra type to a function was to do something like
f (undefined :: T)
Kiselyov and Shan even used this approach in their classic paper on class-based reflection that inspired the reflection
package. They excused the obvious ugliness by noting that the bogus value is never inspected. And an only slightly less ugly incarnation appears in Data.Bits.finiteBitSize
, which takes a value it ignores to get its type.
Then someone figured out the proxy idiom, and everything changed. Now we always see the much more satisfactory
f (Proxy :: Proxy T)
(in standard code—GHC type application is another story).
Who figured it out? Did this first appear in code somewhere, or a paper?