Work in progress to let the user specify explicitly the return type of the match() function if desired