mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-23 22:22:07 +03:00
27 lines
564 B
Idris
27 lines
564 B
Idris
module Main
|
|
|
|
import System
|
|
|
|
main : IO ()
|
|
main = do
|
|
ok <- setEnv "HELLO" "HI" True
|
|
printLn ok
|
|
Just str <- getEnv "HELLO"
|
|
| Nothing => pure ()
|
|
putStrLn str
|
|
ok <- setEnv "HELLO" "HO" False
|
|
printLn ok
|
|
Just str <- getEnv "HELLO"
|
|
| Nothing => pure ()
|
|
putStrLn str
|
|
ok <- setEnv "HELLO" "EH" True
|
|
printLn ok
|
|
Just str <- getEnv "HELLO"
|
|
| Nothing => pure ()
|
|
putStrLn str
|
|
ok <- unsetEnv "HELLO"
|
|
printLn ok
|
|
Just str <- getEnv "HELLO"
|
|
| Nothing => putStrLn "Nothing there"
|
|
pure ()
|