I just had a look in the proposed changes for Haskell 1.3 again, being
stuck in what I was otherwise trying to do, (more of that later maybe)
when I found the Qualified names: 

> Qualified names are defined in the lexical syntax.  Thus,
> `Foo.a' and `Foo . a' are quite different.  No whitespace is permitted in
> a qualified name.  Symbols may also be qualified: `Prelude.+' is
> an operator which can be used in exactly the same manner as `+'.

Does this mean spaces must be put around '.' when used as an operator?
Or will the parser make use of semantic information to distinguish
qualified names from functional composition, when '.' is not surrounded
with whitespace?

I checked some of the code I had written in a functional language
(Miranda) to see how I had used the functional composition.operator. I
found I really never put spaces around it.  And it was also one of the
commonest operators I used... maybe 3rd most commonly used altogether.

Maybe this style will be broken in Haskell 1.3?

        tstpatp9        = (P_cons P_write.P_cons P_read) P_empty_list
        proc_emulator f = prm_em.f

I guess one of the reasons for me not using spaces around '.' (which I
with some regularity do around other operators) is that I am not
_used_ to see spaces around '.'. That is because previously I have
used it in C without spaces around it. Spaces around it are allowed
in C though: '.' is just an operator like '+' or '->' in C. 

Maybe some other operator could be used for qualified names, maybe some
operator that could also be used for record selection? If some existing
operator must be "overloaded", why not use one that is (presumably)
less popular than '.', for example '~'. (Does this ever occur like a~b ?)

Best regards,

Sverker Nilsson
----------------------------------------
S.Nilsson Computer System AB
Ekholmsv.28B
S-582 61 LINKOPING




Reply via email to