0 | module Control.App.Console
2 | import public Control.App
7 | interface Console e where
8 | putChar : Char -> App {l} e ()
9 | putStr : String -> App {l} e ()
10 | getChar : App {l} e Char
11 | getLine : App {l} e String
14 | PrimIO e => Console e where
15 | putChar c = primIO $
putChar c
16 | putStr str = primIO $
putStr str
17 | getChar = primIO getChar
18 | getLine = primIO getLine
21 | putStrLn : Console e => String -> App {l} e ()
22 | putStrLn str = putStr (str ++ "\n")
25 | putCharLn : Console e => Char -> App {l} e ()
26 | putCharLn c = putStrLn $
strCons c ""
29 | print : Show a => Console e => a -> App {l} e ()
30 | print x = putStr $
show x
33 | printLn : Show a => Console e => a -> App {l} e ()
34 | printLn x = putStrLn $
show x