{-# 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
/= :: TimeoutKey -> TimeoutKey -> Bool
$c/= :: TimeoutKey -> TimeoutKey -> Bool
== :: TimeoutKey -> TimeoutKey -> Bool
$c== :: 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
min :: TimeoutKey -> TimeoutKey -> TimeoutKey
$cmin :: TimeoutKey -> TimeoutKey -> TimeoutKey
max :: TimeoutKey -> TimeoutKey -> TimeoutKey
$cmax :: TimeoutKey -> TimeoutKey -> TimeoutKey
>= :: TimeoutKey -> TimeoutKey -> Bool
$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
compare :: TimeoutKey -> TimeoutKey -> Ordering
$ccompare :: TimeoutKey -> TimeoutKey -> Ordering
Ord)