id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
14	Parametrize parsing on extensions that should be recognized	nibro	nibro	"The main sticking point for haskell-src-exts at the moment is that it cannot parse some perfectly valid Haskell98 code. This is because it assumes all extensions are active, including those that ""steal"" syntax.

The typical example is Template Haskell's special treatment of $ident and $( ). In Haskell 98 there would be no difference between $ident and $ ident, i.e. the application operator followed by an identifier ident. With Template Haskell active, $ident is a splicing of the TH expression ident.

We obviously want to be able to handle both interpretations, and thus we must parametrize the parser on what extensions it should recognize during parsing. For instance, $ident would only be a TH splice if the !TemplateHaskell extension was active.

Some extensions can be handled at the level of the lexer, such as the TH splices. These are the simple ones. Other extensions must be deferred to the parser, such as MPTCs. These are far trickier since the Parser is written using happy. In these cases we need to first parse a rule, and then verify/massage the result of the parse into whatever form is appropriate."	feature request	closed	blocker	Full code support	parser		duplicate		
