mapTheory :: (FormExtension f, TermExtension f)
  => (CS.Sign f e, [Named (FORMULA f)]) -> Result (OS.Sign, [Named Axiom])
mapTheory (sig, sens) = do
  let mor = disambigSig sig
      tar = mtarget mor
      nss = map (mapNamed $ MapSen.mapMorphForm (const id) mor) sens
  (s, l) <- mapSign tar
  ll <- mapM (\ ns -> case sentence ns of
    Sort_gen_ax cs b -> return $ mapSortGenAx cs b
    _ -> flip (hint []) nullRange
         . ("not translated\n" ++) . show . printTheoryFormula
         $ mapNamed (simplifySen (const return) (const id) tar) ns
             ) nss
  return (s, l ++ concat ll)
mapTheory :: (FormExtension f, TermExtension f)
  => (CS.Sign f e, [Named (FORMULA f)]) -> Result (OS.Sign, [Named Axiom])
mapTheory (sig, sens) = do
  let mor = disambigSig sig
      tar = mtarget mor
      nss = map (mapNamed $ MapSen.mapMorphForm (const id) mor) sens
  (s, l) <- mapSign tar
  ll <- mapM (\ ns -> case sentence ns of
    Sort_gen_ax cs b -> return $ mapSortGenAx cs b
    _ -> flip (hint []) nullRange
         . ("not translated\n" ++) . show . printTheoryFormula
         $ mapNamed (simplifySen (const return) (const id) tar) ns
             ) nss
  return (s, l ++ concat ll)
mapTheory (sig, sens) = do
  let mor = disambigSig sig
      tar = mtarget mor
      nss = map (mapNamed $ MapSen.mapMorphForm (const id) mor) sens
  (s, l) <- mapSign tar
  ll <- mapM (\ ns -> case sentence ns of
    Sort_gen_ax cs b -> return $ mapSortGenAx cs b
    _ -> flip (hint []) nullRange
         . ("not translated\n" ++) . show . printTheoryFormula
         $ mapNamed (simplifySen (const return) (const id) tar) ns
             ) nss
  return (s, l ++ concat ll)