0 | module Data.Refined.Int8
2 | import Control.Relation.ReflexiveClosure
3 | import Control.Relation
4 | import public Data.Prim.Int8
5 | import public Data.Refined.Core
9 | public export %inline
10 | {x : Int8} -> HDec0 Int8 (< x) where
13 | public export %inline
14 | {x : Int8} -> HDec0 Int8 (x <) where
17 | public export %inline
18 | {x : Int8} -> HDec0 Int8 (<= x) where
21 | public export %inline
22 | {x : Int8} -> HDec0 Int8 (x <=) where
35 | 0 LessThan : Int8 -> Int8 -> Type
36 | LessThan m n = n < m
40 | 0 To : Int8 -> Int8 -> Type
41 | To m n = ReflexiveClosure (<) n m
49 | 0 GreaterThan : Int8 -> Int8 -> Type
54 | 0 From : Int8 -> Int8 -> Type
55 | From = ReflexiveClosure (<)
59 | 0 FromTo : Int8 -> Int8 -> Int8 -> Type
60 | FromTo m n = From m && To n
64 | 0 Between : Int8 -> Int8 -> Int8 -> Type
65 | Between m n = GreaterThan m && LessThan n
74 | -> {auto 0 p1 : m2 <= m}
75 | -> {auto 0 p2 : n <= n2}
77 | widen (And y z) = And (transitive p1 y) (transitive z p2)
82 | -> {auto 0 p1 : m2 <= m}
83 | -> {auto 0 p2 : n <= n2}
85 | widen' (And y z) = And (strictRight p1 y) (strictLeft z p2)