Turn modules into a mapping.