title: No instance for Num String arising from the literal `1'
body: <pre><code>main = do  
      putStrLn $myLast [1,2,3,4]
  
  myLast :: [a] -&gt; a
  myLast [x] = x
  myLast (_:xs) = myLast xs
  </code></pre>
  
  <p>When i try to run this code i get this message: </p>
  
  <p>"No instance for (Num String) arising from the literal `1'
  Possible fix: add an instance declaration for (Num String)"</p>
  
  <p>It runs well when I run with the list ["1","2","3,"4"]. I didn't specify the type but it doesn't work with ints.</p>