- coin a new name for TagSoup.HT, say Tagchup, TagSalad, TagCloud, TagSnack, TagSnake, TagJam, TagJuice, TagStream, TagNoise, TagPack, TagPunch or so - move ParserNM to a separate module - don't use mfix for emittingTag, but run the Writer monad and prepend the parsed tag The top parsers for tags could be without the Writer transformer and return their tags as monadic results instead. The Writer could be restricted to a special warning data type. - Parser should be able to switch character set decoder when it encounters encoding meta tag in HTML header - This could be implemented using a custom monad of a CharSource class. A flexible decoding monad must also handle the emitted tags in order to filter out the charset meta tag. This is a bit complicated since currently we use a character source of type getChar :: String -> Maybe (Char, String) which allows simple switch back on parsing failure, whereas a CharSource monad would only have getChar :: m (Maybe Char) that is, in order to implement 'mplus'/'alternative' we have to buffer characters (maybe at most one character) that must be reparsed. - output to other types than String, e.g. Monoids with a character singleton like Binary's Builder or an Endo monoid for difference lists. Difficulty: HTMLChar We could simply leave the parser parse everything into lists and convert the results into something more efficient later. Would the compiler take us the burden to apply more manual optimization? I think we will also need a type parameter for ASCII strings, such as attribute names, processing instructions et.al. - avoid space leaks when too much warnings occur - restrict number of warnings within a tag - I'm afraid this won't fix the leak - restrict size of warnings - parseUnquotedValueChar for invalid characters - Format.stringQuoted