RE: Elimination of absurd patterns

2011-05-03 Thread C Rodrigues

I tried it again using a development version of GHC 7.1 that I downloaded in 
March.
The results are the same, with GHC generating different code for the supposedly
equivalent data types. 'barName' has an impossible pattern match against
constructor 'BarExtra', whereas 'fooName' does not.



> Date: Mon, 2 May 2011 23:03:23 -0300
> Subject: Re: Elimination of absurd patterns
> From: felipe.le...@gmail.com
> To: red...@hotmail.com
> CC: glasgow-haskell-users@haskell.org
>
> On Mon, May 2, 2011 at 6:20 PM, C Rodrigues  wrote:
> > I was experimenting with using GADTs for subtyping when I found something
> > interesting.  Hopefully someone can satisfy my curiosity.
> > Here are two equivalent GADTs.  My understanding was that GHC would
> > translate "Foo" and "Bar" into isomorphic data types.  However, GHC 6.12.3
> > generates better code for 'fooName' than for 'barName'.  In 'fooName', there
> > is no pattern match against 'FooExtra'.  In 'barName', there is a pattern
> > match against 'BarExtra'.  What makes these data types different?
>
> IIRC, GHC 6.12.3 had some problems with type equalities. Did you try GHC 
> 7.0.3?
>
> Cheers, =)
>
> --
> Felipe.
  
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Broken ghc-7.0.3/vector combination?

2011-05-03 Thread Simon Marlow

On 21/04/2011 12:29, Felipe Almeida Lessa wrote:

On Thu, Apr 21, 2011 at 8:08 AM, Simon Marlow  wrote:

Right, it could be related to this.  However this change was made to
eliminate some causes of NaNs, see:

http://hackage.haskell.org/trac/ghc/ticket/4914

So I'm very depressed if it managed to introduce NaNs somehow.

Could someone make a ticket for this, with the smallest test case found so
far please?


So in principle the LLVM backend should be fine?


Yes, also compiling with -msse2 on x86 should be fine.

Cheers,
Simon


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users