[Haskell] GADT: call for proper terminology

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Oct 13 13:00:28 EDT 2006


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)  (Parser b)
>             Succ a

> I don't think there's a good reason to use | to separate alternatives when

don't forget that some definitions may be long enough. on the other
side, we can apply layout rule again:

     data
         Parser a  =
             Alt (Parser a)
                 (Parser a)
             Map (b -> a)
                 (Parser b)
             Succ a
         Parser (a,b)  = Seq (Parser a)
                             (Parser b)



-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell mailing list