Idris2/tests/chez/chez024/Envy.idr
2020-06-16 14:02:04 +02:00

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 ()