diff options
| author | Camil Staps | 2016-02-02 19:24:50 +0100 |
|---|---|---|
| committer | Camil Staps | 2016-02-02 19:24:50 +0100 |
| commit | a7d7542dc646a5fd124ef71e71ce260889f1701b (patch) | |
| tree | 04ed89503bbb3cc9933273a1326a53ca724c3492 /files/practicum/StdIOMonad.dcl | |
| parent | week6 camil: working positioning of lines by putting empties at left and righ... (diff) | |
Diffstat (limited to 'files/practicum/StdIOMonad.dcl')
| -rw-r--r-- | files/practicum/StdIOMonad.dcl | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/files/practicum/StdIOMonad.dcl b/files/practicum/StdIOMonad.dcl deleted file mode 100644 index a37a979..0000000 --- a/files/practicum/StdIOMonad.dcl +++ /dev/null @@ -1,39 +0,0 @@ -definition module StdIOMonad
-
-// Deze module verpakt een aantal StdFile functies in een monadische jas
-
-import StdMonad, StdMaybeMonad
-
-:: IO a
-:: Void = Void
-:: Filemode = Lees | Schrijf
-:: Filenaam :== String
-:: Filehandle
-
-// voer monadische I/O actie uit op de wereld:
-doIO :: (IO a) *World -> (a,*World)
-
-// IO is een monad:
-instance return IO
-instance >>= IO
-
-// lees regel van de console:
-read :: IO String
-
-// schrijf regel naar de console:
-write :: String -> IO Void
-
-// open de file met gegeven filenaam en mode:
-open :: Filenaam Filemode -> IO (Maybe Filehandle)
-
-// sluit de file met gegeven filenaam:
-close :: Filehandle -> IO Bool
-
-// bepaal of het lezen van de file klaar is:
-eof :: Filehandle -> IO Bool
-
-// lees een regel van een file:
-readline :: Filehandle -> IO (Maybe String)
-
-// schrijf een regel naar een file:
-writeline :: String Filehandle -> IO Bool
|
