{-# LANGUAGE NoImplicitPrelude #-}
module GHC.Event.TimeOut where
import GHC.IO
import GHC.Base
import qualified GHC.Event.PSQ as Q
import GHC.Event.Unique (Unique)
type TimeoutQueue = Q.PSQ TimeoutCallback
type TimeoutCallback = IO ()
type TimeoutEdit = TimeoutQueue -> TimeoutQueue
newtype TimeoutKey = TK Unique
deriving (TimeoutKey -> TimeoutKey -> Bool
(TimeoutKey -> TimeoutKey -> Bool)
-> (TimeoutKey -> TimeoutKey -> Bool) -> Eq TimeoutKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimeoutKey -> TimeoutKey -> Bool
== :: TimeoutKey -> TimeoutKey -> Bool
$c/= :: TimeoutKey -> TimeoutKey -> Bool
/= :: TimeoutKey -> TimeoutKey -> Bool
Eq, Eq TimeoutKey
Eq TimeoutKey
-> (TimeoutKey -> TimeoutKey -> Ordering)
-> (TimeoutKey -> TimeoutKey -> Bool)
-> (TimeoutKey -> TimeoutKey -> Bool)
-> (TimeoutKey -> TimeoutKey -> Bool)
-> (TimeoutKey -> TimeoutKey -> Bool)
-> (TimeoutKey -> TimeoutKey -> TimeoutKey)
-> (TimeoutKey -> TimeoutKey -> TimeoutKey)
-> Ord TimeoutKey
TimeoutKey -> TimeoutKey -> Bool
TimeoutKey -> TimeoutKey -> Ordering
TimeoutKey -> TimeoutKey -> TimeoutKey
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: TimeoutKey -> TimeoutKey -> Ordering
compare :: TimeoutKey -> TimeoutKey -> Ordering
$c< :: TimeoutKey -> TimeoutKey -> Bool
< :: TimeoutKey -> TimeoutKey -> Bool
$c<= :: TimeoutKey -> TimeoutKey -> Bool
<= :: TimeoutKey -> TimeoutKey -> Bool
$c> :: TimeoutKey -> TimeoutKey -> Bool
> :: TimeoutKey -> TimeoutKey -> Bool
$c>= :: TimeoutKey -> TimeoutKey -> Bool
>= :: TimeoutKey -> TimeoutKey -> Bool
$cmax :: TimeoutKey -> TimeoutKey -> TimeoutKey
max :: TimeoutKey -> TimeoutKey -> TimeoutKey
$cmin :: TimeoutKey -> TimeoutKey -> TimeoutKey
min :: TimeoutKey -> TimeoutKey -> TimeoutKey
Ord)