Re: testing 6.12.2-pre

2010-04-15 Thread Matthias Kilian
On Wed, Apr 14, 2010 at 08:44:29PM +0200, Matthias Kilian wrote: module Main(main) where import System.IO import System.Process main = do hin - openBinaryFile /dev/null ReadMode hp - runProcess /bin/ls [-l] Nothing Nothing (Just hin) Nothing Nothing

interaction of GADTs and data families: a bug?

2010-04-15 Thread Sebastian Fischer
Dear GHC experts, Certain behaviour when using {-# LANGUAGE GADTs, TypeFamilies #-} surprises me. The following is accepted by GHC 6.12.1: data GADT a where BoolGADT :: GADT Bool foo :: GADT a - a - Int foo BoolGADT True = 42 But the following is not: data family

Re: interaction of GADTs and data families: a bug?

2010-04-15 Thread José Pedro Magalhães
Hi Sebastian, Is this perhaps another instance of #3851? http://hackage.haskell.org/trac/ghc/ticket/3851 Cheers, Pedro On Thu, Apr 15, 2010 at 14:10, Sebastian Fischer s...@informatik.uni-kiel.de wrote: Dear GHC experts, Certain behaviour when using {-# LANGUAGE GADTs, TypeFamilies

Re: interaction of GADTs and data families: a bug?

2010-04-15 Thread Sebastian Fischer
Is this perhaps another instance of #3851? http://hackage.haskell.org/trac/ghc/ticket/3851 Honestly: I don't know. My example is different from the one shown in #3851 in that it also does not work in GHC 6.10 (which even panics instead of giving the error 6.12 gives) and in that it uses a

Re: interaction of GADTs and data families: a bug?

2010-04-15 Thread José Pedro Magalhães
Hi Sebastian, On Thu, Apr 15, 2010 at 15:08, Sebastian Fischer s...@informatik.uni-kiel.de wrote: Is this perhaps another instance of #3851? http://hackage.haskell.org/trac/ghc/ticket/3851 Honestly: I don't know. My example is different from the one shown in #3851 in that it also does

Re: interaction of GADTs and data families: a bug?

2010-04-15 Thread Sebastian Fischer
but later in the comments I show an example with data families which fails on both 6.10.4 and 6.12.1. Ah, I think I misinterpreted your comment, when I read it for the first time. Thanks for pointing me at it again. But I still don't see whether or not the two examples are related. At

RE: interaction of GADTs and data families: a bug?

2010-04-15 Thread Sittampalam, Ganesh
Sebastian Fischer wrote: Dear GHC experts, Certain behaviour when using {-# LANGUAGE GADTs, TypeFamilies #-} surprises me. The following is accepted by GHC 6.12.1: data GADT a where BoolGADT :: GADT Bool foo :: GADT a - a - Int foo BoolGADT True = 42

Re: interaction of GADTs and data families: a bug?

2010-04-15 Thread Dan Doel
On Thursday 15 April 2010 8:10:42 am Sebastian Fischer wrote: Dear GHC experts, Certain behaviour when using {-# LANGUAGE GADTs, TypeFamilies #-} surprises me. The following is accepted by GHC 6.12.1: data GADT a where BoolGADT :: GADT Bool foo :: GADT a - a

Re: interaction of GADTs and data families: a bug?

2010-04-15 Thread Sebastian Fischer
With GADTs, the specific choice of constructor is what gives you the type matching functionality. My intention was to use a GADT as data family instance (hence, I wrote it in GADT style and it was accepted as such). Can't GADTs be used as data family instances? Sebastian --

RE: interaction of GADTs and data families: a bug?

2010-04-15 Thread Sittampalam, Ganesh
Sebastian Fischer wrote: With GADTs, the specific choice of constructor is what gives you the type matching functionality. My intention was to use a GADT as data family instance (hence, I wrote it in GADT style and it was accepted as such). Can't GADTs be used as data family instances?

Re: interaction of GADTs and data families: a bug?

2010-04-15 Thread Sebastian Fischer
On Apr 15, 2010, at 3:44 PM, Sittampalam, Ganesh wrote: You were trying to choose between different top-level types (which happen to be instances of the same family) by their constructors. That is true. I was trying to emulate an open data type such that I can write -- does not work

Re: Unicode alternative for '..' (ticket #3894)

2010-04-15 Thread Jason Dusek
I think the baseline ellipsis makes much more sense; it's hard to see how the midline ellipsis was chosen. -- Jason Dusek ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: Unicode alternative for '..' (ticket #3894)

2010-04-15 Thread Yitzchak Gale
My opinion is that we should either use TWO DOT LEADER, or just leave it as it is now, two FULL STOP characters. Two dots indicating a range is not the same symbol as a three dot ellipsis. Traditional non-Unicode Haskell will continue to be around for a long time to come. It would be very

Re: Unicode alternative for '..' (ticket #3894)

2010-04-15 Thread Roel van Dijk
That is very interesting. I didn't know the history of those characters. If we can't find a Unicode character that everyone agrees upon, I also don't see any problem with leaving it as two FULL STOP characters. I agree. I don't like the current Unicode variant for .., therefore I suggested an

Re: FFI calls: is it possible to allocate a small memory block on a stack?

2010-04-15 Thread Denys Rtveliashvili
While alloca is not as cheap as, say, C's alloca, you should find that it is much quicker than C's malloc. I'm sure there's room for optimisation if it's critical for you. There may well be low-hanging fruit: take a look at the Core for alloca. The problem with using the stack is that

Re: Advice on Multiple GHC installations

2010-04-15 Thread Bradford Larsen
Many choices were suggested! For now, I have decided to go with stow. I installed 3 versions of GHC in /usr/local/stow, and installed cabal-install locally (i.e. to my home directory), built with ghc 6.12.1. I'm not sure that this is the best way to go about this, but it's what I'm working with

RE: interaction of GADTs and data families: a bug?

2010-04-15 Thread Simon Peyton-Jones
| My intention was to use a GADT as data family instance (hence, I | wrote it in GADT style and it was accepted as such). Can't GADTs be | used as data family instances? | | I'm not aware of any restriction there, but that's not the issue here. | | You were trying to choose between different