0
votes

Can't import System both with GHC or GHCi

I'm using Ubuntu 18.04.5 LTS and The Glorious Glasgow Haskell Compilation System, version 8.0.2

Can someone help me?

1
System is not a module. You can think of it as sort of a namespace for other modules, such as System.IO.Aplet123
So this example isn't correctAilson Forte
@AilsonForte Right, it's outdated4castle
There's an example of how to use System.Console.GetOpt here: hackage.haskell.org/package/base-4.14.0.0/docs/…4castle

1 Answers

1
votes

The example linked in the comments appears to work fine on modern GHC versions if you change the list of imports to:

import System.Console.GetOpt
import Control.Monad
import System.IO
import System.Exit
import System.Environment