http://ncatlab.org/nlab/show/relation+between+type+theory+and+category+theory#idea