make PatternMatrix a record
convert WildcardPattern to defrecord