Module
Type.RowList.Limits.ExactCount
- Package
- purescript-typelevel-rowlist-limits
- Repository
- mwalkerwells/purescript-typelevel-rowlist-limits
#ExactCount Source
class ExactCount (count :: Int) (rl :: RowList) | count -> rl
Instances
ExactCount (Pos Z) Nil
ExactCount (Pos (Succ Z)) (Cons l1 t1 Nil)
ExactCount (Pos (Succ (Succ Z))) (Cons l1 t1 (Cons l2 t2 Nil))
ExactCount (Pos (Succ (Succ (Succ Z)))) (Cons l1 t1 (Cons l2 t2 (Cons l3 t3 Nil)))
ExactCount (Pos (Succ (Succ (Succ (Succ Z))))) (Cons l1 t1 (Cons l2 t2 (Cons l3 t3 (Cons l4 t4 Nil))))
ExactCount (Pos (Succ (Succ (Succ (Succ (Succ Z)))))) (Cons l1 t1 (Cons l2 t2 (Cons l3 t3 (Cons l4 t4 (Cons l5 t5 Nil)))))
ExactCount (Pos (Succ (Succ (Succ (Succ (Succ (Succ Z))))))) (Cons l1 t1 (Cons l2 t2 (Cons l3 t3 (Cons l4 t4 (Cons l5 t5 (Cons l6 t6 Nil))))))
ExactCount (Pos (Succ (Succ (Succ (Succ (Succ (Succ (Succ Z)))))))) (Cons l1 t1 (Cons l2 t2 (Cons l3 t3 (Cons l4 t4 (Cons l5 t5 (Cons l6 t6 (Cons l7 t7 Nil)))))))
ExactCount (Pos (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ Z))))))))) (Cons l1 t1 (Cons l2 t2 (Cons l3 t3 (Cons l4 t4 (Cons l5 t5 (Cons l6 t6 (Cons l7 t7 (Cons l8 t8 Nil))))))))
ExactCount (Pos (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ Z)))))))))) (Cons l1 t1 (Cons l2 t2 (Cons l3 t3 (Cons l4 t4 (Cons l5 t5 (Cons l6 t6 (Cons l7 t7 (Cons l8 t8 (Cons l9 t9 Nil)))))))))
ExactCount (Pos (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ Z))))))))))) (Cons l1 t1 (Cons l2 t2 (Cons l3 t3 (Cons l4 t4 (Cons l5 t5 (Cons l6 t6 (Cons l7 t7 (Cons l8 t8 (Cons l9 t9 (Cons l10 t10 Nil))))))))))
#ExactCountOne Source
class (ExactCount (Pos (Succ Z)) rl) <= ExactCountOne (rl :: RowList)
Instances
ExactCountOne (Cons l1 t1 Nil)
#ExactCountTwo Source
class (ExactCount (Pos (Succ (Succ Z))) rl) <= ExactCountTwo (rl :: RowList)
Instances
ExactCountTwo (Cons l1 t1 (Cons l2 t2 Nil))
#ExactCountThree Source
class (ExactCount (Pos (Succ (Succ (Succ Z)))) rl) <= ExactCountThree (rl :: RowList)
Instances
ExactCountThree (Cons l1 t1 (Cons l2 t2 (Cons l3 t3 Nil)))
#ExactCountFour Source
class (ExactCount (Pos (Succ (Succ (Succ (Succ Z))))) rl) <= ExactCountFour (rl :: RowList)
Instances
Re-exports from Prim.RowList
#Cons
#RowToList
Re-exports from Type.Data.Peano
#Succ Source
data Succ :: Nat -> Nat
Represents Successor of a Nat: (Succ a) ^= 1 + a
Instances
(IsNat a) => IsNat (Succ a)
(SumNat a b c) => SumNat (Succ a) b (Succ c)
ProductNat (Succ Z) a a
1 * a = a
(ProductNat a b ab, SumNat ab b result) => ProductNat (Succ a) b result
(1 + a) * b = b + a * b
ExponentiationNat a Z (Succ Z)
(ExponentiationNat a b ab, ProductNat ab a result) => ExponentiationNat a (Succ b) result
(CompareNat a b ord) => CompareNat (Succ a) (Succ b) ord
IsZeroNat (Succ a) False
#Pos Source
data Pos :: Nat -> Int
Represents a posivite number
Pos (Succ Z) ^= + 1
Instances
(IsNat n) => IsInt (Pos n)
(SumInt (Pos a) (Pos b) (Pos c')) => SumInt (Pos (Succ a)) (Pos b) (Pos (Succ c'))
(SumInt (Pos a) (Neg b) c) => SumInt (Pos (Succ a)) (Neg (Succ b)) c
(SumInt (Neg a) (Pos b) c) => SumInt (Neg (Succ a)) (Pos (Succ b)) c
SumInt (Pos Z) (Pos b) (Pos b)
SumInt (Neg (Succ a)) (Pos Z) (Neg (Succ a))
SumInt (Pos Z) (Neg (Succ b)) (Neg (Succ b))
SumInt (Pos a) (Neg Z) (Pos a)
SumInt (Neg Z) (Pos a) (Pos a)
Inverse (Pos Z) (Pos Z)
Inverse (Pos a) (Neg a)
Inverse (Neg Z) (Pos Z)
Inverse (Neg a) (Pos a)
(ProductInt (Pos a) (Pos b) (Pos c)) => ProductInt (Neg a) (Pos b) (Neg c)
(ProductInt (Pos a) (Pos b) (Pos c)) => ProductInt (Neg a) (Neg b) (Pos c)
ProductInt (Pos Z) a (Pos Z)
ProductInt (Pos (Succ Z)) a a
(ProductInt (Pos a) (Pos b) (Pos c)) => ProductInt (Pos a) (Neg b) (Neg c)
(ProductInt (Pos a) b ab, SumInt ab b result) => ProductInt (Pos (Succ a)) b result
(IsZeroNat a isZero) => IsZeroInt (Pos a) isZero
0 * a = 0