default instance for IsString

Markus Läll markus.l2ll at gmail.com
Tue Apr 24 21:35:37 CEST 2012


I'm the one arguing in defense of the current state of
OverloadedStrings, and no secret that Yitz has been the main opponent
of it.

For what I understand, and putting words in his mouth, he wants to
write `"<something=illegal>" :: XML' and have the compiler tell him at
compile-time that this is not valid XML (if it actually is, imagine
that there's something invalid between the double quotes). I.e he
wants to parse the string at compile-time and have the compilation
fail if the parse fails, or have the string literal be replaced by the
syntax tree of that XML if it succeeds.*

This example is meta-programming par excellence, which is what
Template Haskell is for -- use it.

If I have a correct understanding of what Yitz has in mind, then this
is why *I'm* having this argument. In all due respect, Yitz, correct
me if I've got something wrong!


* Parsing is a partial function.

-- 
Markus Läll



More information about the Glasgow-haskell-users mailing list