List comprehension not colorised
ggreif opened this issue · comments
primes :: Integral n => [n]
primes=2:[p|p<-[3,5..],all((/=0).(rem$p))$takeWhile((<=p).(^2))primes]
won't properly colourise in Atom. It might be the fault of the underlying parser, though... In this case please tell where I should go with this issue.
For reference, syntax highlighting issues belong on language-haskell
repository. FWIW, there's a closed issue pertaining to the same topic there: atom-haskell/language-haskell#86
Long story short, the syntax you're using is ambiguous with GHC QuasiQuotes extension. Add spaces around p
. This is mentioned in the GHC documentation
primes :: Integral n => [n]
primes=2:[ p |p<-[3,5..],all((/=0).(rem$p))$takeWhile((<=p).(^2))primes]
Oh, I see. That could be read as a TemplateHaskell pattern quotation.