<div dir="ltr">Ah yes, I'd missed the "string literal" part.  In that case, I agree with Niklas that quasi-quoters seem the best option.  Although, they require pretty much the same framework to operate (a custom data type and parser), so once you have a quasi-quoter it's usually easy to implement dynamic checks with the same tooling.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 12:29 PM, Richard A. O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz" target="_blank">ok@cs.otago.ac.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
On 3/03/2014, at 4:59 PM, John Lato wrote:<br>
<br>
> Yes.  In Haskell, types are your friends.  You should define new types liberally.<br>
<br>
</div>I believe the original poster was asking about a *static* check.<br>
<br>
Newtypes with "smart constructors" are a good way to plug in<br>
a *dynamic* check, which is valuable but different.<br>
<br>
<br>
</blockquote></div><br></div>