module Agda.Termination.CutOff
( CutOff(CutOff, DontCutOff)
, defaultCutOff
) where
import Control.DeepSeq
data CutOff
= CutOff !Int
| DontCutOff
deriving (CutOff -> CutOff -> Bool
(CutOff -> CutOff -> Bool)
-> (CutOff -> CutOff -> Bool) -> Eq CutOff
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CutOff -> CutOff -> Bool
== :: CutOff -> CutOff -> Bool
$c/= :: CutOff -> CutOff -> Bool
/= :: CutOff -> CutOff -> Bool
Eq , Eq CutOff
Eq CutOff
-> (CutOff -> CutOff -> Ordering)
-> (CutOff -> CutOff -> Bool)
-> (CutOff -> CutOff -> Bool)
-> (CutOff -> CutOff -> Bool)
-> (CutOff -> CutOff -> Bool)
-> (CutOff -> CutOff -> CutOff)
-> (CutOff -> CutOff -> CutOff)
-> Ord CutOff
CutOff -> CutOff -> Bool
CutOff -> CutOff -> Ordering
CutOff -> CutOff -> CutOff
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 :: CutOff -> CutOff -> Ordering
compare :: CutOff -> CutOff -> Ordering
$c< :: CutOff -> CutOff -> Bool
< :: CutOff -> CutOff -> Bool
$c<= :: CutOff -> CutOff -> Bool
<= :: CutOff -> CutOff -> Bool
$c> :: CutOff -> CutOff -> Bool
> :: CutOff -> CutOff -> Bool
$c>= :: CutOff -> CutOff -> Bool
>= :: CutOff -> CutOff -> Bool
$cmax :: CutOff -> CutOff -> CutOff
max :: CutOff -> CutOff -> CutOff
$cmin :: CutOff -> CutOff -> CutOff
min :: CutOff -> CutOff -> CutOff
Ord)
instance Show CutOff where
show :: CutOff -> String
show (CutOff Int
k) = Int -> String
forall a. Show a => a -> String
show Int
k
show CutOff
DontCutOff = String
"∞"
instance NFData CutOff where
rnf :: CutOff -> ()
rnf (CutOff Int
_) = ()
rnf CutOff
DontCutOff = ()
defaultCutOff :: CutOff
defaultCutOff :: CutOff
defaultCutOff = Int -> CutOff
CutOff Int
0