title: How can I adjust "tail" to avoid incorrect indentation in Haskell
body: <p>is there any way to solve this problem with incorrect indentation ? I want to check if every node on a given tree is bigger than it's grandfather (if it has one).
  I've written a function that gives all nodes on every level and the idea in the main function is to compare the nodes if they are smaller than their grandchildren. </p>
  
  <pre><code>data BTree = Empty | Node Int BTree Btree
  
  grandchildrenIncreased :: BTree -&gt; Bool
  grandchildrenIncreased Empty = Empty
  grandchildrenIncreased BTree = func BTree level
   where f BT n
    | head (level BT n) &lt; head (level BT n+2) = tail (level BT 1)
       (level BT n+2) grandchildrenIncreased f BT (n+1)
    | length (level BT n) == 0 = True
    | otherwise = False
  
  level :: BTree -&gt; Int -&gt; [a]
  level Empty _ = []
  level (Node n lt rt) 1 = [n]
  level (Node _ lt rt) k
   = (level lt (k-1)) ++ (level rt (k-1))
  </code></pre>
  
  <p>It gives error on the whole line where "tail" is.</p>