Statically checked overloaded strings
This gist demonstrates a trick I came up with which is defining
Q (TExp a), where
lift-able. This allows you
$$("...") and have the string parsed at compile-time.
This offers a light-weight way to enforce compile-time constraints. It's
OverloadedStrings with static checks.
This trick works already in existing (old) GHCs.