Code breaks with '-O', any ideas.

David Brown haskell2 at
Mon Mar 5 15:42:00 EST 2007

Ian Lynagh wrote:
> On Mon, Mar 05, 2007 at 10:51:46AM -0800, David Brown wrote:
>> My program 'harchive' <> breaks
>> if compiled with '-O'.  Just wondering if anyone has suggestions on
>> how to figure out what might be causing this.
> What do you mean by "breaks"?

:-).  It guess it would be best to describe it as behaving
differently.  I've seen to case.  One has to do with my binding to
sqlite3.  Sometimes the queries don't return the right results or
gibberish is entered into the database.  This suggests my binding has
problems (like pointers living past a GC).

In another instance, a populated map was failing to find an entry in
it.  I added a debug message to print out the map, and then it worked

I'm now rebuilding individual parts with -O to see if I can isolate
the problem(s).


More information about the Glasgow-haskell-users mailing list