title: Haskell Error: Non type-variable argument in the constraint: Num (a -> a -> a -> a)
body: <p>I'm new to Haskell and am trying to run the following example code from my book: </p>
  
  <p>entire file: </p>
  
  <pre><code>-- my name
  
  splitAt1   ::  [a] -&gt; ([a], [a])
  splitAt1 xs = (take 2 xs, drop 2 xs) 
  </code></pre>
  
  <p>I'm testing by running the line:</p>
  
  <pre><code>splitAt1 [1 2 3 4]
  </code></pre>
  
  <p>The idea is that the input array is split into two arrays at the index 2. However, I am getting the following error: </p>
  
  <pre><code>Non type-variable argument
    in the constraint: Num (a -&gt; a -&gt; a -&gt; a)
  (Use FlexibleContexts to permit this)
  When checking that ‘it’ has the inferred type
    it :: forall a a1 a2 a3.
          (Num a1, Num a2, Num a3, Num (a1 -&gt; a2 -&gt; a3 -&gt; a)) =&gt;
          ([a], [a])
  </code></pre>
  
  <p>Could anyone help me decode the error message and perhaps what is wrong with the code? </p>