
7 May
2006
7 May
'06
3:53 a.m.
On 07.05 01:12, Marc A. Ziegert wrote:
data Type a typeOf :: a -> Type a typeOf = undefined #define TYPE(a) (undefined::Type (a)) ... sizeOf :: (Storable a) => Type a -> Int
I think the name Proxy is used for this in other places. data Proxy a = Proxy class Storable a where ... sizeOf :: Proxy a -> Int proxy :: a -> Proxy a proxy _ = Proxy Note here that there are no undefined values used thus one does not need to be careful with evaluation. - Einar Karttunen