[Haskell-cafe] Same compiled program behaving differently when
called from ghci and shell
llama at ruomad.net
Sun Nov 21 00:49:52 EST 2010
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 :
tfind s = lookup (head s) $ zip ['\xe8', '\xde'] "12"
main = do
h<- readFile "g:\\CODE\\rlib\\test.txt"
print $ tfind h
I compile it from command line :
ghc --make ftest2.hs
Now the weird results :
1/ cmd line:
Prelude> :! ftest2.exe
I tested different variants, there is always a difference.
Any idea to help me trace this behaviour ?
More information about the Haskell-Cafe