#!/usr/bin/python -O

from os import walk
from os.path import join, splitext
from sys import stderr


sourceToObject = {
    '.ml': '.cmo',
    '.mli': '.cmi',
    }


def main():
    for root, dirs, files in walk('.'):
        for filename in files:
            base, extension = splitext(filename)
            try:
                extension = sourceToObject[extension]
            except KeyError:
                continue
            objectFile = base + extension
            if objectFile not in files:
                print join(root, filename)


if __name__ == '__main__':
    main()
