> I was expecting the Haskell program and C program attached to > produce the same results. However, as shown below, the C program > gives identical values for the two pointers whereas the Haskell > program gives different ones.
> [...] > Does anyone know what is going on here? Am I incorrectly using the > FFI? For what it's worth, I ran Ian's program on Hugs (with minor changes: Hugs gets confused by the use of type synonyms in ffi decls) and got similar results (on my Linux box): 0x083149b4 0x404cc4c4 0 It's so long since I used curses that I can't remember if the two hex numbers should match but it's certainly puzzling that they do in C but not in Haskell. Is it at all possible that the Haskell runtimes could have already called initscr? Hugs certainly uses some terminal control magic and it's possible that the implementation of termios and curses have something in common? But it seems unlikely that GHC-compiled code would do so too. I take it that if you go the next step and draw something on the screens you get different results? -- Alastair Reid _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
