0 | module Control.ANSI.CSI
7 | cursorUp : Nat -> String
8 | cursorUp n = "\x1B[" ++ show n ++ "A"
12 | cursorUp1 = cursorUp 1
17 | cursorDown : Nat -> String
18 | cursorDown n = "\x1B[" ++ show n ++ "B"
21 | cursorDown1 : String
22 | cursorDown1 = cursorDown 1
27 | cursorForward : Nat -> String
28 | cursorForward n = "\x1B[" ++ show n ++ "C"
31 | cursorForward1 : String
32 | cursorForward1 = cursorForward 1
37 | cursorBack : Nat -> String
38 | cursorBack n = "\x1B[" ++ show n ++ "D"
41 | cursorBack1 : String
42 | cursorBack1 = cursorBack 1
47 | cursorNextLine : Nat -> String
48 | cursorNextLine n = "\x1B[" ++ show n ++ "E"
51 | cursorNextLine1 : String
52 | cursorNextLine1 = cursorNextLine 1
57 | cursorPrevLine : Nat -> String
58 | cursorPrevLine n = "\x1B[" ++ show n ++ "F"
61 | cursorPrevLine1 : String
62 | cursorPrevLine1 = cursorPrevLine 1
67 | cursorMove : (row : Nat) -> (col : Nat) -> String
68 | cursorMove row col = "\x1B[" ++ show row ++ ";" ++ show col ++ "H"
71 | data EraseDirection = Start | End | All
73 | Cast EraseDirection String where
80 | eraseScreen : EraseDirection -> String
81 | eraseScreen to = "\x1B[" ++ cast to ++ "J"
85 | eraseLine : EraseDirection -> String
86 | eraseLine to = "\x1B[" ++ cast to ++ "K"
90 | scrollUp : Nat -> String
91 | scrollUp n = "\x1B[" ++ show n ++ "S"
95 | scrollUp1 = scrollUp 1
99 | scrollDown : Nat -> String
100 | scrollDown n = "\x1B[" ++ show n ++ "T"
103 | scrollDown1 : String
104 | scrollDown1 = scrollDown 1