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.)



_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to