[Haskell-cafe] Stack overflow

Grzegorz Chrupala grzegorz.chrupala at computing.dcu.ie
Thu Feb 14 07:56:39 EST 2008

Hi all,
I have a very simple program which reads a Data.Map from a file using
Data.Binary and Data.ByteString.Lazy, which gives stack overflow with files
over a certain size. Any ideas of what might be causing it?

You can try it with the small file (11M) at:

import System                                                                                                                                            
import Data.Map                                                                                                                                          
import qualified Data.ByteString.Lazy as BS                                                                                                              
import Data.Binary                                                                                                                                        
main = do                                                                                                                                                
  [path] <- getArgs                                                                                                                                      
  m <- fmap decode (BS.readFile path)::IO (Map (Int,Maybe String) Int)                                                                                    
  putStrLn . show . findMax $ m      

View this message in context: http://www.nabble.com/Stack-overflow-tp15479718p15479718.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

More information about the Haskell-Cafe mailing list