An efficient POSIX regular expression parsing and matching in Haskell