title: How is the instance of Show for String written?
body: <p>I have a basic question about definining instances of typeclasses. I am using the Show typeclass as an example, and I am considering only the function show within the class. The Show instance for a concrete type like Bool is simple</p>
  
  <pre><code>instance Show Bool where
    show x = {function of x here}
  </code></pre>
  
  <p>but for String it is not:</p>
  
  <pre><code>instance Show String where
    show x = {function of x here}
  </code></pre>
  
  <p>produces understandably an error</p>
  
  <pre><code>Illegal instance declaration for ‘Formatter String’
    (All instance types must be of the form (T t1 ... tn)
     where T is not a synonym.
     Use TypeSynonymInstances if you want to disable this.)
  In the instance declaration for ‘Formatter String’
  </code></pre>
  
  <p>and of course the following is not allowed:</p>
  
  <pre><code>instance Show [Char] where
    show x = {function of x here}
  </code></pre>
  
  <p>I could define a newtype</p>
  
  <pre><code>newtype String2 = String2 String 
  instance Formatter String2 where
    format (String2 x) = {function of x here}
  </code></pre>
  
  <p>which however does not allow me to do show "test", as I am able to do in Haskell. </p>
  
  <p>What essential feature of typeclasses am I missing?</p>