  [C.exp| TypeInfo* {new TypeInfo($(const char* s'), $(TypeInfo* ptr))} |]

deleteTypeInfo :: Ptr TypeInfo -> IO ()
deleteTypeInfo ptr = [C.exp| void {delete $(TypeInfo* ptr)} |]

instance Creatable (Ptr TypeInfo) where
  type CreationOptions (Ptr TypeInfo) = (String, Ptr TypeInfo)

  newObject = uncurry newTypeInfo
  deleteObject = liftIO . deleteTypeInfo

class IsTypeOf a where
  -- | Check current type is type of specified type.
  typeInfoIsTypeOf :: (Parent TypeInfo t, Pointer p t, MonadIO m)