Re: GADT + Newtype deriving = Erroneous errors

2007-03-28 Thread Lennart Augustsson
We don't have to wait for the type checkers to rule. The semantics of GADTs is pretty clear (if it's implemented correctly is another matter). If you write data IsIntT x where IsIntT :: IsIntT Int then there is only one (non-bottom) value in the IsIntT families of types and that is

Re: GADT + Newtype deriving = Erroneous errors

2007-03-28 Thread Stefan O'Rear
On Wed, Mar 28, 2007 at 12:03:41PM +0100, Chris Kuklewicz wrote: > Stefan O'Rear wrote: > > On Tue, Mar 27, 2007 at 11:32:29AM +0100, Chris Kuklewicz wrote: > >> Stefan O'Rear wrote: > > newtype Foo = Foo Int deriving(IsIntC) > > > > > >> Note that (Foo 2) + 2 is an attempt to add a Fo

Re: inter module optimizations

2007-03-28 Thread Fawzi Mohamed
Donald Bruce Stewart wrote: [..] To really understand what is going on, I suggest looking at the -ddump-simpl output as you change the inlining settings. Then you'll see how GHC is moving code about. -- Don (who's spent the last 2 weeks playing the simplifer/inliner game) Thanks, but actually

More on FreeBSD/amd64

2007-03-28 Thread Gregory Wright
Hi Ian, I have made some more progress on understanding the build failure on FreeBSD/amd64. I could use a check on my understanding of the problem, though. The setup: I have an unregisterized ghc-6.4.2 successfully built on FreeBSD/amd64. It was bootstrapped from .hc files compiled on FreeBS

Re: inter module optimizations

2007-03-28 Thread Donald Bruce Stewart
fmohamed: > I had posted some data on inter-module optimizations that I had > calculated when splitting my program from one computational module to > many different ones. > > Tim Chevalier suggested that my calculation could be interesting to the > people here. > > So I made the effort of prep

Re: GADT + Newtype deriving = Erroneous errors

2007-03-28 Thread Chris Kuklewicz
Tomasz Zielonka wrote: > On Mon, Mar 26, 2007 at 09:18:34PM -0700, Stefan O'Rear wrote: >> [EMAIL PROTECTED]:/tmp$ cat A.lhs >>> {-# OPTIONS_GHC -fglasgow-exts #-} >>> >>> data IsIntT x where IsIntT :: IsIntT Int >>> >>> class IsIntC a where isInt :: IsIntT a >>> instance IsIntC Int where isInt = I

Re: GADT + Newtype deriving = Erroneous errors

2007-03-28 Thread Tomasz Zielonka
On Mon, Mar 26, 2007 at 09:18:34PM -0700, Stefan O'Rear wrote: > [EMAIL PROTECTED]:/tmp$ cat A.lhs > > {-# OPTIONS_GHC -fglasgow-exts #-} > > > > data IsIntT x where IsIntT :: IsIntT Int > > > > class IsIntC a where isInt :: IsIntT a > > instance IsIntC Int where isInt = IsIntT > > > > newtype Foo

inter module optimizations

2007-03-28 Thread Fawzi Mohamed
I had posted some data on inter-module optimizations that I had calculated when splitting my program from one computational module to many different ones. Tim Chevalier suggested that my calculation could be interesting to the people here. So I made the effort of preparing the various versio

Re: GADT + Newtype deriving = Erroneous errors

2007-03-28 Thread Chris Kuklewicz
Stefan O'Rear wrote: > On Tue, Mar 27, 2007 at 11:32:29AM +0100, Chris Kuklewicz wrote: >> Stefan O'Rear wrote: newtype Foo = Foo Int deriving(IsIntC) > >> Note that (Foo 2) + 2 is an attempt to add a Foo and an Int, which cannot >> possibly compile. So I replaced it with just a 2. >

Re: GHC compiled program slower with -O1 than -O0

2007-03-28 Thread Simon Marlow
Neil Mitchell wrote: Hi Simon One thing to check is heap usage and GC time. Does GC time, or residency (both reported by -Sstderr) go up a lot? It's possible that an optimisation is changing space behaviour for the worse. I've attached the logs for both -O0 (norm) and -O1 (opt), it appears