title: Haskell data type error
body: <p>I have this function:</p>
  
  <pre><code>data Memory = Memory
      {visited::[Point]
      ,dfsstack::[Point]
      ,currentPoz::Point
      }deriving(Eq)
  perceiveAndAct :: SVal -&gt; [Cardinal] -&gt; a -&gt; (Action, a)
  perceiveAndAct s cs m
    | elem W cs == True &amp;&amp; elem N cs == True &amp;&amp; elem E cs == True &amp;&amp; elem S cs == False = (Just S, Memory (visited m) (dfsstack m) (currentPoz m))
  </code></pre>
  
  <p>putting m instead of  <code>Memory (visited m) (dfsstack m) (currentPoz m)</code> works fine, else it gives me that:</p>
  
  <pre><code>Couldn't match expected type `(a, b)'
             against inferred type `Memory -&gt; Point'
      In the first argument of `fst', namely `currentPoz'
      In the first argument of `($)', namely `fst currentPoz'
      In the expression: fst currentPoz $ currentPoz m
  </code></pre>
  
  <p>What could be the problem?</p>