inferTyRecord :: (MonadError e m, AsUnexpectedKind e ki, Eq1 ki, AsKiBase ki, AsTyRecord ki ty)
            => (Type ki ty a -> m (Kind ki))
            -> Type ki ty a
            -> Maybe (m (Kind ki))
inferTyRecord inferFn ty = do
  tys <- preview _TyRecord ty
  return $ do
    let ki = review _KiBase()
    traverse_ (\(_, tyR) -> mkCheckKind inferFn tyR ki) tys
    return . review _KiBase $ ()
inferTyRecord :: (MonadError e m, AsUnexpectedKind e ki, Eq1 ki, AsKiBase ki, AsTyRecord ki ty)
            => (Type ki ty a -> m (Kind ki))
            -> Type ki ty a
            -> Maybe (m (Kind ki))
inferTyRecord inferFn ty = do
  tys <- preview _TyRecord ty
  return $ do
    let ki = review _KiBase()
    traverse_ (\(_, tyR) -> mkCheckKind inferFn tyR ki) tys
    return . review _KiBase $ ()
inferTyRecord inferFn ty = do
  tys <- preview _TyRecord ty
  return $ do
    let ki = review _KiBase()
    traverse_ (\(_, tyR) -> mkCheckKind inferFn tyR ki) tys
    return . review _KiBase $ ()