{- Basic combinator for generating the text of a lemma declaration. -}

lemmaText2 :: ResolveHint          -- Resolve hint?
           -> RewriteHint          -- Rewrite hint?
           -> DocHide              -- Hide documentation?
           -> [String]             -- Hint databases.
           -> [[String]]           -- Names for the parts.
           -> [[(String, String)]] -- Statments and proofs for the parts.
           -> M String
lemmaText2 resolve rewrite hide dbs names gens =
    do { strs <- mapM (\(name, (stmt, pf)) ->
                           lemmaText resolve rewrite hide dbs name stmt pf)
                      (zip (concat names) (concat gens))
       ; return $ concat strs
       }
lemmaText2 :: ResolveHint          -- Resolve hint?
           -> RewriteHint          -- Rewrite hint?
           -> DocHide              -- Hide documentation?
           -> [String]             -- Hint databases.
           -> [[String]]           -- Names for the parts.
           -> [[(String, String)]] -- Statments and proofs for the parts.
           -> M String
lemmaText2 resolve rewrite hide dbs names gens =
    do { strs <- mapM (\(name, (stmt, pf)) ->
                           lemmaText resolve rewrite hide dbs name stmt pf)
                      (zip (concat names) (concat gens))
       ; return $ concat strs
       }
lemmaText2 resolve rewrite hide dbs names gens =
    do { strs <- mapM (\(name, (stmt, pf)) ->
                           lemmaText resolve rewrite hide dbs name stmt pf)
                      (zip (concat names) (concat gens))
       ; return $ concat strs
       }