title: Can't find module Test.HUnit
body: <p>I am trying to make some unit tests in Haskell and this is basically what I have done in my code:</p>
  
  <pre><code>module Test where
  import Test.HUnit
  test = TestList [TestLabel "running all the tests!"
  $ TestList [
  . . . . .
  ]]  
  
  run = runTestTT tests   
  </code></pre>
  
  <p>When I try to compile it with the gchi I get this message:</p>
  
  <pre><code> Could not find module ‘Test.HUnit’
  Use -v to see a list of the files searched for.
  Failed, modules loaded: none
  </code></pre>
  
  <p>How can I make HUnit work?</p>
  
  <p>I am using GHCi version 7.8.3</p>
  
  <p>Thanks</p>
  
  <h2>Edit:</h2>
  
  <p>I tried installing HUnit through cabal as an answer suggested but then I got the error:</p>
  
  <pre><code>Could not find module ‘Test.HUnit’ Perhaps you haven't installed the "dyn" libraries for 
  package ‘HUnit-1.2.5.2’? 
  Use -v to see a list of the files searched for.
  </code></pre>
  
  <p>Then I used the command:</p>
  
  <pre><code>cabal install base
  </code></pre>
  
  <p>and I got this message:</p>
  
  <pre><code>Resolving dependencies...
  All the requested packages are already installed:
  base-4.7.0.1
  Use --reinstall if you want to reinstall anyway.
  </code></pre>
  
  <p>So I used the command:</p>
  
  <pre><code>cabal install base -reinstall
  </code></pre>
  
  <p>to reinstall just in case and I got the message:</p>
  
  <pre><code>Resolving dependencies...
  cabal: Could not resolve dependencies:
  rejecting: base-4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0,
  4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0 (only
  already installed instances can be used)
  rejecting: base-3.0.3.2 (conflict: base =&gt; base&gt;=4.0 &amp;&amp; &lt;4.3)
  rejecting: base-3.0.3.1 (conflict: base =&gt; base&gt;=4.0 &amp;&amp; &lt;4.2)
  </code></pre>
  
  <p>What should I do?</p>