title: Using Overloaded Strings
body: <p><code>OverloadedStrings</code> extension is really very useful, however it has some downsides.
  Consider the following function definition:</p>
  
  <pre><code>someFunction :: ToJSSTring a =&gt; a -&gt; IO ()
  someFunction = js_function . toJSSTring
  </code></pre>
  
  <p>In this case when if I want to pass a literal value I have to add a type signature explicitly when <code>OverloadedStrings</code> is enabled:</p>
  
  <pre><code>someFunction ("This is plain string" :: String)
  someFunction ("And this one is Text" :: Data.Text.Text)
  </code></pre>
  
  <p>The reason for this necessity is quite obvious, I suppose <code>OverloadedStrings</code> was designed to ease the passing of literal values to functions that have strict type signatures, making the developer free from writing <code>pack</code>s everywhere where a <code>Text</code> value is needed.</p>
  
  <p>The question is there any way, say, to default all string literals without type signatures to <code>Text</code>, or <code>String</code>? Or should I just split my code to general functions (with the <code>ToJSString</code> type constraint) and arbitrary ones, which have strict type signatures for their arguments?</p>