Less greedy
Merge pull request #1008 from tschaub/code-gen

Non-greedy pattern matching for types.