[<<][meta][>>][..]
Mon Dec 12 20:23:52 EST 2011

I'm done with these stupid type indexing tricks


{- Primitive data types + Pointers -}
class TMLword t tag where 
  _wordType :: t -> (TypeName, Int, tag)
  
wordType t = (name, order) where
  (name, order, _) = _wordType t
  
instance TMLprim t => TMLword t () where
  _wordType _ = (primType (undefined :: t), 0, ())

instance TMLword t tag => TMLword t ((), tag) where  
  _wordType _ = (name, order + 1, ((), tag)) where
    (name, order, tag) = _wordType (undefined :: t)



How to just juse integers for these types?



[Reply][About]
[<<][meta][>>][..]