Re: [Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-21 Thread Bulat Ziganshin
Hello Bruno, Sunday, November 21, 2010, 8:49:52 AM, you wrote: ghc --make ftest2.hs may be your versions of ghc and (win)ghci are different? the behavior was changed in latest versions afaik -- Best regards, Bulatmailto:bulat.zigans...@gmail.com

Re: [Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-21 Thread Bruno Damour
Le 21/11/10 11:03, Bulat Ziganshin a écrit : Hello Bruno, Sunday, November 21, 2010, 8:49:52 AM, you wrote: ghc --make ftest2.hs may be your versions of ghc and (win)ghci are different? the behavior was changed in latest versions afaik that would be surprising, I only installed Haskell

Re: [Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-21 Thread Manlio Perillo
Il 21/11/2010 06:49, Bruno Damour ha scritto: Hello, I have a very strange (for me) problem that I manage to reduce to this : I have a small program that reads a file with 1 only character (è = e8) The program is ftest2.hs : [...] The only difference I can see is the codepage used. The

Re: [Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-21 Thread Bruno Damour
Le 21/11/10 17:21, Manlio Perillo a écrit : Il 21/11/2010 06:49, Bruno Damour ha scritto: Hello, I have a very strange (for me) problem that I manage to reduce to this : I have a small program that reads a file with 1 only character (è = e8) The program is ftest2.hs : The only difference I

Re: [Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-21 Thread Bruno Damour
Le 21/11/10 17:21, Manlio Perillo a écrit : Il 21/11/2010 06:49, Bruno Damour ha scritto: Hello, I have a very strange (for me) problem that I manage to reduce to this : I have a small program that reads a file with 1 only character (è = e8) The program is ftest2.hs : [...] The only

Re: [Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-21 Thread Manlio Perillo
Il 21/11/2010 19:06, Bruno Damour ha scritto: Le 21/11/10 17:21, Manlio Perillo a écrit : Il 21/11/2010 06:49, Bruno Damour ha scritto: Hello, I have a very strange (for me) problem that I manage to reduce to this : I have a small program that reads a file with 1 only character (è = e8) The

Re: [Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-21 Thread Manlio Perillo
Il 21/11/2010 19:28, Bruno Damour ha scritto: [...] Of course you're right but that was a surprise to me... G:\CODE\rlibchcp 1252 Page de codes active: 1252 G:\CODE\rlibftest3.exe è Just '1' G:\CODE\rlibchcp 850 Page de codes active : 850 G:\CODE\rlibftest3.exe è Just '2'

Re: [Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-21 Thread Manlio Perillo
Il 21/11/2010 21:51, Manlio Perillo ha scritto: [...] There are 3 solutions: 1) open the file in binary mode 2) set the console codepage to 1252. I do this by changing the Command Prompt shortcut destination to: `%SystemRoot%\system32\cmd.exe /k chcp 1252` 3) explicitly set the

[Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-20 Thread Bruno Damour
Hello, I have a very strange (for me) problem that I manage to reduce to this : I have a small program that reads a file with 1 only character (è = e8) The program is ftest2.hs : import IO import Data.Maybe tfind s = lookup (head s) $ zip ['\xe8', '\xde'] 12 main= do h-