diff options
author | Camil Staps | 2020-01-06 16:19:12 +0100 |
---|---|---|
committer | Camil Staps | 2020-01-06 16:19:12 +0100 |
commit | 940a3f261ea88094dd195ee159673f6abab54bc2 (patch) | |
tree | 0e8a15b0af41f90fddbb339d63961bd97d00dcfc /test.icl | |
parent | Fix bug in fetching mask in inotify_check (diff) |
Cleanup example
Diffstat (limited to 'test.icl')
-rw-r--r-- | test.icl | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -5,8 +5,6 @@ import Data.Either import Data.Maybe import Inotify -:: Void = Void - /** * test: Example usage of Inotify * @@ -17,7 +15,7 @@ import Inotify */ Start w -# (Just inot) = inotify_init Void +# (Just inot) = inotify_init () # (Right watch, inot) = inotify_add_watch (echo "file1") IN_ALL_EVENTS "file1" inot # (Right watch, inot) @@ -28,12 +26,12 @@ Start w # (inot, w) = inotify_loop_with_timeout (Just 10000) inot w = inotify_close inot where - echo :: String INEvent (Maybe String) Void *World -> *(Void, *World) + echo :: String INEvent (Maybe String) () *World -> *((), *World) echo fname ev f _ w # (io,w) = stdio w # io = io <<< "EVENT: ["<<< fname <<<"; "<<< ev <<<"; "<<< f <<<"]\n" # (ok,w) = fclose io w - = (Void, w) + = ((), w) instance <<< (Maybe a) | <<< a where |