title: Haskell Relations Error - Syntax error in declaration (unexpected `;', possibly due to bad layout)
body: <p>I'm fairly new to Haskell and I don't fully understand this error, when I load the file hugs prints out the following "Syntax error in declaration (unexpected `;', possibly due to bad layout)" at the line "check s1 s2 ((x,y):xs)". I find this confusing as there isn't a ";" in the code. If someone could explain why this is happening and how I can fix it I would be very grateful. Bellow is my code.</p>
  
  <pre><code>type Owned = String  
  type Owner = String  
  type Fact = (Owned,Owner)
  
  database = [(String, String)]  
  database = [("c4","c5"),("c1","c2"), ("c2", "c3"), ("c3","c4")]
  
  owns :: Owner -&gt; Owned -&gt; Bool
  
  owns s1 s2  
        | check s1 s2 database = true  
        | otherwise false
  
  check s1 s2 ((x,y):xs)  
       | s1==x &amp;&amp; y==s2 = true  
       | s1==x &amp;&amp; y==s2 = (check y s2 database)  
       | otherwise false
  </code></pre>