[Haskell-cafe] types and braces

Lennart Augustsson lennart at augustsson.net
Wed Apr 15 11:01:54 EDT 2009


I'd suggest using some different kind of brackets to relieve the
misery, like {| |}.

On Wed, Apr 15, 2009 at 4:10 PM, Conor McBride
<conor at strictlypositive.org> wrote:
> Hi folks
>
> In search of displacement activity, I'm trying to tweak
> Language.Haskell.Exts to support a few more perfidious
> Exts I have in mind -- they only need a preprocessor,
> but I do need to work on parsed programs, ideally.
>
> I was hoping to add a production to the grammar of types
> to admit expressions, delimited by braces:
>
>  { exp }
>
> The idea is that instead of writing, (er, hi Claus),
>
> data True
> data False
>
> one just re-uses yer actual Bool (which becomes kind
> {Bool}) and writes {True} or {False}.
>
> The trouble is, the production I've added causes a
> reduce/reduce conflict in the grammar, but I don't get
> any more precise complaint than that.
>
> I guess what I'd like to know is whether I just need to
> debug my grammar extension, or whether the notation I'm
> proposing actually introduces a serious ambiguity that
> I'm too dim to notice. I'm mostly sending this in the
> hope that I have one of those "d'oh" moments you
> sometimes get when you articulate a stupid question in
> public.
>
> Put me out of my misery, please...
>
> Cheers
>
> Conor
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list