Revert "Get rid of typeConstructor in Scan."

This reverts commit 7d70c3a448a6e1fe49dbb6bf74717d03a3f8d442.
Merge pull request #2353 from nouiz/revert_type_constructor

Revert "Get rid of typeConstructor in Scan."