-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Type level numbers, vectors, list. This lib needs to be extended. -- -- Type level programming library @package typical @version 0.0.1 module Data.Typical.Misc data HEQ HEQ :: HEQ data HLT HLT :: HLT data HGT HGT :: HGT class HCompare a b c | a b -> c hCompare :: HCompare a b c => a -> b -> c module Data.Typical data (:#:) a b (:#:) :: a -> b -> :#: a b data HNil HNil :: HNil class HHead a h | a -> h hHead :: HHead a h => a -> h class HTail a t | a -> t hTail :: HTail a t => a -> t class HSplitAt a n h t | a n -> h t hSplitAt :: HSplitAt a n h t => a -> n -> (h, t) class HMergeBy f a b c | f a b -> c hMergeBy :: HMergeBy f a b c => f -> a -> b -> c class HApply f parameter result | f parameter -> result hApply :: HApply f parameter result => f -> parameter -> result data B0 B0 :: B0 data B1 B1 :: B1 class HNat a type N1 = HNil type N2 = B0 :#: HNil type N3 = B1 :#: HNil type N4 = B0 :#: N2 n1 :: N1 n2 :: N2 n3 :: N3 n4 :: N4 class HAdd n1 n2 r | n1 n2 -> r hAdd :: HAdd n1 n2 r => n1 -> n2 -> r class HSub n1 n2 r | n1 n2 -> r hSub :: HSub n1 n2 r => n1 -> n2 -> r class HMul a b c | a b -> c hMul :: HMul a b c => a -> b -> c class HMulSub a b c | a b -> c hMulSub :: HMulSub a b c => a -> b -> c class CalcRes a b c | a b -> c calcRes :: CalcRes a b c => a -> b -> c class HOrd cmp a b h a' b' | cmp a b -> h a' b' hOrd :: HOrd cmp a b h a' b' => cmp -> a -> b -> (h, a', b') class HDiv2 a b | a -> b hDiv2 :: HDiv2 a b => a -> b data HCmpHNat HCmpHNat :: HCmpHNat x :: N2 :#: (N2 :#: (N3 :#: (N4 :#: HNil))) instance HCompare a b cmp => HApply HCmpHNat (a, b) cmp instance HDiv2 (a :#: b) b instance HDiv2 HNil HNil instance HOrd HEQ (ha :#: ta) (hb :#: tb) ha ta (hb :#: tb) instance HOrd HGT (ha :#: ta) (hb :#: tb) hb (ha :#: ta) tb instance HOrd HLT (ha :#: ta) (hb :#: tb) ha ta (hb :#: tb) instance CalcRes HEQ HEQ HEQ instance CalcRes HGT HEQ HGT instance CalcRes HLT HEQ HLT instance CalcRes a HGT HGT instance CalcRes a HLT HLT instance (HCompare a c res1, HCompare b d res2, CalcRes res1 res2 res) => HCompare (a :#: b) (c :#: d) res instance HCompare (a :#: b) HNil HGT instance HCompare HNil (c :#: d) HLT instance HCompare HNil HNil HEQ instance HCompare B1 B1 HEQ instance HCompare B1 B0 HGT instance HCompare B0 B1 HLT instance HCompare B0 B0 HEQ instance HMulSub b (B0 :#: c) r => HMulSub (B1 :#: b) c (c :#: r) instance HMulSub b (B0 :#: c) r => HMulSub (B0 :#: b) c r instance HMulSub HNil a (a :#: HNil) instance HSub a b c => HSub (B1 :#: a) (B1 :#: b) (B0 :#: c) instance (HAdd b N1 b', HSub a b' c) => HSub (B0 :#: a) (B1 :#: b) (B1 :#: c) instance HSub (a :#: b) c d => HSub (B1 :#: (a :#: b)) (B0 :#: c) (B1 :#: d) instance HSub a b c => HSub (B0 :#: a) (B0 :#: b) (B0 :#: c) instance HSub (b :#: c) HNil d => HSub (B0 :#: (b :#: c)) HNil (B1 :#: d) instance HSub (B1 :#: HNil) (B0 :#: HNil) HNil instance HSub (B0 :#: HNil) HNil HNil instance HSub (B1 :#: b) HNil (B0 :#: b) instance (HAdd a b c, HAdd HNil c c') => HAdd (B1 :#: a) (B1 :#: b) (B0 :#: c') instance HAdd a b c => HAdd (B1 :#: a) (B0 :#: b) (B1 :#: c) instance HAdd a b c => HAdd (B0 :#: a) (B1 :#: b) (B1 :#: c) instance HAdd a b c => HAdd (B0 :#: a) (B0 :#: b) (B0 :#: c) instance HAdd HNil a a' => HAdd (B1 :#: a) HNil (B0 :#: a') instance HAdd HNil b b' => HAdd HNil (B1 :#: b) (B0 :#: b') instance HAdd (B0 :#: a) HNil (B1 :#: a) instance HAdd HNil (B0 :#: b) (B1 :#: b) instance HAdd HNil HNil (B0 :#: HNil) instance HNat a => HNat (B0 :#: a) instance HNat a => HNat (B1 :#: a) instance HNat (B1 :#: HNil) instance (HApply f (a, c) cmp, HOrd cmp (a :#: b) (c :#: d) h a' b', HMergeBy f a' b' e) => HMergeBy f (a :#: b) (c :#: d) (h :#: e) instance HMergeBy f (a :#: b) HNil (a :#: b) instance HMergeBy f HNil (a :#: b) (a :#: b) instance HMergeBy f HNil HNil HNil instance (HSub (d :#: d') HNil predD, HSplitAt b predD a' b') => HSplitAt (a :#: b) (d :#: d') (a :#: a') b' instance HSplitAt (a :#: b) HNil (a :#: HNil) b instance HSplitAt HNil n HNil HNil instance HTail (a :#: b) b instance HHead (a :#: b) a