NYMIFK2WBHU4G34QF4GZP63ATL2EQC6PLAQLWZMUTPDGDPQUEKVQC
Y25HAVMY4WAD43DQ5PHLHUPDKW7X6DWJVP3VKYVQ3AE25S6ESSXAC
AYH2HO67CJQTXMZO5JEFBXSDAVUH4NVX42VAQMPJIQUGX7UFW3IAC
YEPLQQC3GXCKIMKHMG4QF42ZVEBE3AV2P7MXD2FBA4XAJSQNIBEQC
XHAO2M2V7NLRMTG4WWRBOYMD6ACPYALUWGL7ST3PKU5LEH555C2AC
XNPLRKJ4ZK442XNJ5BC7TO3DKXGXFSOSGBZBPW5HZZDHY3IVD6FAC
K7TT3LDM6HYYXLSYFSJZRQZ6GOGTDJ7F5KFU7GBPJOKN2DHJLHMQC
4KXMGXQ6PTWVMINMKRCQE7DIJXUYMO7SVNR6AQ243QULY7IZLUYAC
4WZ2PYVOKVZFB6Q44LR6APOSMZTUR566HI5IOFLDCA5C7RQRMFRAC
CO3C7GSZ2X62ALXW2EAWDHCRSXCNVKIIHCL47GYZ32OHZER4NLZQC
GEBWJGHFGLPFE6PGT5D7W3PL57NPMQRPDUK54GTN4344W6QT7DPAC
6D4TYQRJMN6QEKASHJ3ZN3E7TXF5IEQ3G4ATTZZ5AZC56VXMWFZAC
2DQ47UENKWPVS6XYO73Q2KCHTNG6GQVP2CKP24V2OQ4F4T3KAFMAC
LHFSZWK3U3RF4SBC2OY44PQ47GDELJ4NZOVRR2OBK3YVNNYKSDLAC
46ULZLRWCBDYLPE7Z4UU4G6ELIHVUWF7WUJIKBCMS3QVHTGA2L4QC
LKG7V6OC5VYTHY3YWWYMIDP5O6OQCWWSMHTMJKALLNQNPOVY375AC
AXIWYERYL2PU4JVN5WBIGTOLCVB2R7DVILTRJHU7WNMYPWPJNAOAC
unsafeCreateWorld : (%World -> a) -> a
unsafeCreateWorld f = f %MkWorld
unsafeDestroyWorld : %World -> a -> a
unsafeDestroyWorld %MkWorld x = x
public export
data IO : Type -> Type where
MkIO : PrimIO a -> IO a
public export
unsafePerformIO : IO a -> a
unsafePerformIO (MkIO p) = unsafeCreateWorld (\w =>
let MkIORes res w' := p w in unsafeDestroyWorld w' res)
proofLeftIdentity : (x : a) -> (f : a -> t b) -> Applicative.pure x `bind` f = f x
proofRightIdentity : (x : t a) -> x `bind` Applicative.pure = x
proofLeftIdentity : (x : a) -> (f : a -> t b) -> Applicative.pure x >>= f = f x
proofRightIdentity : (x : t a) -> x >>= Applicative.pure = x
import Builtin
import PrimIO
import Algebra.Control.Monad
import Control.Console
import Control.IO
askName : Console m => m ()
askName = do
putLine "What's your name? "
name <- getLine
putString "Hello, "
putString name
putChar '!'
putChar '\n'
main : IO ()
main = askName