Difference between revisions of "HaskellWiki:Syntax highlighting/Breakage"

From HaskellWiki
Jump to: navigation, search
Line 41: Line 41:
 
Any kind of attempt to mix literals of different types breaks.
 
Any kind of attempt to mix literals of different types breaks.
   
<haskell>Foo || Bar</haskell>
+
<haskell>'a' || 'b' -- chars work</haskell>
  +
<haskell> "a" || "b" -- strings work</haskell>
   
 
I think any number or constructor on either side of the || makes it break.
 
I think any number or constructor on either side of the || makes it break.

Revision as of 13:22, 10 June 2006

This page is an attempt to find a minimal criminal for the bugs in GeSHi, the syntax highlighter that powers <haskell> and <hask> on the Haskell wiki.

x == '-' || True

That breaks.

x :: String
x = map toUpper "hello"

Subsequent <haskell> blocks seem to independant of the breakages.

False || True

Looks like the (||) operator is causing the problems.

a || b

However, that works. Perhaps it only breaks when using literals?

'a' || 'b'

No, characters work too.

'a' || True
True || 'a'
5 || 'a'
'a' || 5
5 || True
True || 5

Any kind of attempt to mix literals of different types breaks.

'a' || 'b' -- chars work
 "a" || "b" -- strings work

I think any number or constructor on either side of the || makes it break.