Copyright | (c) Dennis Gosnell 2018 |
---|---|
License | BSD3 |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
This is a small library of dependent types. It provides indexed types like
Fin
, Vec
, and Matrix
.
This is mainly used in Termonad for Termonad.Config.Colour to represent length-indexed colour lists.
This module implements a subset of the functionality from the abandoned type-combinators library. Ideally this module would be split out to a separate package. If you're interested in working on something like this, please see this issue on Github.
Synopsis
- data Peano
- type ZSym0 = Z
- type SSym1 (t :: Peano) = S t
- data SSym0 (l :: TyFun Peano Peano) = SameKind (Apply SSym0 arg) (SSym1 arg) => SSym0KindInference
- type family N0 :: Peano where ...
- type N0Sym0 = N0
- type family N1 :: Peano where ...
- type N1Sym0 = N1
- type family N2 :: Peano where ...
- type N2Sym0 = N2
- type family N3 :: Peano where ...
- type N3Sym0 = N3
- type family N4 :: Peano where ...
- type N4Sym0 = N4
- type family N5 :: Peano where ...
- type N5Sym0 = N5
- type family N6 :: Peano where ...
- type N6Sym0 = N6
- type family N7 :: Peano where ...
- type N7Sym0 = N7
- type family N8 :: Peano where ...
- type N8Sym0 = N8
- type family N9 :: Peano where ...
- type N9Sym0 = N9
- type family N10 :: Peano where ...
- type N10Sym0 = N10
- type family SubtractPeano (a :: Peano) (a :: Peano) :: Peano where ...
- data SubtractPeanoSym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) = SameKind (Apply SubtractPeanoSym0 arg) (SubtractPeanoSym1 arg) => SubtractPeanoSym0KindInference
- data SubtractPeanoSym1 (l :: Peano) (l :: TyFun Peano Peano) = SameKind (Apply (SubtractPeanoSym1 l) arg) (SubtractPeanoSym2 l arg) => SubtractPeanoSym1KindInference
- type SubtractPeanoSym2 (t :: Peano) (t :: Peano) = SubtractPeano t t
- type family AddPeano (a :: Peano) (a :: Peano) :: Peano where ...
- data AddPeanoSym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) = SameKind (Apply AddPeanoSym0 arg) (AddPeanoSym1 arg) => AddPeanoSym0KindInference
- data AddPeanoSym1 (l :: Peano) (l :: TyFun Peano Peano) = SameKind (Apply (AddPeanoSym1 l) arg) (AddPeanoSym2 l arg) => AddPeanoSym1KindInference
- type AddPeanoSym2 (t :: Peano) (t :: Peano) = AddPeano t t
- type family MultPeano (a :: Peano) (a :: Peano) :: Peano where ...
- data MultPeanoSym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) = SameKind (Apply MultPeanoSym0 arg) (MultPeanoSym1 arg) => MultPeanoSym0KindInference
- data MultPeanoSym1 (l :: Peano) (l :: TyFun Peano Peano) = SameKind (Apply (MultPeanoSym1 l) arg) (MultPeanoSym2 l arg) => MultPeanoSym1KindInference
- type MultPeanoSym2 (t :: Peano) (t :: Peano) = MultPeano t t
- type family N24 :: Peano where ...
- type N24Sym0 = N24
- type family Compare_6989586621679400935 (a :: Peano) (a :: Peano) :: Ordering where ...
- type Compare_6989586621679400935Sym2 (t :: Peano) (t :: Peano) = Compare_6989586621679400935 t t
- data Compare_6989586621679400935Sym1 (l :: Peano) (l :: TyFun Peano Ordering) = SameKind (Apply (Compare_6989586621679400935Sym1 l) arg) (Compare_6989586621679400935Sym2 l arg) => Compare_6989586621679400935Sym1KindInference
- data Compare_6989586621679400935Sym0 (l :: TyFun Peano (TyFun Peano Ordering -> Type)) = SameKind (Apply Compare_6989586621679400935Sym0 arg) (Compare_6989586621679400935Sym1 arg) => Compare_6989586621679400935Sym0KindInference
- type family ShowsPrec_6989586621679401357 (a :: Nat) (a :: Peano) (a :: Symbol) :: Symbol where ...
- type ShowsPrec_6989586621679401357Sym3 (t :: Nat) (t :: Peano) (t :: Symbol) = ShowsPrec_6989586621679401357 t t t
- data ShowsPrec_6989586621679401357Sym2 (l :: Nat) (l :: Peano) (l :: TyFun Symbol Symbol) = SameKind (Apply (ShowsPrec_6989586621679401357Sym2 l l) arg) (ShowsPrec_6989586621679401357Sym3 l l arg) => ShowsPrec_6989586621679401357Sym2KindInference
- data ShowsPrec_6989586621679401357Sym1 (l :: Nat) (l :: TyFun Peano (TyFun Symbol Symbol -> Type)) = SameKind (Apply (ShowsPrec_6989586621679401357Sym1 l) arg) (ShowsPrec_6989586621679401357Sym2 l arg) => ShowsPrec_6989586621679401357Sym1KindInference
- data ShowsPrec_6989586621679401357Sym0 (l :: TyFun Nat (TyFun Peano (TyFun Symbol Symbol -> Type) -> Type)) = SameKind (Apply ShowsPrec_6989586621679401357Sym0 arg) (ShowsPrec_6989586621679401357Sym1 arg) => ShowsPrec_6989586621679401357Sym0KindInference
- type family TFHelper_6989586621679401418 (a :: Peano) (a :: Peano) :: Peano where ...
- type TFHelper_6989586621679401418Sym2 (t :: Peano) (t :: Peano) = TFHelper_6989586621679401418 t t
- data TFHelper_6989586621679401418Sym1 (l :: Peano) (l :: TyFun Peano Peano) = SameKind (Apply (TFHelper_6989586621679401418Sym1 l) arg) (TFHelper_6989586621679401418Sym2 l arg) => TFHelper_6989586621679401418Sym1KindInference
- data TFHelper_6989586621679401418Sym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) = SameKind (Apply TFHelper_6989586621679401418Sym0 arg) (TFHelper_6989586621679401418Sym1 arg) => TFHelper_6989586621679401418Sym0KindInference
- type family TFHelper_6989586621679401444 (a :: Peano) (a :: Peano) :: Peano where ...
- type TFHelper_6989586621679401444Sym2 (t :: Peano) (t :: Peano) = TFHelper_6989586621679401444 t t
- data TFHelper_6989586621679401444Sym1 (l :: Peano) (l :: TyFun Peano Peano) = SameKind (Apply (TFHelper_6989586621679401444Sym1 l) arg) (TFHelper_6989586621679401444Sym2 l arg) => TFHelper_6989586621679401444Sym1KindInference
- data TFHelper_6989586621679401444Sym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) = SameKind (Apply TFHelper_6989586621679401444Sym0 arg) (TFHelper_6989586621679401444Sym1 arg) => TFHelper_6989586621679401444Sym0KindInference
- type family TFHelper_6989586621679401470 (a :: Peano) (a :: Peano) :: Peano where ...
- type TFHelper_6989586621679401470Sym2 (t :: Peano) (t :: Peano) = TFHelper_6989586621679401470 t t
- data TFHelper_6989586621679401470Sym1 (l :: Peano) (l :: TyFun Peano Peano) = SameKind (Apply (TFHelper_6989586621679401470Sym1 l) arg) (TFHelper_6989586621679401470Sym2 l arg) => TFHelper_6989586621679401470Sym1KindInference
- data TFHelper_6989586621679401470Sym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) = SameKind (Apply TFHelper_6989586621679401470Sym0 arg) (TFHelper_6989586621679401470Sym1 arg) => TFHelper_6989586621679401470Sym0KindInference
- type family Abs_6989586621679401487 (a :: Peano) :: Peano where ...
- type Abs_6989586621679401487Sym1 (t :: Peano) = Abs_6989586621679401487 t
- data Abs_6989586621679401487Sym0 (l :: TyFun Peano Peano) = SameKind (Apply Abs_6989586621679401487Sym0 arg) (Abs_6989586621679401487Sym1 arg) => Abs_6989586621679401487Sym0KindInference
- type family Signum_6989586621679401497 (a :: Peano) :: Peano where ...
- type Signum_6989586621679401497Sym1 (t :: Peano) = Signum_6989586621679401497 t
- data Signum_6989586621679401497Sym0 (l :: TyFun Peano Peano) = SameKind (Apply Signum_6989586621679401497Sym0 arg) (Signum_6989586621679401497Sym1 arg) => Signum_6989586621679401497Sym0KindInference
- type family Let6989586621679401507Scrutinee_6989586621679389242 n where ...
- type Let6989586621679401507Scrutinee_6989586621679389242Sym1 t = Let6989586621679401507Scrutinee_6989586621679389242 t
- data Let6989586621679401507Scrutinee_6989586621679389242Sym0 l = SameKind (Apply Let6989586621679401507Scrutinee_6989586621679389242Sym0 arg) (Let6989586621679401507Scrutinee_6989586621679389242Sym1 arg) => Let6989586621679401507Scrutinee_6989586621679389242Sym0KindInference
- type family Let6989586621679401513Scrutinee_6989586621679389244 n where ...
- type Let6989586621679401513Scrutinee_6989586621679389244Sym1 t = Let6989586621679401513Scrutinee_6989586621679389244 t
- data Let6989586621679401513Scrutinee_6989586621679389244Sym0 l = SameKind (Apply Let6989586621679401513Scrutinee_6989586621679389244Sym0 arg) (Let6989586621679401513Scrutinee_6989586621679389244Sym1 arg) => Let6989586621679401513Scrutinee_6989586621679389244Sym0KindInference
- type family Case_6989586621679401517 n t where ...
- type family Case_6989586621679401511 n t where ...
- type family FromInteger_6989586621679401522 (a :: Nat) :: Peano where ...
- type FromInteger_6989586621679401522Sym1 (t :: Nat) = FromInteger_6989586621679401522 t
- data FromInteger_6989586621679401522Sym0 (l :: TyFun Nat Peano) = SameKind (Apply FromInteger_6989586621679401522Sym0 arg) (FromInteger_6989586621679401522Sym1 arg) => FromInteger_6989586621679401522Sym0KindInference
- type family Equals_6989586621679401527 (a :: Peano) (b :: Peano) :: Bool where ...
- type SPeano = (Sing :: Peano -> Type)
- sN24 :: Sing (N24Sym0 :: Peano)
- sMultPeano :: forall (t :: Peano) (t :: Peano). Sing t -> Sing t -> Sing (Apply (Apply MultPeanoSym0 t) t :: Peano)
- sAddPeano :: forall (t :: Peano) (t :: Peano). Sing t -> Sing t -> Sing (Apply (Apply AddPeanoSym0 t) t :: Peano)
- sSubtractPeano :: forall (t :: Peano) (t :: Peano). Sing t -> Sing t -> Sing (Apply (Apply SubtractPeanoSym0 t) t :: Peano)
- sN10 :: Sing (N10Sym0 :: Peano)
- sN9 :: Sing (N9Sym0 :: Peano)
- sN8 :: Sing (N8Sym0 :: Peano)
- sN7 :: Sing (N7Sym0 :: Peano)
- sN6 :: Sing (N6Sym0 :: Peano)
- sN5 :: Sing (N5Sym0 :: Peano)
- sN4 :: Sing (N4Sym0 :: Peano)
- sN3 :: Sing (N3Sym0 :: Peano)
- sN2 :: Sing (N2Sym0 :: Peano)
- sN1 :: Sing (N1Sym0 :: Peano)
- sN0 :: Sing (N0Sym0 :: Peano)
- n24 :: Peano
- n10 :: Peano
- n9 :: Peano
- n8 :: Peano
- n7 :: Peano
- n6 :: Peano
- n5 :: Peano
- n4 :: Peano
- n3 :: Peano
- n2 :: Peano
- n1 :: Peano
- n0 :: Peano
- multPeano :: Peano -> Peano -> Peano
- subtractPeano :: Peano -> Peano -> Peano
- addPeano :: Peano -> Peano -> Peano
- data Fin :: Peano -> Type where
- toIntFin :: Fin n -> Int
- data IFin :: Peano -> Peano -> Type where
- toFinIFin :: IFin n m -> Fin n
- toIntIFin :: IFin n m -> Int
- data HList :: (k -> Type) -> [k] -> Type where
- pattern ConsHList :: (f a :: Type) -> HList f as -> HList f (a ': as)
- data Vec (n :: Peano) :: Type -> Type where
- pattern ConsVec :: (a :: Type) -> Vec n a -> Vec (S n) a
- genVec_ :: SingI n => (Fin n -> a) -> Vec n a
- genVec :: SPeano n -> (Fin n -> a) -> Vec n a
- indexVec :: Fin n -> Vec n a -> a
- singletonVec :: a -> Vec N1 a
- replaceVec :: Sing n -> a -> Vec n a
- imapVec :: forall n a b. (Fin n -> a -> b) -> Vec n a -> Vec n b
- replaceVec_ :: SingI n => a -> Vec n a
- apVec :: (a -> b -> c) -> Vec n a -> Vec n b -> Vec n c
- onHeadVec :: (a -> a) -> Vec (S n) a -> Vec (S n) a
- dropVec :: Sing m -> Vec (m + n) a -> Vec n a
- takeVec :: IFin n m -> Vec n a -> Vec m a
- updateAtVec :: Fin n -> (a -> a) -> Vec n a -> Vec n a
- setAtVec :: Fin n -> a -> Vec n a -> Vec n a
- type family MatrixTF (ns :: [Peano]) (a :: Type) :: Type where ...
- newtype Matrix ns a = Matrix {}
- type MatrixTFSym2 (ns :: [Peano]) (t :: Type) = (MatrixTF ns t :: Type)
- data MatrixTFSym1 (ns :: [Peano]) (z :: TyFun Type Type) = SameKind (Apply (MatrixTFSym1 ns) arg) (MatrixTFSym2 ns arg) => MatrixTFSym1KindInference
- data MatrixTFSym0 (l :: TyFun [Peano] (Type ~> Type)) = SameKind (Apply MatrixTFSym0 arg) (MatrixTFSym1 arg) => MatrixTFSym0KindInference
- eqSingMatrix :: forall (peanos :: [Peano]) (a :: Type). Eq a => Sing peanos -> Matrix peanos a -> Matrix peanos a -> Bool
- ordSingMatrix :: forall (peanos :: [Peano]) (a :: Type). Ord a => Sing peanos -> Matrix peanos a -> Matrix peanos a -> Ordering
- compareSingMatrix :: forall (peanos :: [Peano]) (a :: Type) (c :: Type). (a -> a -> c) -> c -> (c -> c -> c) -> Sing peanos -> Matrix peanos a -> Matrix peanos a -> c
- fmapSingMatrix :: forall (peanos :: [Peano]) (a :: Type) (b :: Type). Sing peanos -> (a -> b) -> Matrix peanos a -> Matrix peanos b
- consMatrix :: Matrix ns a -> Matrix (n ': ns) a -> Matrix (S n ': ns) a
- toListMatrix :: forall (peanos :: [Peano]) (a :: Type). Sing peanos -> Matrix peanos a -> [a]
- genMatrix :: forall (ns :: [Peano]) (a :: Type). Sing ns -> (HList Fin ns -> a) -> Matrix ns a
- genMatrix_ :: SingI ns => (HList Fin ns -> a) -> Matrix ns a
- indexMatrix :: HList Fin ns -> Matrix ns a -> a
- imapMatrix :: forall (ns :: [Peano]) a b. Sing ns -> (HList Fin ns -> a -> b) -> Matrix ns a -> Matrix ns b
- imapMatrix_ :: SingI ns => (HList Fin ns -> a -> b) -> Matrix ns a -> Matrix ns b
- onMatrixTF :: (MatrixTF ns a -> MatrixTF ms b) -> Matrix ns a -> Matrix ms b
- onMatrix :: (Matrix ns a -> Matrix ms b) -> MatrixTF ns a -> MatrixTF ms b
- updateAtMatrix :: HList Fin ns -> (a -> a) -> Matrix ns a -> Matrix ns a
- setAtMatrix :: HList Fin ns -> a -> Matrix ns a -> Matrix ns a
Documentation
Instances
data SSym0 (l :: TyFun Peano Peano) Source #
SameKind (Apply SSym0 arg) (SSym1 arg) => SSym0KindInference |
Instances
SuppressUnusedWarnings SSym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply SSym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
type family SubtractPeano (a :: Peano) (a :: Peano) :: Peano where ... Source #
SubtractPeano Z _ = ZSym0 | |
SubtractPeano a Z = a | |
SubtractPeano (S a) (S b) = Apply (Apply SubtractPeanoSym0 a) b |
data SubtractPeanoSym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) Source #
Instances
SuppressUnusedWarnings SubtractPeanoSym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply SubtractPeanoSym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
data SubtractPeanoSym1 (l :: Peano) (l :: TyFun Peano Peano) Source #
SameKind (Apply (SubtractPeanoSym1 l) arg) (SubtractPeanoSym2 l arg) => SubtractPeanoSym1KindInference |
Instances
SuppressUnusedWarnings SubtractPeanoSym1 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (SubtractPeanoSym1 l1 :: TyFun Peano Peano -> *) (l2 :: Peano) Source # | |
Defined in Termonad.Config.Vec |
type SubtractPeanoSym2 (t :: Peano) (t :: Peano) = SubtractPeano t t Source #
data AddPeanoSym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) Source #
SameKind (Apply AddPeanoSym0 arg) (AddPeanoSym1 arg) => AddPeanoSym0KindInference |
Instances
SuppressUnusedWarnings AddPeanoSym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply AddPeanoSym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
data AddPeanoSym1 (l :: Peano) (l :: TyFun Peano Peano) Source #
SameKind (Apply (AddPeanoSym1 l) arg) (AddPeanoSym2 l arg) => AddPeanoSym1KindInference |
Instances
SuppressUnusedWarnings AddPeanoSym1 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (AddPeanoSym1 l1 :: TyFun Peano Peano -> *) (l2 :: Peano) Source # | |
Defined in Termonad.Config.Vec |
data MultPeanoSym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) Source #
SameKind (Apply MultPeanoSym0 arg) (MultPeanoSym1 arg) => MultPeanoSym0KindInference |
Instances
SuppressUnusedWarnings MultPeanoSym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply MultPeanoSym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
data MultPeanoSym1 (l :: Peano) (l :: TyFun Peano Peano) Source #
SameKind (Apply (MultPeanoSym1 l) arg) (MultPeanoSym2 l arg) => MultPeanoSym1KindInference |
Instances
SuppressUnusedWarnings MultPeanoSym1 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (MultPeanoSym1 l1 :: TyFun Peano Peano -> *) (l2 :: Peano) Source # | |
Defined in Termonad.Config.Vec |
type family Compare_6989586621679400935 (a :: Peano) (a :: Peano) :: Ordering where ... Source #
Compare_6989586621679400935 Z Z = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[] | |
Compare_6989586621679400935 (S a_6989586621679399769) (S b_6989586621679399771) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_6989586621679399769) b_6989586621679399771)) '[]) | |
Compare_6989586621679400935 Z (S _) = LTSym0 | |
Compare_6989586621679400935 (S _) Z = GTSym0 |
type Compare_6989586621679400935Sym2 (t :: Peano) (t :: Peano) = Compare_6989586621679400935 t t Source #
data Compare_6989586621679400935Sym1 (l :: Peano) (l :: TyFun Peano Ordering) Source #
SameKind (Apply (Compare_6989586621679400935Sym1 l) arg) (Compare_6989586621679400935Sym2 l arg) => Compare_6989586621679400935Sym1KindInference |
Instances
SuppressUnusedWarnings Compare_6989586621679400935Sym1 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (Compare_6989586621679400935Sym1 l1 :: TyFun Peano Ordering -> *) (l2 :: Peano) Source # | |
Defined in Termonad.Config.Vec type Apply (Compare_6989586621679400935Sym1 l1 :: TyFun Peano Ordering -> *) (l2 :: Peano) = Compare_6989586621679400935 l1 l2 |
data Compare_6989586621679400935Sym0 (l :: TyFun Peano (TyFun Peano Ordering -> Type)) Source #
SameKind (Apply Compare_6989586621679400935Sym0 arg) (Compare_6989586621679400935Sym1 arg) => Compare_6989586621679400935Sym0KindInference |
Instances
SuppressUnusedWarnings Compare_6989586621679400935Sym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply Compare_6989586621679400935Sym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
type family ShowsPrec_6989586621679401357 (a :: Nat) (a :: Peano) (a :: Symbol) :: Symbol where ... Source #
ShowsPrec_6989586621679401357 _ Z a_6989586621679401346 = Apply (Apply ShowStringSym0 (FromString "Z")) a_6989586621679401346 | |
ShowsPrec_6989586621679401357 p_6989586621679399773 (S arg_6989586621679399775) a_6989586621679401348 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_6989586621679399773) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 (FromString "S "))) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_6989586621679399775))) a_6989586621679401348 |
type ShowsPrec_6989586621679401357Sym3 (t :: Nat) (t :: Peano) (t :: Symbol) = ShowsPrec_6989586621679401357 t t t Source #
data ShowsPrec_6989586621679401357Sym2 (l :: Nat) (l :: Peano) (l :: TyFun Symbol Symbol) Source #
SameKind (Apply (ShowsPrec_6989586621679401357Sym2 l l) arg) (ShowsPrec_6989586621679401357Sym3 l l arg) => ShowsPrec_6989586621679401357Sym2KindInference |
Instances
SuppressUnusedWarnings ShowsPrec_6989586621679401357Sym2 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (ShowsPrec_6989586621679401357Sym2 l1 l2 :: TyFun Symbol Symbol -> *) (l3 :: Symbol) Source # | |
Defined in Termonad.Config.Vec type Apply (ShowsPrec_6989586621679401357Sym2 l1 l2 :: TyFun Symbol Symbol -> *) (l3 :: Symbol) = ShowsPrec_6989586621679401357 l1 l2 l3 |
data ShowsPrec_6989586621679401357Sym1 (l :: Nat) (l :: TyFun Peano (TyFun Symbol Symbol -> Type)) Source #
SameKind (Apply (ShowsPrec_6989586621679401357Sym1 l) arg) (ShowsPrec_6989586621679401357Sym2 l arg) => ShowsPrec_6989586621679401357Sym1KindInference |
Instances
SuppressUnusedWarnings ShowsPrec_6989586621679401357Sym1 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (ShowsPrec_6989586621679401357Sym1 l1 :: TyFun Peano (TyFun Symbol Symbol -> Type) -> *) (l2 :: Peano) Source # | |
Defined in Termonad.Config.Vec |
data ShowsPrec_6989586621679401357Sym0 (l :: TyFun Nat (TyFun Peano (TyFun Symbol Symbol -> Type) -> Type)) Source #
SameKind (Apply ShowsPrec_6989586621679401357Sym0 arg) (ShowsPrec_6989586621679401357Sym1 arg) => ShowsPrec_6989586621679401357Sym0KindInference |
Instances
SuppressUnusedWarnings ShowsPrec_6989586621679401357Sym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply ShowsPrec_6989586621679401357Sym0 (l :: Nat) Source # | |
Defined in Termonad.Config.Vec |
type family TFHelper_6989586621679401418 (a :: Peano) (a :: Peano) :: Peano where ... Source #
TFHelper_6989586621679401418 a_6989586621679401401 a_6989586621679401403 = Apply (Apply AddPeanoSym0 a_6989586621679401401) a_6989586621679401403 |
type TFHelper_6989586621679401418Sym2 (t :: Peano) (t :: Peano) = TFHelper_6989586621679401418 t t Source #
data TFHelper_6989586621679401418Sym1 (l :: Peano) (l :: TyFun Peano Peano) Source #
SameKind (Apply (TFHelper_6989586621679401418Sym1 l) arg) (TFHelper_6989586621679401418Sym2 l arg) => TFHelper_6989586621679401418Sym1KindInference |
Instances
SuppressUnusedWarnings TFHelper_6989586621679401418Sym1 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (TFHelper_6989586621679401418Sym1 l1 :: TyFun Peano Peano -> *) (l2 :: Peano) Source # | |
Defined in Termonad.Config.Vec type Apply (TFHelper_6989586621679401418Sym1 l1 :: TyFun Peano Peano -> *) (l2 :: Peano) = TFHelper_6989586621679401418 l1 l2 |
data TFHelper_6989586621679401418Sym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) Source #
SameKind (Apply TFHelper_6989586621679401418Sym0 arg) (TFHelper_6989586621679401418Sym1 arg) => TFHelper_6989586621679401418Sym0KindInference |
Instances
SuppressUnusedWarnings TFHelper_6989586621679401418Sym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply TFHelper_6989586621679401418Sym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
type family TFHelper_6989586621679401444 (a :: Peano) (a :: Peano) :: Peano where ... Source #
TFHelper_6989586621679401444 a_6989586621679401427 a_6989586621679401429 = Apply (Apply SubtractPeanoSym0 a_6989586621679401427) a_6989586621679401429 |
type TFHelper_6989586621679401444Sym2 (t :: Peano) (t :: Peano) = TFHelper_6989586621679401444 t t Source #
data TFHelper_6989586621679401444Sym1 (l :: Peano) (l :: TyFun Peano Peano) Source #
SameKind (Apply (TFHelper_6989586621679401444Sym1 l) arg) (TFHelper_6989586621679401444Sym2 l arg) => TFHelper_6989586621679401444Sym1KindInference |
Instances
SuppressUnusedWarnings TFHelper_6989586621679401444Sym1 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (TFHelper_6989586621679401444Sym1 l1 :: TyFun Peano Peano -> *) (l2 :: Peano) Source # | |
Defined in Termonad.Config.Vec type Apply (TFHelper_6989586621679401444Sym1 l1 :: TyFun Peano Peano -> *) (l2 :: Peano) = TFHelper_6989586621679401444 l1 l2 |
data TFHelper_6989586621679401444Sym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) Source #
SameKind (Apply TFHelper_6989586621679401444Sym0 arg) (TFHelper_6989586621679401444Sym1 arg) => TFHelper_6989586621679401444Sym0KindInference |
Instances
SuppressUnusedWarnings TFHelper_6989586621679401444Sym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply TFHelper_6989586621679401444Sym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
type family TFHelper_6989586621679401470 (a :: Peano) (a :: Peano) :: Peano where ... Source #
TFHelper_6989586621679401470 a_6989586621679401453 a_6989586621679401455 = Apply (Apply MultPeanoSym0 a_6989586621679401453) a_6989586621679401455 |
type TFHelper_6989586621679401470Sym2 (t :: Peano) (t :: Peano) = TFHelper_6989586621679401470 t t Source #
data TFHelper_6989586621679401470Sym1 (l :: Peano) (l :: TyFun Peano Peano) Source #
SameKind (Apply (TFHelper_6989586621679401470Sym1 l) arg) (TFHelper_6989586621679401470Sym2 l arg) => TFHelper_6989586621679401470Sym1KindInference |
Instances
SuppressUnusedWarnings TFHelper_6989586621679401470Sym1 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (TFHelper_6989586621679401470Sym1 l1 :: TyFun Peano Peano -> *) (l2 :: Peano) Source # | |
Defined in Termonad.Config.Vec type Apply (TFHelper_6989586621679401470Sym1 l1 :: TyFun Peano Peano -> *) (l2 :: Peano) = TFHelper_6989586621679401470 l1 l2 |
data TFHelper_6989586621679401470Sym0 (l :: TyFun Peano (TyFun Peano Peano -> Type)) Source #
SameKind (Apply TFHelper_6989586621679401470Sym0 arg) (TFHelper_6989586621679401470Sym1 arg) => TFHelper_6989586621679401470Sym0KindInference |
Instances
SuppressUnusedWarnings TFHelper_6989586621679401470Sym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply TFHelper_6989586621679401470Sym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
type family Abs_6989586621679401487 (a :: Peano) :: Peano where ... Source #
Abs_6989586621679401487 a_6989586621679401479 = Apply IdSym0 a_6989586621679401479 |
type Abs_6989586621679401487Sym1 (t :: Peano) = Abs_6989586621679401487 t Source #
data Abs_6989586621679401487Sym0 (l :: TyFun Peano Peano) Source #
SameKind (Apply Abs_6989586621679401487Sym0 arg) (Abs_6989586621679401487Sym1 arg) => Abs_6989586621679401487Sym0KindInference |
Instances
SuppressUnusedWarnings Abs_6989586621679401487Sym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply Abs_6989586621679401487Sym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
type family Signum_6989586621679401497 (a :: Peano) :: Peano where ... Source #
type Signum_6989586621679401497Sym1 (t :: Peano) = Signum_6989586621679401497 t Source #
data Signum_6989586621679401497Sym0 (l :: TyFun Peano Peano) Source #
SameKind (Apply Signum_6989586621679401497Sym0 arg) (Signum_6989586621679401497Sym1 arg) => Signum_6989586621679401497Sym0KindInference |
Instances
SuppressUnusedWarnings Signum_6989586621679401497Sym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply Signum_6989586621679401497Sym0 (l :: Peano) Source # | |
Defined in Termonad.Config.Vec |
type family Let6989586621679401507Scrutinee_6989586621679389242 n where ... Source #
type Let6989586621679401507Scrutinee_6989586621679389242Sym1 t = Let6989586621679401507Scrutinee_6989586621679389242 t Source #
data Let6989586621679401507Scrutinee_6989586621679389242Sym0 l Source #
Instances
SuppressUnusedWarnings (Let6989586621679401507Scrutinee_6989586621679389242Sym0 :: TyFun k1 Bool -> *) Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (Let6989586621679401507Scrutinee_6989586621679389242Sym0 :: TyFun k1 Bool -> *) (l :: k1) Source # | |
Defined in Termonad.Config.Vec type Apply (Let6989586621679401507Scrutinee_6989586621679389242Sym0 :: TyFun k1 Bool -> *) (l :: k1) = Let6989586621679401507Scrutinee_6989586621679389242 l |
type family Let6989586621679401513Scrutinee_6989586621679389244 n where ... Source #
type Let6989586621679401513Scrutinee_6989586621679389244Sym1 t = Let6989586621679401513Scrutinee_6989586621679389244 t Source #
data Let6989586621679401513Scrutinee_6989586621679389244Sym0 l Source #
Instances
SuppressUnusedWarnings (Let6989586621679401513Scrutinee_6989586621679389244Sym0 :: TyFun k1 Bool -> *) Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply (Let6989586621679401513Scrutinee_6989586621679389244Sym0 :: TyFun k1 Bool -> *) (l :: k1) Source # | |
Defined in Termonad.Config.Vec type Apply (Let6989586621679401513Scrutinee_6989586621679389244Sym0 :: TyFun k1 Bool -> *) (l :: k1) = Let6989586621679401513Scrutinee_6989586621679389244 l |
type family Case_6989586621679401517 n t where ... Source #
Case_6989586621679401517 n True = ZSym0 | |
Case_6989586621679401517 n False = Apply SSym0 (Apply FromIntegerSym0 (Apply (Apply (-@#@$) n) (FromInteger 1))) |
type family Case_6989586621679401511 n t where ... Source #
Case_6989586621679401511 n True = Apply ErrorSym0 (FromString "Num Peano fromInteger: n is negative") | |
Case_6989586621679401511 n False = Case_6989586621679401517 n (Let6989586621679401513Scrutinee_6989586621679389244Sym1 n) |
type family FromInteger_6989586621679401522 (a :: Nat) :: Peano where ... Source #
type FromInteger_6989586621679401522Sym1 (t :: Nat) = FromInteger_6989586621679401522 t Source #
data FromInteger_6989586621679401522Sym0 (l :: TyFun Nat Peano) Source #
SameKind (Apply FromInteger_6989586621679401522Sym0 arg) (FromInteger_6989586621679401522Sym1 arg) => FromInteger_6989586621679401522Sym0KindInference |
Instances
SuppressUnusedWarnings FromInteger_6989586621679401522Sym0 Source # | |
Defined in Termonad.Config.Vec suppressUnusedWarnings :: () # | |
type Apply FromInteger_6989586621679401522Sym0 (l :: Nat) Source # | |
Defined in Termonad.Config.Vec |
type family Equals_6989586621679401527 (a :: Peano) (b :: Peano) :: Bool where ... Source #
Equals_6989586621679401527 Z Z = TrueSym0 | |
Equals_6989586621679401527 (S a) (S b) = (==) a b | |
Equals_6989586621679401527 (_ :: Peano) (_ :: Peano) = FalseSym0 |
sMultPeano :: forall (t :: Peano) (t :: Peano). Sing t -> Sing t -> Sing (Apply (Apply MultPeanoSym0 t) t :: Peano) Source #
sAddPeano :: forall (t :: Peano) (t :: Peano). Sing t -> Sing t -> Sing (Apply (Apply AddPeanoSym0 t) t :: Peano) Source #
sSubtractPeano :: forall (t :: Peano) (t :: Peano). Sing t -> Sing t -> Sing (Apply (Apply SubtractPeanoSym0 t) t :: Peano) Source #
data Fin :: Peano -> Type where Source #
Instances
Eq (Fin n) Source # | |
Ord (Fin n) Source # | |
Show (Fin n) Source # | |
SingKind (Fin n) Source # | |
SingI (FZ :: Fin (S n)) Source # | |
Defined in Termonad.Config.Vec | |
SingI n2 => SingI (FS n2 :: Fin (S n1)) Source # | |
Defined in Termonad.Config.Vec | |
Show (Sing n2) => Show (Sing (FS n2)) Source # | |
Show (Sing (FZ :: Fin (S n))) Source # | |
data Sing (z :: Fin n) Source # | |
type Demote (Fin n) Source # | |
Defined in Termonad.Config.Vec |
data IFin :: Peano -> Peano -> Type where Source #
IFZ :: forall (n :: Peano). IFin (S n) Z | |
IFS :: forall (n :: Peano) (m :: Peano). !(IFin n m) -> IFin (S n) (S m) |
Instances
Eq (IFin x y) Source # | |
Ord (IFin x y) Source # | |
Defined in Termonad.Config.Vec | |
Show (Sing n2) => Show (Sing (IFS n2)) Source # | |
Show (Sing (IFZ :: IFin (S n) Z)) Source # | |
Show (IFin x y) Source # | |
SingKind (IFin n m) Source # | |
SingI (IFZ :: IFin (S n) Z) Source # | |
Defined in Termonad.Config.Vec | |
SingI n2 => SingI (IFS n2 :: IFin (S n1) (S m)) Source # | |
Defined in Termonad.Config.Vec | |
data Sing (z :: IFin n m) Source # | |
type Demote (IFin n m) Source # | |
Defined in Termonad.Config.Vec |
pattern ConsHList :: (f a :: Type) -> HList f as -> HList f (a ': as) Source #
Data constructor for :<
.
data Vec (n :: Peano) :: Type -> Type where Source #
Instances
SingI n => Monad (Vec n) Source # | |
Functor (Vec n) Source # | |
SingI n => Applicative (Vec n) Source # | |
Foldable (Vec n) Source # | |
Defined in Termonad.Config.Vec fold :: Monoid m => Vec n m -> m # foldMap :: Monoid m => (a -> m) -> Vec n a -> m # foldr :: (a -> b -> b) -> b -> Vec n a -> b # foldr' :: (a -> b -> b) -> b -> Vec n a -> b # foldl :: (b -> a -> b) -> b -> Vec n a -> b # foldl' :: (b -> a -> b) -> b -> Vec n a -> b # foldr1 :: (a -> a -> a) -> Vec n a -> a # foldl1 :: (a -> a -> a) -> Vec n a -> a # elem :: Eq a => a -> Vec n a -> Bool # maximum :: Ord a => Vec n a -> a # minimum :: Ord a => Vec n a -> a # | |
SingI n => Distributive (Vec n) Source # | |
SingI n => Representable (Vec n) Source # | |
Eq a => Eq (Vec n a) Source # | |
Ord a => Ord (Vec n a) Source # | |
Show a => Show (Vec n a) Source # | |
SingI n => MonoPointed (Vec n a) Source # | |
MonoFoldable (Vec n a) Source # | |
Defined in Termonad.Config.Vec ofoldMap :: Monoid m => (Element (Vec n a) -> m) -> Vec n a -> m # ofoldr :: (Element (Vec n a) -> b -> b) -> b -> Vec n a -> b # ofoldl' :: (a0 -> Element (Vec n a) -> a0) -> a0 -> Vec n a -> a0 # otoList :: Vec n a -> [Element (Vec n a)] # oall :: (Element (Vec n a) -> Bool) -> Vec n a -> Bool # oany :: (Element (Vec n a) -> Bool) -> Vec n a -> Bool # olength64 :: Vec n a -> Int64 # ocompareLength :: Integral i => Vec n a -> i -> Ordering # otraverse_ :: Applicative f => (Element (Vec n a) -> f b) -> Vec n a -> f () # ofor_ :: Applicative f => Vec n a -> (Element (Vec n a) -> f b) -> f () # omapM_ :: Applicative m => (Element (Vec n a) -> m ()) -> Vec n a -> m () # oforM_ :: Applicative m => Vec n a -> (Element (Vec n a) -> m ()) -> m () # ofoldlM :: Monad m => (a0 -> Element (Vec n a) -> m a0) -> a0 -> Vec n a -> m a0 # ofoldMap1Ex :: Semigroup m => (Element (Vec n a) -> m) -> Vec n a -> m # ofoldr1Ex :: (Element (Vec n a) -> Element (Vec n a) -> Element (Vec n a)) -> Vec n a -> Element (Vec n a) # ofoldl1Ex' :: (Element (Vec n a) -> Element (Vec n a) -> Element (Vec n a)) -> Vec n a -> Element (Vec n a) # headEx :: Vec n a -> Element (Vec n a) # lastEx :: Vec n a -> Element (Vec n a) # unsafeHead :: Vec n a -> Element (Vec n a) # unsafeLast :: Vec n a -> Element (Vec n a) # maximumByEx :: (Element (Vec n a) -> Element (Vec n a) -> Ordering) -> Vec n a -> Element (Vec n a) # minimumByEx :: (Element (Vec n a) -> Element (Vec n a) -> Ordering) -> Vec n a -> Element (Vec n a) # | |
MonoFunctor (Vec n a) Source # | |
type Rep (Vec n) Source # | |
Defined in Termonad.Config.Vec | |
type Element (Vec n a) Source # | |
Defined in Termonad.Config.Vec |
singletonVec :: a -> Vec N1 a Source #
replaceVec :: Sing n -> a -> Vec n a Source #
replaceVec_ :: SingI n => a -> Vec n a Source #
Instances
SingI ns => Monad (Matrix ns) Source # | |
SingI ns => Functor (Matrix ns) Source # | |
SingI ns => Applicative (Matrix ns) Source # | |
SingI ns => Foldable (Matrix ns) Source # | |
Defined in Termonad.Config.Vec fold :: Monoid m => Matrix ns m -> m # foldMap :: Monoid m => (a -> m) -> Matrix ns a -> m # foldr :: (a -> b -> b) -> b -> Matrix ns a -> b # foldr' :: (a -> b -> b) -> b -> Matrix ns a -> b # foldl :: (b -> a -> b) -> b -> Matrix ns a -> b # foldl' :: (b -> a -> b) -> b -> Matrix ns a -> b # foldr1 :: (a -> a -> a) -> Matrix ns a -> a # foldl1 :: (a -> a -> a) -> Matrix ns a -> a # toList :: Matrix ns a -> [a] # length :: Matrix ns a -> Int # elem :: Eq a => a -> Matrix ns a -> Bool # maximum :: Ord a => Matrix ns a -> a # minimum :: Ord a => Matrix ns a -> a # | |
SingI ns => Distributive (Matrix ns) Source # | |
SingI ns => Representable (Matrix ns) Source # | |
Eq (MatrixTF ns a) => Eq (Matrix ns a) Source # | |
Num a => Num (Matrix ([] :: [Peano]) a) Source # | |
Defined in Termonad.Config.Vec (+) :: Matrix [] a -> Matrix [] a -> Matrix [] a # (-) :: Matrix [] a -> Matrix [] a -> Matrix [] a # (*) :: Matrix [] a -> Matrix [] a -> Matrix [] a # negate :: Matrix [] a -> Matrix [] a # abs :: Matrix [] a -> Matrix [] a # signum :: Matrix [] a -> Matrix [] a # fromInteger :: Integer -> Matrix [] a # | |
Ord (MatrixTF ns a) => Ord (Matrix ns a) Source # | |
Defined in Termonad.Config.Vec | |
Show (MatrixTF ns a) => Show (Matrix ns a) Source # | |
SingI ns => MonoFoldable (Matrix ns a) Source # | |
Defined in Termonad.Config.Vec ofoldMap :: Monoid m => (Element (Matrix ns a) -> m) -> Matrix ns a -> m # ofoldr :: (Element (Matrix ns a) -> b -> b) -> b -> Matrix ns a -> b # ofoldl' :: (a0 -> Element (Matrix ns a) -> a0) -> a0 -> Matrix ns a -> a0 # otoList :: Matrix ns a -> [Element (Matrix ns a)] # oall :: (Element (Matrix ns a) -> Bool) -> Matrix ns a -> Bool # oany :: (Element (Matrix ns a) -> Bool) -> Matrix ns a -> Bool # onull :: Matrix ns a -> Bool # olength :: Matrix ns a -> Int # olength64 :: Matrix ns a -> Int64 # ocompareLength :: Integral i => Matrix ns a -> i -> Ordering # otraverse_ :: Applicative f => (Element (Matrix ns a) -> f b) -> Matrix ns a -> f () # ofor_ :: Applicative f => Matrix ns a -> (Element (Matrix ns a) -> f b) -> f () # omapM_ :: Applicative m => (Element (Matrix ns a) -> m ()) -> Matrix ns a -> m () # oforM_ :: Applicative m => Matrix ns a -> (Element (Matrix ns a) -> m ()) -> m () # ofoldlM :: Monad m => (a0 -> Element (Matrix ns a) -> m a0) -> a0 -> Matrix ns a -> m a0 # ofoldMap1Ex :: Semigroup m => (Element (Matrix ns a) -> m) -> Matrix ns a -> m # ofoldr1Ex :: (Element (Matrix ns a) -> Element (Matrix ns a) -> Element (Matrix ns a)) -> Matrix ns a -> Element (Matrix ns a) # ofoldl1Ex' :: (Element (Matrix ns a) -> Element (Matrix ns a) -> Element (Matrix ns a)) -> Matrix ns a -> Element (Matrix ns a) # headEx :: Matrix ns a -> Element (Matrix ns a) # lastEx :: Matrix ns a -> Element (Matrix ns a) # unsafeHead :: Matrix ns a -> Element (Matrix ns a) # unsafeLast :: Matrix ns a -> Element (Matrix ns a) # maximumByEx :: (Element (Matrix ns a) -> Element (Matrix ns a) -> Ordering) -> Matrix ns a -> Element (Matrix ns a) # minimumByEx :: (Element (Matrix ns a) -> Element (Matrix ns a) -> Ordering) -> Matrix ns a -> Element (Matrix ns a) # | |
type Rep (Matrix ns) Source # | |
Defined in Termonad.Config.Vec | |
type Element (Matrix ns a) Source # | |
Defined in Termonad.Config.Vec |
data MatrixTFSym1 (ns :: [Peano]) (z :: TyFun Type Type) Source #
SameKind (Apply (MatrixTFSym1 ns) arg) (MatrixTFSym2 ns arg) => MatrixTFSym1KindInference |
data MatrixTFSym0 (l :: TyFun [Peano] (Type ~> Type)) Source #
SameKind (Apply MatrixTFSym0 arg) (MatrixTFSym1 arg) => MatrixTFSym0KindInference |
Instances
type Apply MatrixTFSym0 (l :: [Peano]) Source # | |
Defined in Termonad.Config.Vec |
eqSingMatrix :: forall (peanos :: [Peano]) (a :: Type). Eq a => Sing peanos -> Matrix peanos a -> Matrix peanos a -> Bool Source #
ordSingMatrix :: forall (peanos :: [Peano]) (a :: Type). Ord a => Sing peanos -> Matrix peanos a -> Matrix peanos a -> Ordering Source #
compareSingMatrix :: forall (peanos :: [Peano]) (a :: Type) (c :: Type). (a -> a -> c) -> c -> (c -> c -> c) -> Sing peanos -> Matrix peanos a -> Matrix peanos a -> c Source #
fmapSingMatrix :: forall (peanos :: [Peano]) (a :: Type) (b :: Type). Sing peanos -> (a -> b) -> Matrix peanos a -> Matrix peanos b Source #
toListMatrix :: forall (peanos :: [Peano]) (a :: Type). Sing peanos -> Matrix peanos a -> [a] Source #
genMatrix :: forall (ns :: [Peano]) (a :: Type). Sing ns -> (HList Fin ns -> a) -> Matrix ns a Source #