[Haskell-cafe] Differences in optimisiation with interactive and compiled mode

Tomasz Zielonka tomasz.zielonka at gmail.com
Sat Dec 10 09:24:56 EST 2005


On Thu, Dec 08, 2005 at 06:38:45PM +0100, Henning Thielemann wrote:
> 
> On Thu, 8 Dec 2005, Branimir Maksimovic wrote:
> 
> > program performs search replace on a String
> 
> http://www.haskell.org/pipermail/haskell-cafe/2005-April/009692.html

Neat!

However, it breaks the following nice (but perhaps not useful?) property:

    replace x y z == reverse (replace (reverse x) (reverse y) (reverse z))

Example:

    *SearchRepl> replace "ab" "ba" "aaaaaaaaab"
    "baaaaaaaaa"

    *SearchRepl> reverse (replace (reverse "ab") (reverse "ba") (reverse "aaaaaaaaab"))
    "aaaaaaaaba"

Is this a feature or bug?

Best regards
Tomasz

-- 
I am searching for a programmer who is good at least in some of
[Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland


More information about the Haskell-Cafe mailing list