Yet another enumeration implementation for the sake of exhaustive pattern matching