2020-06-16 13:22:21 +03:00
|
|
|
module Main
|
|
|
|
|
|
|
|
import System
|
|
|
|
|
|
|
|
main : IO ()
|
|
|
|
main = do
|
2020-06-16 14:48:31 +03:00
|
|
|
ok <- setEnv "HELLO" "HI" True
|
2020-06-16 13:22:21 +03:00
|
|
|
printLn ok
|
|
|
|
Just str <- getEnv "HELLO"
|
|
|
|
| Nothing => pure ()
|
|
|
|
putStrLn str
|
2020-06-16 14:41:40 +03:00
|
|
|
ok <- setEnv "HELLO" "HO" False
|
|
|
|
printLn ok
|
2020-06-16 14:58:49 +03:00
|
|
|
Just str <- getEnv "HELLO"
|
|
|
|
| Nothing => pure ()
|
|
|
|
putStrLn str
|
2020-06-16 14:41:40 +03:00
|
|
|
ok <- setEnv "HELLO" "EH" True
|
|
|
|
printLn ok
|
2020-06-16 14:58:49 +03:00
|
|
|
Just str <- getEnv "HELLO"
|
|
|
|
| Nothing => pure ()
|
|
|
|
putStrLn str
|
2020-06-16 13:22:21 +03:00
|
|
|
ok <- unsetEnv "HELLO"
|
|
|
|
printLn ok
|
|
|
|
Just str <- getEnv "HELLO"
|
|
|
|
| Nothing => putStrLn "Nothing there"
|
|
|
|
pure ()
|