<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello, <br>
    <br>
    According to the manual of the CIS 194 course I have to do this in
    GHCI :  testParse parse 10 "error.log" <br>
    This to test my code.<br>
    <br>
    Now my problem is that I cannot use GHCI because I use Fpcomplete. <br>
    So I thought I will use main for this : <br>
    <br>
    So I tried  this : <br>
    <br>
    main :: IO ()<br>
    main = do<br>
       print  $ testParse parse 10 "error.log"<br>
    <br>
    but then I see this error message : <br>
    <br>
    <div class="ide-error-span">src/LogAnalysis.hs@39:4-39:9 </div>
    <div class="ide-error-msg"><span>No instance for (Show (IO
        [LogMessage])) arising from a use of </span>
      <div class="CodeMirror cm-s-default" style="font-size: 14px;"><span
          class="cm-variable">print</span></div>
      <span title="Click to show/hide extra information"
        class="ide-error-collapse-btn"> …</span><span style="display:
        inline;">
        In the expression: print
        In a stmt of a 'do' block: print $ testParse parse 10
        "error.log"
        In the expression: do { print $ testParse parse 10 "error.log" }</span></div>
    <br>
    The testparse function looks like this : <br>
    <br>
    -- | @testParse p n f@ tests the log file parser @p@ by running it<br>
    --   on the first @n@ lines of file @f@.<br>
    testParse :: (String -> [LogMessage])<br>
              -> Int<br>
              -> FilePath<br>
              -> IO [LogMessage]<br>
    testParse parse n file = take n . parse <$> readFile file<br>
    <br>
    Roelof<br>
    <br>
  </body>
</html>