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?
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
System
is not a module. You can think of it as sort of a namespace for other modules, such asSystem.IO
. – Aplet123System.Console.GetOpt
here: hackage.haskell.org/package/base-4.14.0.0/docs/… – 4castle