Horrible first version of type inferencer.