<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></blockquote><div><br>That&#39;s because your reinstalled Haskell Platform is more recent than your old one, it brings a new version of GHC (7.4.1 probably) and this version has moved from Haskell 98 to Haskell 2010 for its defaults.<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>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><br></div></div></blockquote><div><br>Haskell 2010 makes official the move from the old flat module namespace to the semi-hierarchical modules names so what used to be in System is now in System.Environment/Exit/.. you usually only need one. If you still want to use the old Haskell98 modules, you can expose the package haskell98 (which you do by adding &quot;-package haskell98&quot; to the command line or adding the package in the .cabal file)<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>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><br></div></blockquote><div><br>Basically the context in &quot;data (Show n, Show v, Ord n, Ord v) =&gt; Automaton n v&quot; don&#39;t do what one would typically want it to do, that is it doesn&#39;t add it implicitly in functions that use the Automaton type, you have to do that yourself. So the Haskell committee decided to deprecate this misleading possibility, most people would do fine without (eventually documenting the expectations in an Haddock comment) or use GADTs instead that really works for those kind of things. So either you delete this (Show n...) context (moving it to documentation) which shouldn&#39;t have any effect on your program (major reason for this deprecation) or you just ignore the deprecation warning (it&#39;s just a warning after all).<br>
<br>It&#39;s a brand new world ! And to compensate for those little problems, this new GHC probably compiles faster programs than your old one and offer some interesting new capacities (see the release notes).<br>-- <br>Jedaï<br>
</div></div>