Operator priorities in GHC.TypeLits

Krzysztof Gogolewski krz.gogolewski
Wed Oct 2 10:39:34 UTC 2013


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.




More information about the Libraries mailing list