-- | Determine if a term cannot be represented in hardware
isUntranslatable :: (Functor m, Monad m)
                 => Term
                 -> RewriteMonad m Bool
isUntranslatable tm = do
  tcm <- Lens.use tcCache
  not <$> (representableType <$> Lens.use typeTranslator <*> pure tcm <*> termType tcm tm)

-- | Is the Context a Lambda/Term-abstraction context?
isUntranslatable :: (Functor m, Monad m)
                 => Term
                 -> RewriteMonad m Bool
isUntranslatable tm = do
  tcm <- Lens.use tcCache
  not <$> (representableType <$> Lens.use typeTranslator <*> pure tcm <*> termType tcm tm)

-- | Is the Context a Lambda/Term-abstraction context?
isUntranslatable tm = do
  tcm <- Lens.use tcCache
  not <$> (representableType <$> Lens.use typeTranslator <*> pure tcm <*> termType tcm tm)

-- | Is the Context a Lambda/Term-abstraction context?