Hello Brian,
Thursday, October 12, 2006, 3:35:34 AM, you wrote:
>> data Parser a | Alt (Parser a) (Parser a)
>> | Map ( b -> a) (Parser b)
>> | Succ a
> data
> Parser a =
> Alt (Parser a) (Parser a)
> Map ( b -> a
Doaitse Swierstra wrote:
I would prefer notation like:
data Parser a | Alt (Parser a) (Parser a)
| Map ( b -> a) (Parser b)
| Succ a
Parser (a,b) | Seq (Parser a) (Parser b)
Parser String | Lit (String -> Bool)
Parser [a]| Man
I would prefer notation like:
data Parser a | Alt (Parser a) (Parser a)
| Map ( b -> a) (Parser b)
| Succ a
Parser (a,b) | Seq (Parser a) (Parser b)
Parser String | Lit (String -> Bool)
Parser [a]| Many (Parser a)
This takes a
Well, Kent Petersson and I proposed them as an addition to Haskell in
1994, so they are not that new. :)
-- Lennart
http://web.cecs.pdx.edu/~sheard/papers/silly.pdf
On Oct 11, 2006, at 09:47 , Paul Hudak wrote:
Lennart Augustsson wrote:
Well, I think the GADT type definition syntax
Lennart Augustsson wrote:
Well, I think the GADT type definition syntax is the syntax data type
definitions should have had from the start. Too bad we didn't
realize it 15 years ago.
-- Lennart
I agree! In my experience teaching Haskell, the current syntax is a bit
confusing for newbies
On Oct 11, 2006, at 03:58 , Bulat Ziganshin wrote:
Hello oleg,
Wednesday, October 11, 2006, 6:12:23 AM, you wrote:
Annotate the data type using a GADT:
data MyData a where
MyCon :: MyData a
It helps to reduce confusion about the merits of various features and
additions to Haskell if we u
Hello oleg,
Wednesday, October 11, 2006, 6:12:23 AM, you wrote:
>> Annotate the data type using a GADT:
>> data MyData a where
>> MyCon :: MyData a
> It helps to reduce confusion about the merits of various features and
> additions to Haskell if we use the term GADT exclusively for truly
> _gen
Niklas Broberg wrote:
> Annotate the data type using a GADT:
> data MyData a where
> MyCon :: MyData a
The range of the data constructor MyCon is the entire type MyData a --
so the above data type is the regular algebraic data type, and can be
written just as
data MyData a = MyCon
which,