RE: Regression regarding Storable

Simon Peyton-Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.all
Message-ID <DCA83D5F3861C941808187D4D3878750332AD63A@EA-EXMSG-C312.europe.corp.microsoft.com>
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:
|
|    panne@spock:~> ./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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.