rewrite ~define, ~m still buggy for non-list pats