Toy Regex Engine in Haskell