aboutsummaryrefslogtreecommitdiff
path: root/Inotify.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'Inotify.dcl')
-rw-r--r--Inotify.dcl13
1 files changed, 8 insertions, 5 deletions
diff --git a/Inotify.dcl b/Inotify.dcl
index e6893e2..611e616 100644
--- a/Inotify.dcl
+++ b/Inotify.dcl
@@ -8,11 +8,14 @@ from Data.Either import ::Either
from Data.Maybe import ::Maybe
/**
- * An inotify file descriptor
- *
- * @var A state that is used for callbacks
+ * An inotify file descriptor.
+ * @var A state that can be used for application-specific information.
*/
-:: *Inotify st
+:: *Inotify st =
+ { fd :: !Int
+ , watches :: ![(INWatch, INCallback st)]
+ , state :: !st
+ }
//* An inotify watch descriptor
:: INWatch
@@ -28,7 +31,7 @@ from Data.Maybe import ::Maybe
*
* @var A state that is passed on.
*/
-:: INCallback st :== INEvent (Maybe String) st *World -> *(st, *World)
+:: INCallback st :== INEvent (Maybe String) *(Inotify st) -> *(*World -> *(*Inotify st, *World))
//* Bitwise OR for event masks
(|-) infixl 6 :: (INMask INMask -> INMask)