replace some nonreadable regexps with rx macro; use haskell-align-imports-regexp in haskell-utils.el and haskell-sort-imports.el; wrap some functions into save-match-data; change some looking-at/string-match to looking-at-p/string-match-p to preserve match data;
replace one-case ifs with when macro