Discussion period: 2 weeks
Returning to this discussion, I'm surprised that so few people have
actually commented yea or nay. Seems to me though that...
* Some people are clearly in favor of a move in this direction, as
seen both by their replies here and discussion over other channels.
* Others
Hello,
Sorry for responding so late---I just saw the thread. I don't think
that we should deprecate the usual way to define existentials. While
the GADT syntax is nice in some cases, there are also examples when it
is quite verbose. For example, there is a lot of repetition in
datatypes that
One can use the following style of GADT definition, which avoids the
type variables in the declaration:
{-# LANGUAGE GADTs, KindSignatures #-}
module GADT where
data Foo :: * - * where
Foo :: Int - Foo Int
Iavor Diatchki wrote:
Hello,
Sorry for responding so late---I just saw the thread.
Hi,
True, but then you have to declare the kind manually.
-Iavor
On Thu, Jul 23, 2009 at 7:36 PM, Sittampalam,
Ganeshganesh.sittampa...@credit-suisse.com wrote:
One can use the following style of GADT definition, which avoids the
type variables in the declaration:
{-# LANGUAGE GADTs,
| That's why one should really be allowed to group constructor's in a
| type's definition:
|
|data Colour :: * where
| Red, Green, Blue :: Colour
Indeed. GHC allows this now. (HEAD only; will be in 6.12.)
Simon
___
Haskell-prime mailing
Niklas,
My rationale is as follows. With the introduction of GADTs, we now
have two ways to write datatype declarations, the old simple way and
the GADTs way. The GADTs way fits better syntactically with Haskell's
other syntactic constructs, in all ways. The general style is
(somewhat
In other words, in your 2x3 grid of syntactic x expressiveness, I want
the two points corresponding to classic syntax x {existential
quantification, GADTs} to be removed from the language. My second
semi-proposal also makes each of the three points corresponding to the
new cool syntax a
Niklas,
I am opposed since
a) it requires the addition of extra syntax to the language, and
b) we have another, better, way to do it.
Somewhat pointed, I don't think the C++ way of putting all imaginable
ways to do the same thing into the language is a sound design
principle. If we have two
While I agree in principle that GADTs are the way forward, I have to
vote against deprecating anything using the existing syntax in any
kind of a hurry.
There are syntactic extensions which don't (yet?) work with GADTs that
I am loathe to lose, even if they do leave a lot to be desired. Not
that
I would hereby like to propose that the
ExistentialQuantification extension is deprecated.
It is worth pointing out that all current Haskell implementations (to
my knowledge) have ExistentialQuantification, whilst there is only one
Haskell implementation that has the proposed replacement
10 matches
Mail list logo