3-- Various system interaction features (this is not necessarily the right way
4-- to split them up, I just need some of them now :))
10data System : Effect where
11 Args : { () } System (List String)
12 Time : { () } System Int
13 GetEnv : String -> { () } System (Maybe String)
14 CSystem : String -> { () } System Int
16instance Handler System IO where
17 handle () Args k = do x <- getArgs; k x ()
18 handle () Time k = do x <- time; k x ()
19 handle () (GetEnv s) k = do x <- getEnv s; k x ()
20 handle () (CSystem s) k = do x <- system s; k x ()
22instance Handler System (IOExcept a) where
23 handle () Args k = do x <- ioe_lift getArgs; k x ()
24 handle () Time k = do x <- ioe_lift time; k x ()
25 handle () (GetEnv s) k = do x <- ioe_lift $ getEnv s; k x ()
26 handle () (CSystem s) k = do x <- ioe_lift $ system s; k x ()
28--- The Effect and associated functions
31SYSTEM = MkEff () System
33getArgs : { [SYSTEM] } Eff (List String)
36time : { [SYSTEM] } Eff Int
39getEnv : String -> { [SYSTEM] } Eff (Maybe String)
40getEnv s = call $ GetEnv s
42system : String -> { [SYSTEM] } Eff Int
43system s = call $ CSystem s
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list