Krzysztof Gogolewski | 2 Oct 12:39 2013
Picon

Operator priorities in GHC.TypeLits

Hello,

GHC.TypeLits currently has no operator priorities; 2 + 2 * 2 is parsed
as (2 + 2) * 2. Is it OK to add priorities as in
http://lpaste.net/93745? This seems to work but I'm bit surprised it
was not done before. The priorities are the same as for operators in
Prelude. Unfortunately, this does not handle ~, which still needs
brackets in 2 ~ (1+1); I don't know what to do about it.

K.
Iavor Diatchki | 6 Oct 18:40 2013
Picon

Re: Operator priorities in GHC.TypeLits

Hello,

thanks for pointing this out.  I've added the precedences.

-Iavor


On Wed, Oct 2, 2013 at 3:39 AM, Krzysztof Gogolewski <krz.gogolewski <at> gmail.com> wrote:
Hello,

GHC.TypeLits currently has no operator priorities; 2 + 2 * 2 is parsed
as (2 + 2) * 2. Is it OK to add priorities as in
http://lpaste.net/93745? This seems to work but I'm bit surprised it
was not done before. The priorities are the same as for operators in
Prelude. Unfortunately, this does not handle ~, which still needs
brackets in 2 ~ (1+1); I don't know what to do about it.

K.

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries

Gmane