Moved lib.core pattern to lib.pattern.