typecheckProc :: DomainU -> ProcedureU -> TypeM ProcedureT
typecheckProc dom (Procedure name args res req ens) =
    let argMap = declsToMap args
        tcClause = typecheckClause argMap dom res
        req' = mapM tcClause req
        ens' = mapM tcClause ens
    in Procedure name args res <$> req' <*> ens'
typecheckProc :: DomainU -> ProcedureU -> TypeM ProcedureT
typecheckProc dom (Procedure name args res req ens) =
    let argMap = declsToMap args
        tcClause = typecheckClause argMap dom res
        req' = mapM tcClause req
        ens' = mapM tcClause ens
    in Procedure name args res <$> req' <*> ens'
typecheckProc dom (Procedure name args res req ens) =
    let argMap = declsToMap args
        tcClause = typecheckClause argMap dom res
        req' = mapM tcClause req
        ens' = mapM tcClause ens
    in Procedure name args res <$> req' <*> ens'