haskell/haskell-mode — pull request #97 by sheyll (2012-11-24 16:36:33+00:00)
Title: Fix haskell-interactive-mode prompt detection

This concerncs haskell-interactive-mode and more specifically
'haskell-interactive-prompt'.

To allow e.g. "> " in haskell-interactive-prompt, these issues were fixed:

Problem 1: Given 'haskell-interactive-prompt' matches a haskell expression, i.e. "$
" when a string containing this expression is written into the interactive mode
buffer, it will not be evuluated correctly, because the elisp function that
extracts the user input from the buffer does not search for the prompt string at
the beginning of the line, but simply backwards from (point-max).

Problem 2: Given 'haskell-interactive-prompt' is a regex matching more than just
itself, e.g. ".*" the code will not be able to find the prompt reliably.

Solution: Remove direct references to 'haskell-interactive-prompt' from all
regex searches, and replace then with a new function
'haskell-interactive-prompt-regex', that returns a regular expression, that
matches ONLY exactly the prompt string at the beginning of the line, even if it
contains a regular expression matching more than itself.