User:Benmachine/hasktag bug
From HaskellWiki
(Difference between revisions)
(New page: When you open a comment inside <hask> tags without closing it, the parser breaks. Observe: Oh no: <hask>{-</hask> I broke it! Here's some nicely-formatted code: <haskell> id :: a ...) |
|||
| Line 1: | Line 1: | ||
| + | Should more properly be called "hasktag bugs" now, but whatever. | ||
| + | |||
| + | === Paragraphs === | ||
| + | |||
| + | Use of the tag seems to merge paragraphs in some circumstances: | ||
| + | |||
| + | Here is a paragraph with <hask>code</hask> in it. | ||
| + | |||
| + | Here is another, distinct paragraph, with more <hask>code</hask> in it. | ||
| + | |||
| + | Here is a paragraph with no code. | ||
| + | |||
| + | === Opening comments without closing them === | ||
| + | |||
When you open a comment inside <hask> tags without closing it, the parser breaks. Observe: | When you open a comment inside <hask> tags without closing it, the parser breaks. Observe: | ||
Revision as of 18:31, 30 April 2012
Should more properly be called "hasktag bugs" now, but whatever.
1 Paragraphs
Use of the tag seems to merge paragraphs in some circumstances:
Here is a paragraph withcode
code
Here is a paragraph with no code.
2 Opening comments without closing them
When you open a comment inside <hask> tags without closing it, the parser breaks. Observe:
Oh no:{-
Here's some nicely-formatted code:
id :: a -> a id x = const x x const :: a -> b -> a const x _ = id x
which is now ruined. Interestingly this text is fine.
Perhaps it's only paragraphs withany
-}
3 The problem
doesn't even stop at section boundaries:
error :: String -> a error str = error (error str)
