
3 Feb
2010
3 Feb
'10
6:28 p.m.
On Feb 3, 2010, at 6:13 PM, Max Bolingbroke wrote:
With a class-based approach only one parser that creates values of the same type could be used in a program.
This is not the case, because you still have an instance "Quoted String". Then you can write:
$(myLang [|..|])
Where myLang :: String -> Q Exp
Ah, you're right. I find an instance Quoted String a little confusing and would probably write $(myLang "..") instead. Hmm, this is more complicated if the string contains line breaks and [|..|] would be an alternative string literal syntax where line breaks don't need to be escaped. Sebastian -- Underestimating the novelty of the future is a time-honored tradition. (D.G.)