Merge fundamental groupoids into basic types.