Here https://hackage.haskell.org/package/regex-tdfa-1.3.2/docs/Text-Regex-TDFA.html in Basics section first regular expression rendered by haddock as
>>> let emailRegex = "[a-zA-Z0-9+._-]+\[-a-zA-Z]+\.[a-z]+"
But that's not a valid Haskell string, it should be
let emailRegex = "[a-zA-Z0-9+._-]+\\@[-a-zA-Z]+\\.[a-z]+"
Perhaps you need to add more slashes or something