Add a Total pattern to hack around the mismatch between pattern matching and parsing