3 Answers
3

You need not only change List to Data.List, but also Random to System.Random and import getArgs from System.Environment (but at the moment, the code uses neither getArgs nor anything from System.Random, so for the time being, you can also remove those imports).

The old non-hierarchical modules are only accessible from the haskell98 package, which is no longer compatible with base. That means that using the haskell98 modules also requires explicitly hiding base on the command line, or not listing base in the dependencies field of the .cabal file.

I'm a bit surprised by the error message, I would expect it to say

Could not find module `System'
It is a member of the hidden package `haskell98-2.0.0.1'.

Well sorry the version that was on the link is not the same I was actually working on, I pushed the current version on github and that gets me the error displayed before.
–
andrea_crottiMar 4 '12 at 17:15

That's odd. I get no errors running the new version either with runhaskell or directly from the shell, and there's no reason for that error in the file. What does runhaskell --version report? Not that I expect anything but runghc 7.4.1, but I'd like to make sure.
–
Daniel FischerMar 4 '12 at 22:24

Yes I get exactly that version, I just tried on another machine with the previous version of GHC, and everything works fine... Maybe I'll just try to reinstall all the haskell-related packages on my Archlinux and see if that works.
–
andrea_crottiMar 5 '12 at 9:49

1

Seems a drastic measure, but on the other hand, that weird error on only(?) that one machine speaks for a botched installation.
–
Daniel FischerMar 5 '12 at 10:06

Yes, I updated GHC also on this machine and it still runs perfectly also with runhaskell. So the problem is probably related to conflicts with the packages previously installed via cabal, a cleanup should fix the issues..
–
andrea_crottiMar 5 '12 at 13:43

If your program is pure Haskell98 you can use the following GHC invokation:

ghc -package haskell98 -hide-package base

In the long term, though, it would be better if you upgraded at least to hierarchical module names. Use Hoogle to find out the name of the module. E.g., http://www.haskell.org/hoogle/?hoogle=withArgs lists System.Environment as the exporting module.

Secondly, it might be the case that List used to have more than Data.List now has. You might want to try to include the whole Prelude instead of just Data.List.

And to answer the question in the header, every update of GHC extends Haskell98. And some language pragma's even brake some Haskell98 specifics. But mostly changes in libraries cause problems, and not GHC updates themselves.