7This appendix gives interfaces for the core effects provided by the
15 module Effect.Exception
19 import Control.IOExcept
21 EXCEPTION : Type -> EFFECT
23 raise : a -> Eff b [EXCEPTION a]
25 Handler (Exception a) Maybe where { ... }
26 Handler (Exception a) List where { ... }
27 Handler (Exception a) (Either a) where { ... }
28 Handler (Exception a) (IOExcept a) where { ... }
29 Show a => Handler (Exception a) IO where { ... }
39 import Control.IOExcept
41 FILE_IO : Type -> EFFECT
43 data OpenFile : Mode -> Type
45 open : (fname : String)
47 -> Eff Bool [FILE_IO ()]
48 (\res => [FILE_IO (case res of
51 close : Eff () [FILE_IO (OpenFile m)] [FILE_IO ()]
53 readLine : Eff String [FILE_IO (OpenFile Read)]
54 writeLine : String -> Eff () [FILE_IO (OpenFile Write)]
55 eof : Eff Bool [FILE_IO (OpenFile Read)]
57 Handler FileIO IO where { ... }
72 srand : Integer -> Eff m () [RND]
73 rndInt : Integer -> Integer -> Eff m Integer [RND]
74 rndFin : (k : Nat) -> Eff m (Fin (S k)) [RND]
76 Handler Random m where { ... }
89 select : List a -> Eff m a [SELECT]
91 Handler Selection Maybe where { ... }
92 Handler Selection List where { ... }
103 STATE : Type -> EFFECT
105 get : Eff m x [STATE x]
106 put : x -> Eff m () [STATE x]
107 putM : y -> Eff m () [STATE x] [STATE y]
108 update : (x -> x) -> Eff m () [STATE x]
110 Handler State m where { ... }
120 import Control.IOExcept
124 putChar : Handler StdIO m => Char -> Eff m () [STDIO]
125 putStr : Handler StdIO m => String -> Eff m () [STDIO]
126 putStrLn : Handler StdIO m => String -> Eff m () [STDIO]
128 getStr : Handler StdIO m => Eff m String [STDIO]
129 getChar : Handler StdIO m => Eff m Char [STDIO]
131 Handler StdIO IO where { ... }
132 Handler StdIO (IOExcept a) where { ... }
143 import Control.IOExcept
147 getArgs : Handler System e => Eff e (List String) [SYSTEM]
148 time : Handler System e => Eff e Int [SYSTEM]
149 getEnv : Handler System e => String -> Eff e (Maybe String) [SYSTEM]
151 Handler System IO where { ... }
152 Handler System (IOExcept a) where { ... }
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