improve grammar case to support function | $p when $e -> true
fix Mac Case insensitive problem
make error message for pat printing more meaningful