| > 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 differen
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
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 instance
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
--
Underestimatin
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 ::
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 BoolGAD
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 lea
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
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
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, TypeFami
10 matches
Mail list logo