Idris2/tests/chez/chez024/Envy.idr

21 lines
410 B
Idris
Raw Normal View History

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