Move 'Closed' into 'Types' module, use 'throwIO'.