I updated ghc today and my small program stopped working:
https://github.com/BrisFunctional/misere-oxo/blob/master/OXO/misere.hs
GHC is now version 7.4.1-2 and from what I managed to understand it now defaults
to haskell2010 standard, instead of haskell98. (as I can see from the output of ghc-pkg list):
haskell2010-1.1.0.1
(haskell98-2.0.0.1)
So I changed my “import List” to “import Data.List” which I thought was the only problem but now I get the following:
misere.hs:1:1: Not in scope: `System.Environment.withArgs'
where does that come from since I never even import System.Environment?
Any hint?
Thanks
EDIT:
I updated the version on github to reflect this error. and actually using Data.List ghc compiles the file perfectly, so it’s runhaskell that generates this problem..
You need not only change
ListtoData.List, but alsoRandomtoSystem.Randomand importgetArgsfromSystem.Environment(but at the moment, the code uses neithergetArgsnor anything fromSystem.Random, so for the time being, you can also remove those imports).The old non-hierarchical modules are only accessible from the
haskell98package, which is no longer compatible withbase. That means that using thehaskell98modules also requires explicitly hidingbaseon the command line, or not listingbasein the dependencies field of the.cabalfile.I’m a bit surprised by the error message, I would expect it to say
but that difference may be a quirk of
runhaskell.