Hi Tom,<br>my 2 cents here: <br>it looks like you had an old version of GHC and now, it&#39;s a new!<br>My comments inline:<br><br><div class="gmail_quote">On Thu, Sep 20, 2012 at 10:18 AM, bucephalus org <span dir="ltr">&lt;<a href="mailto:bucephalus.org@gmail.com" target="_blank">bucephalus.org@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear fellow Haskellers,<div><br><div>last weak my Linux machine broke down and refused to start again. I bought a new one and installed a fresh new KDE/Linux distribution (Mint/Ubuntu) and it looks and feels awesome. I also installed the Haskell platform via the default GUI installer (mintInstall).</div>

<div>But when I try to run my recovered Haskell modules again, strange things happen.</div><div><br></div><div><br></div><div>First of all, I have a module that has a line</div><div>  import System</div><div>and that used to be fine. But now, when I try to load the module in a ghci session, I get a complaint:</div>

<div>  Could not find module &#39;System&#39;</div><div>  It is a member of the hidden package &#39;haskell98-2.0.0.1&#39;</div><div>  ...</div><div>The same happens if I do a</div><div>  Prelude&gt; :m System</div><div>
What is going on?</div></div></blockquote><div><br>Most likely you wanted to import System.IO<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<div><br></div><div><br></div><div>Secondly, I have another module that has a data type definition like this</div><div>  data (Show n, Show v, Ord n, Ord v) =&gt; Automaton n v = Automaton {</div><div>     nameSet :: Set.Set n,</div>

<div>     valueSet :: Set.Set v,</div><div>     ....</div><div>  } deriving (Show, Eq, Ord)</div><div>and that used to work fine, too. But now, I get the complaint</div><div>  Illegal datatype context (use -XDatatypeContexts): (Show n, Show v, Ord n, Ord v) =&gt; </div>

<div>But when I follow the advice and start the module file with a</div><div>  {-# LANGUAGE DatatypeContexts ... #-}</div><div>I got the opposite complaint:</div><div>  Warning: -XDatatypeContexts is depracated: It was widely considered a misfeature, and has been removed from the Haskell language.</div>

<div>How can I clean this up?</div><div><br></div></div></blockquote><div><br>see <a href="http://stackoverflow.com/questions/7438600/datatypecontexts-deprecated-in-latest-ghc-why">http://stackoverflow.com/questions/7438600/datatypecontexts-deprecated-in-latest-ghc-why</a><br>
Generally (my fellow haskeller may correct me) I think that&#39;s better to put the class constraint on the methods rather than on the type declaration.<br>So it becomes:<br><br>data Automaton n v = Automaton {<br>     nameSet :: Set.Set n,<br>
     valueSet :: Set.Set v<br>  } deriving (Show, Eq, Ord)<br><br>createAutomaton :: (Show n, Show v, Ord n, Ord v) =&gt; n -&gt; v -&gt; Automaton n v<br>createAutomaton n v = Automaton (singleton n) (singleton v)<br><br>
Best,<br>Corentin<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div><br></div></div><div>Cheers,</div><div>Tom</div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br>