I couldn't' resist looking into this bug this evening. It turned out to be a consequence of a mistake in typechecking lazy patterns, which only showed up with the new feature I've just added (allowing constructors to bind dictionaries).
Thanks for finding it; it should work now. Simon | -----Original Message----- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sven Panne | Sent: 24 November 2006 17:39 | To: [email protected] | Subject: Regression regarding Storable | | I've compiled GHC from HEAD this morning, and it once again broke my OpenGL | binding. After boiling down the example (see attached Foo.hs), it seems that | either Storable itself, constant folding or the strictness analysis is buggy: | | [EMAIL PROTECTED]:~> ./Foo | *** main 1 | *** main 2 | Foo: Prelude.undefined | | I suspect that the "undefined" is the one in the default instance of | peekElemOff, but that is just guessing. GHC even goes so far to optimize away | the last putStrLn (see Foo.simpl). :-( | | Cheers, | S.
