title: Why do I get a No instance for (Show t0) arising from a use of show error?
body: <p>I'm stuck on this problem and I'm very new to Haskell, I was trying to complete the first Euler problem with the following code:</p>
  
  <pre><code>main = putStrLn . show . sum $ [3,6..1000]:[5,10..1000]
  </code></pre>
  
  <p>And here's the first part of the error:</p>
  
  <pre><code>euler/1.hs:1:19:
      No instance for (Show t0) arising from a use of `show'
      The type variable `t0' is ambiguous
      Possible fix: add a type signature that fixes these type variable(s)
      Note: there are several potential instances:
        instance Show Double -- Defined in `GHC.Float'
        instance Show Float -- Defined in `GHC.Float'
        instance (Integral a, Show a) =&gt; Show (GHC.Real.Ratio a)
          -- Defined in `GHC.Real'
        ...plus 23 others
      In the first argument of `(.)', namely `show'
      In the second argument of `(.)', namely `show . sum'
      In the expression: putStrLn . show . sum
  </code></pre>