writeSoftFOL :: HetcatsOpts -> FilePath -> G_theory -> IRI
             -> SPFType -> Int -> String -> IO ()
writeSoftFOL opts f gTh i c n msg = do
      let cc = case c of
                 ConsistencyCheck -> True
                 ProveTheory -> False
      mDoc <- printTheoryAsSoftFOL i n cc
              $ (if cc then theoremsToAxioms else id) gTh
      maybe (putIfVerbose opts 0 $
             "could not translate to " ++ msg ++ " file: " ++ f)
          ( \ d -> do
              let str = shows d "\n"
              case parse (if n == 0 then forget parseSPASS else forget tptp)
                   f str of
                Left err -> putIfVerbose opts 0 $ show err
                _ -> putIfVerbose opts 3 $ "reparsed: " ++ f
              writeVerbFile opts f str) mDoc
writeSoftFOL :: HetcatsOpts -> FilePath -> G_theory -> IRI
             -> SPFType -> Int -> String -> IO ()
writeSoftFOL opts f gTh i c n msg = do
      let cc = case c of
                 ConsistencyCheck -> True
                 ProveTheory -> False
      mDoc <- printTheoryAsSoftFOL i n cc
              $ (if cc then theoremsToAxioms else id) gTh
      maybe (putIfVerbose opts 0 $
             "could not translate to " ++ msg ++ " file: " ++ f)
          ( \ d -> do
              let str = shows d "\n"
              case parse (if n == 0 then forget parseSPASS else forget tptp)
                   f str of
                Left err -> putIfVerbose opts 0 $ show err
                _ -> putIfVerbose opts 3 $ "reparsed: " ++ f
              writeVerbFile opts f str) mDoc
writeSoftFOL opts f gTh i c n msg = do
      let cc = case c of
                 ConsistencyCheck -> True
                 ProveTheory -> False
      mDoc <- printTheoryAsSoftFOL i n cc
              $ (if cc then theoremsToAxioms else id) gTh
      maybe (putIfVerbose opts 0 $
             "could not translate to " ++ msg ++ " file: " ++ f)
          ( \ d -> do
              let str = shows d "\n"
              case parse (if n == 0 then forget parseSPASS else forget tptp)
                   f str of
                Left err -> putIfVerbose opts 0 $ show err
                _ -> putIfVerbose opts 3 $ "reparsed: " ++ f
              writeVerbFile opts f str) mDoc