
8 Aug
2015
8 Aug
'15
8:22 p.m.
Hi, Lars,
On 8 août 2015, at 17:29, Lars Hupel
there is already an alternative syntax for declaring datatypes:
data Date where Date :: Int -> Int -> Int -> Date
data Anniversary where Birthday :: Name -> Date -> Anniversary Wedding :: Name -> Name -> Date -> Anniversary
This is called "GADT syntax" and can be enabled with -XGADTSyntax in GHC.*
Thank you for suggesting GADT, but i already knew about it. IMO this does not make the syntax with the equality sign (the one to which newcomers are introduced first) less weird :). Alexey.