[bitc-dev] Quick haskell question

Jonathan S. Shapiro shap at eros-os.org
Thu Aug 12 17:47:55 PDT 2010


On Thu, Aug 12, 2010 at 11:53 AM, Mark P. Jones <mpj at cs.pdx.edu> wrote:

> Fixity statements in Haskell are lexically
> scoped, but that doesn't ... guarantee or
> require that you have seen a fixity declaration before you see a use.
>

This does not correspond to lexical scoping as I understand the term. In a
lexical scoping (disregarding imports), the thing used must be introduced
somewhere up and to the left of the site of use. I'm aware of some weird
special cases that arise in things like object scopes in C++, but strictly
speaking, such scopes aren't lexical scopes.


> > It is very difficult to imagine why a non-lexical approach is desirable
> unless that is due to lack of forward declarations. Can you give an example
> of a case where lexically constrained infix is awkward?
> I don't understand your question, which may be because we're
> using "lexical" in different ways.  If my earlier comments haven't
> cleared this up already, could you expand on the question and then
> I will try again.
>
Perhaps my question should have been: can you point to an example case where
the use of an infix operator truly wants to precede the identificaiton of
that operator as infix?


shap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20100812/4ed69e8f/attachment.html 


More information about the bitc-dev mailing list