title: Why i can't compile with GHC if code contain module definition?
body: <p>I'am trying to compile a very small haskell code with ghc:</p>
  
  <pre><code>module Comma where
  
  import System.IO
  
  main = do  
      contents &lt;- getContents  
      putStr (comma contents)  
  
  comma input = 
    let allLines = lines input
        addcomma [x]    =   x
        addcomma (x:xs)   = x ++ "," ++ (addcomma xs)
        result = addcomma allLines
    in result
  </code></pre>
  
  <p>The command i'm using to compile is : </p>
  
  <blockquote>
    <p>ghc --make Comma.hs</p>
  </blockquote>
  
  <p>And i'm getting this answer:</p>
  
  <blockquote>
    <p>[1 of 1] Compiling Comma        ( Comma.hs, Comma.o )</p>
  </blockquote>
  
  <p>No file is generated, and there is no warning or errors messages.</p>
  
  <p>If i comment the "module Comma where" line from code it compiles correctly:</p>
  
  <blockquote>
    <p>[1 of 1] Compiling Main             ( Comma.hs, Comma.o )
    Linking Comma ...</p>
  </blockquote>
  
  <p>I don't understand what is happening.
  I'm using ghc 7,4,1 
  (Glasgow Haskell Compiler, Version 7.4.1, stage 2 booted by GHC version 7.4.1)
  and ubuntu linux.</p>
  
  <p>I appreciate if anyone could tell why doesn't compile with the module definition</p>