termonad-3.0.0.0: Terminal emulator configurable in Haskell

Copyright(c) Dennis Gosnell 2018
LicenseBSD3
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Termonad.Config.Vec

Description

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

Documentation

data Peano Source #

Constructors

Z 
S Peano 
Instances
Eq Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(==) :: Peano -> Peano -> Bool Source #

(/=) :: Peano -> Peano -> Bool Source #

Num Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Ord Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Show Peano Source # 
Instance details

Defined in Termonad.Config.Vec

PShow Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Associated Types

type ShowsPrec arg arg1 arg2 :: Symbol Source #

type Show_ arg :: Symbol Source #

type ShowList arg arg1 :: Symbol Source #

SShow Peano => SShow Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sShowsPrec :: Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply ShowsPrecSym0 t1) t2) t3) Source #

sShow_ :: Sing t -> Sing (Apply Show_Sym0 t) Source #

sShowList :: Sing t1 -> Sing t2 -> Sing (Apply (Apply ShowListSym0 t1) t2) Source #

PNum Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Associated Types

type arg + arg1 :: a Source #

type arg - arg1 :: a Source #

type arg * arg1 :: a Source #

type Negate arg :: a Source #

type Abs arg :: a Source #

type Signum arg :: a Source #

type FromInteger arg :: a Source #

SNum Peano Source # 
Instance details

Defined in Termonad.Config.Vec

POrd Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Associated Types

type Compare arg arg1 :: Ordering Source #

type arg < arg1 :: Bool Source #

type arg <= arg1 :: Bool Source #

type arg > arg1 :: Bool Source #

type arg >= arg1 :: Bool Source #

type Max arg arg1 :: a Source #

type Min arg arg1 :: a Source #

SOrd Peano => SOrd Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sCompare :: Sing t1 -> Sing t2 -> Sing (Apply (Apply CompareSym0 t1) t2) Source #

(%<) :: Sing t1 -> Sing t2 -> Sing (Apply (Apply (<@#@$) t1) t2) Source #

(%<=) :: Sing t1 -> Sing t2 -> Sing (Apply (Apply (<=@#@$) t1) t2) Source #

(%>) :: Sing t1 -> Sing t2 -> Sing (Apply (Apply (>@#@$) t1) t2) Source #

(%>=) :: Sing t1 -> Sing t2 -> Sing (Apply (Apply (>=@#@$) t1) t2) Source #

sMax :: Sing t1 -> Sing t2 -> Sing (Apply (Apply MaxSym0 t1) t2) Source #

sMin :: Sing t1 -> Sing t2 -> Sing (Apply (Apply MinSym0 t1) t2) Source #

SEq Peano => SEq Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(%==) :: Sing a -> Sing b -> Sing (a == b) Source #

(%/=) :: Sing a -> Sing b -> Sing (a /= b) Source #

PEq Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Associated Types

type x == y :: Bool Source #

type x /= y :: Bool Source #

SDecide Peano => SDecide Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(%~) :: Sing a -> Sing b -> Decision (a :~: b) Source #

SingKind Peano Source # 
Instance details

Defined in Termonad.Config.Vec

Associated Types

type Demote Peano = (r :: Type) Source #

SingI Z Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing Z Source #

SingI n => SingI (S n :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing (S n) Source #

Num a => Num (Matrix ([] :: [Peano]) a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(+) :: Matrix [] a -> Matrix [] a -> Matrix [] a Source #

(-) :: Matrix [] a -> Matrix [] a -> Matrix [] a Source #

(*) :: Matrix [] a -> Matrix [] a -> Matrix [] a Source #

negate :: Matrix [] a -> Matrix [] a Source #

abs :: Matrix [] a -> Matrix [] a Source #

signum :: Matrix [] a -> Matrix [] a Source #

fromInteger :: Integer -> Matrix [] a Source #

ShowSing Peano => Show (Sing z) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

showsPrec :: Int -> Sing z -> ShowS Source #

show :: Sing z -> String Source #

showList :: [Sing z] -> ShowS Source #

SuppressUnusedWarnings FromInteger_6989586621679489003Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings ShowsPrec_6989586621679488401Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings Signum_6989586621679488986Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings Abs_6989586621679488980Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings SSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings Compare_6989586621679487700Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings TFHelper_6989586621679488970Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings TFHelper_6989586621679488954Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings TFHelper_6989586621679488938Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings MultPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings AddPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings SubtractPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SingI SSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing SSym0 Source #

SingI MultPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SingI AddPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SingI SubtractPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings (Compare_6989586621679487700Sym1 a6989586621679487698 :: TyFun Peano Ordering -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings (TFHelper_6989586621679488970Sym1 a6989586621679488968 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings (TFHelper_6989586621679488954Sym1 a6989586621679488952 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings (TFHelper_6989586621679488938Sym1 a6989586621679488936 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings (MultPeanoSym1 a6989586621679485965 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings (AddPeanoSym1 a6989586621679485958 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings (SubtractPeanoSym1 a6989586621679485951 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SuppressUnusedWarnings (ShowsPrec_6989586621679488401Sym1 a6989586621679488398 :: TyFun Peano (Symbol ~> Symbol) -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SingI d => SingI (MultPeanoSym1 d :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SingI d => SingI (AddPeanoSym1 d :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing (AddPeanoSym1 d) Source #

SingI d => SingI (SubtractPeanoSym1 d :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SingI (TyCon1 S) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing (TyCon1 S) Source #

data Sing (a :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

data Sing (a :: Peano) where
type Demote Peano Source # 
Instance details

Defined in Termonad.Config.Vec

type Show_ (arg :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Show_ (arg :: Peano) = Apply (Show__6989586621680561670Sym0 :: TyFun Peano Symbol -> Type) arg
type FromInteger a Source # 
Instance details

Defined in Termonad.Config.Vec

type Signum (a :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Abs (a :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Negate (arg :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Negate (arg :: Peano) = Apply (Negate_6989586621679928371Sym0 :: TyFun Peano Peano -> Type) arg
type ShowList (arg :: [Peano]) arg1 Source # 
Instance details

Defined in Termonad.Config.Vec

type ShowList (arg :: [Peano]) arg1 = Apply (Apply (ShowList_6989586621680561681Sym0 :: TyFun [Peano] (Symbol ~> Symbol) -> Type) arg) arg1
type (a1 :: Peano) * (a2 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (a1 :: Peano) * (a2 :: Peano) = Apply (Apply TFHelper_6989586621679488970Sym0 a1) a2
type (a1 :: Peano) - (a2 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (a1 :: Peano) - (a2 :: Peano) = Apply (Apply TFHelper_6989586621679488954Sym0 a1) a2
type (a1 :: Peano) + (a2 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (a1 :: Peano) + (a2 :: Peano) = Apply (Apply TFHelper_6989586621679488938Sym0 a1) a2
type Min (arg :: Peano) (arg1 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Min (arg :: Peano) (arg1 :: Peano) = Apply (Apply (Min_6989586621679810827Sym0 :: TyFun Peano (Peano ~> Peano) -> Type) arg) arg1
type Max (arg :: Peano) (arg1 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Max (arg :: Peano) (arg1 :: Peano) = Apply (Apply (Max_6989586621679810809Sym0 :: TyFun Peano (Peano ~> Peano) -> Type) arg) arg1
type (arg :: Peano) >= (arg1 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (arg :: Peano) >= (arg1 :: Peano) = Apply (Apply (TFHelper_6989586621679810791Sym0 :: TyFun Peano (Peano ~> Bool) -> Type) arg) arg1
type (arg :: Peano) > (arg1 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (arg :: Peano) > (arg1 :: Peano) = Apply (Apply (TFHelper_6989586621679810773Sym0 :: TyFun Peano (Peano ~> Bool) -> Type) arg) arg1
type (arg :: Peano) <= (arg1 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (arg :: Peano) <= (arg1 :: Peano) = Apply (Apply (TFHelper_6989586621679810755Sym0 :: TyFun Peano (Peano ~> Bool) -> Type) arg) arg1
type (arg :: Peano) < (arg1 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (arg :: Peano) < (arg1 :: Peano) = Apply (Apply (TFHelper_6989586621679810737Sym0 :: TyFun Peano (Peano ~> Bool) -> Type) arg) arg1
type Compare (a1 :: Peano) (a2 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (x :: Peano) /= (y :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (x :: Peano) /= (y :: Peano) = Not (x == y)
type (a :: Peano) == (b :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type (a :: Peano) == (b :: Peano) = Equals_6989586621679489006 a b
type ShowsPrec a1 (a2 :: Peano) a3 Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply FromInteger_6989586621679489003Sym0 (a6989586621679489002 :: Nat) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply FromInteger_6989586621679489003Sym0 (a6989586621679489002 :: Nat) = FromInteger_6989586621679489003 a6989586621679489002
type Apply Signum_6989586621679488986Sym0 (a6989586621679488985 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply Signum_6989586621679488986Sym0 (a6989586621679488985 :: Peano) = Signum_6989586621679488986 a6989586621679488985
type Apply Abs_6989586621679488980Sym0 (a6989586621679488979 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply Abs_6989586621679488980Sym0 (a6989586621679488979 :: Peano) = Abs_6989586621679488980 a6989586621679488979
type Apply SSym0 (t6989586621679485949 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply SSym0 (t6989586621679485949 :: Peano) = S t6989586621679485949
type Apply (Compare_6989586621679487700Sym1 a6989586621679487698 :: TyFun Peano Ordering -> Type) (a6989586621679487699 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (Compare_6989586621679487700Sym1 a6989586621679487698 :: TyFun Peano Ordering -> Type) (a6989586621679487699 :: Peano) = Compare_6989586621679487700 a6989586621679487698 a6989586621679487699
type Apply (TFHelper_6989586621679488970Sym1 a6989586621679488968 :: TyFun Peano Peano -> Type) (a6989586621679488969 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (TFHelper_6989586621679488970Sym1 a6989586621679488968 :: TyFun Peano Peano -> Type) (a6989586621679488969 :: Peano) = TFHelper_6989586621679488970 a6989586621679488968 a6989586621679488969
type Apply (TFHelper_6989586621679488954Sym1 a6989586621679488952 :: TyFun Peano Peano -> Type) (a6989586621679488953 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (TFHelper_6989586621679488954Sym1 a6989586621679488952 :: TyFun Peano Peano -> Type) (a6989586621679488953 :: Peano) = TFHelper_6989586621679488954 a6989586621679488952 a6989586621679488953
type Apply (TFHelper_6989586621679488938Sym1 a6989586621679488936 :: TyFun Peano Peano -> Type) (a6989586621679488937 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (TFHelper_6989586621679488938Sym1 a6989586621679488936 :: TyFun Peano Peano -> Type) (a6989586621679488937 :: Peano) = TFHelper_6989586621679488938 a6989586621679488936 a6989586621679488937
type Apply (MultPeanoSym1 a6989586621679485965 :: TyFun Peano Peano -> Type) (a6989586621679485966 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (MultPeanoSym1 a6989586621679485965 :: TyFun Peano Peano -> Type) (a6989586621679485966 :: Peano) = MultPeano a6989586621679485965 a6989586621679485966
type Apply (AddPeanoSym1 a6989586621679485958 :: TyFun Peano Peano -> Type) (a6989586621679485959 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (AddPeanoSym1 a6989586621679485958 :: TyFun Peano Peano -> Type) (a6989586621679485959 :: Peano) = AddPeano a6989586621679485958 a6989586621679485959
type Apply (SubtractPeanoSym1 a6989586621679485951 :: TyFun Peano Peano -> Type) (a6989586621679485952 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (SubtractPeanoSym1 a6989586621679485951 :: TyFun Peano Peano -> Type) (a6989586621679485952 :: Peano) = SubtractPeano a6989586621679485951 a6989586621679485952
type Apply Compare_6989586621679487700Sym0 (a6989586621679487698 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply Compare_6989586621679487700Sym0 (a6989586621679487698 :: Peano) = Compare_6989586621679487700Sym1 a6989586621679487698
type Apply TFHelper_6989586621679488970Sym0 (a6989586621679488968 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply TFHelper_6989586621679488970Sym0 (a6989586621679488968 :: Peano) = TFHelper_6989586621679488970Sym1 a6989586621679488968
type Apply TFHelper_6989586621679488954Sym0 (a6989586621679488952 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply TFHelper_6989586621679488954Sym0 (a6989586621679488952 :: Peano) = TFHelper_6989586621679488954Sym1 a6989586621679488952
type Apply TFHelper_6989586621679488938Sym0 (a6989586621679488936 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply TFHelper_6989586621679488938Sym0 (a6989586621679488936 :: Peano) = TFHelper_6989586621679488938Sym1 a6989586621679488936
type Apply MultPeanoSym0 (a6989586621679485965 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply MultPeanoSym0 (a6989586621679485965 :: Peano) = MultPeanoSym1 a6989586621679485965
type Apply AddPeanoSym0 (a6989586621679485958 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply AddPeanoSym0 (a6989586621679485958 :: Peano) = AddPeanoSym1 a6989586621679485958
type Apply SubtractPeanoSym0 (a6989586621679485951 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply SubtractPeanoSym0 (a6989586621679485951 :: Peano) = SubtractPeanoSym1 a6989586621679485951
type Apply ShowsPrec_6989586621679488401Sym0 (a6989586621679488398 :: Nat) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply ShowsPrec_6989586621679488401Sym0 (a6989586621679488398 :: Nat) = ShowsPrec_6989586621679488401Sym1 a6989586621679488398
type Apply (ShowsPrec_6989586621679488401Sym1 a6989586621679488398 :: TyFun Peano (Symbol ~> Symbol) -> Type) (a6989586621679488399 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (ShowsPrec_6989586621679488401Sym1 a6989586621679488398 :: TyFun Peano (Symbol ~> Symbol) -> Type) (a6989586621679488399 :: Peano) = ShowsPrec_6989586621679488401Sym2 a6989586621679488398 a6989586621679488399
type Apply MatrixTFSym0 (l :: [Peano]) Source # 
Instance details

Defined in Termonad.Config.Vec

type ZSym0 = Z Source #

type SSym1 (t6989586621679485949 :: Peano) = S t6989586621679485949 Source #

data SSym0 :: (~>) Peano Peano where Source #

Constructors

SSym0KindInference :: forall t6989586621679485949 arg. SameKind (Apply SSym0 arg) (SSym1 arg) => SSym0 t6989586621679485949 
Instances
SuppressUnusedWarnings SSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SingI SSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing SSym0 Source #

type Apply SSym0 (t6989586621679485949 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply SSym0 (t6989586621679485949 :: Peano) = S t6989586621679485949

type family N0 :: Peano where ... Source #

Equations

N0 = ZSym0 

type N0Sym0 = N0 Source #

type family N1 :: Peano where ... Source #

Equations

N1 = Apply SSym0 N0Sym0 

type N1Sym0 = N1 Source #

type family N2 :: Peano where ... Source #

Equations

N2 = Apply SSym0 N1Sym0 

type N2Sym0 = N2 Source #

type family N3 :: Peano where ... Source #

Equations

N3 = Apply SSym0 N2Sym0 

type N3Sym0 = N3 Source #

type family N4 :: Peano where ... Source #

Equations

N4 = Apply SSym0 N3Sym0 

type N4Sym0 = N4 Source #

type family N5 :: Peano where ... Source #

Equations

N5 = Apply SSym0 N4Sym0 

type N5Sym0 = N5 Source #

type family N6 :: Peano where ... Source #

Equations

N6 = Apply SSym0 N5Sym0 

type N6Sym0 = N6 Source #

type family N7 :: Peano where ... Source #

Equations

N7 = Apply SSym0 N6Sym0 

type N7Sym0 = N7 Source #

type family N8 :: Peano where ... Source #

Equations

N8 = Apply SSym0 N7Sym0 

type N8Sym0 = N8 Source #

type family N9 :: Peano where ... Source #

Equations

N9 = Apply SSym0 N8Sym0 

type N9Sym0 = N9 Source #

type family N10 :: Peano where ... Source #

Equations

N10 = Apply SSym0 N9Sym0 

type family SubtractPeano (a :: Peano) (a :: Peano) :: Peano where ... Source #

data SubtractPeanoSym0 :: (~>) Peano ((~>) Peano Peano) where Source #

Constructors

SubtractPeanoSym0KindInference :: forall a6989586621679485951 arg. SameKind (Apply SubtractPeanoSym0 arg) (SubtractPeanoSym1 arg) => SubtractPeanoSym0 a6989586621679485951 
Instances
SuppressUnusedWarnings SubtractPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SingI SubtractPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply SubtractPeanoSym0 (a6989586621679485951 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply SubtractPeanoSym0 (a6989586621679485951 :: Peano) = SubtractPeanoSym1 a6989586621679485951

data SubtractPeanoSym1 (a6989586621679485951 :: Peano) :: (~>) Peano Peano where Source #

Constructors

SubtractPeanoSym1KindInference :: forall a6989586621679485951 a6989586621679485952 arg. SameKind (Apply (SubtractPeanoSym1 a6989586621679485951) arg) (SubtractPeanoSym2 a6989586621679485951 arg) => SubtractPeanoSym1 a6989586621679485951 a6989586621679485952 
Instances
SuppressUnusedWarnings (SubtractPeanoSym1 a6989586621679485951 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SingI d => SingI (SubtractPeanoSym1 d :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (SubtractPeanoSym1 a6989586621679485951 :: TyFun Peano Peano -> Type) (a6989586621679485952 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (SubtractPeanoSym1 a6989586621679485951 :: TyFun Peano Peano -> Type) (a6989586621679485952 :: Peano) = SubtractPeano a6989586621679485951 a6989586621679485952

type SubtractPeanoSym2 (a6989586621679485951 :: Peano) (a6989586621679485952 :: Peano) = SubtractPeano a6989586621679485951 a6989586621679485952 Source #

type family AddPeano (a :: Peano) (a :: Peano) :: Peano where ... Source #

Equations

AddPeano Z a = a 
AddPeano (S a) b = Apply SSym0 (Apply (Apply AddPeanoSym0 a) b) 

data AddPeanoSym0 :: (~>) Peano ((~>) Peano Peano) where Source #

Constructors

AddPeanoSym0KindInference :: forall a6989586621679485958 arg. SameKind (Apply AddPeanoSym0 arg) (AddPeanoSym1 arg) => AddPeanoSym0 a6989586621679485958 
Instances
SuppressUnusedWarnings AddPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SingI AddPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply AddPeanoSym0 (a6989586621679485958 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply AddPeanoSym0 (a6989586621679485958 :: Peano) = AddPeanoSym1 a6989586621679485958

data AddPeanoSym1 (a6989586621679485958 :: Peano) :: (~>) Peano Peano where Source #

Constructors

AddPeanoSym1KindInference :: forall a6989586621679485958 a6989586621679485959 arg. SameKind (Apply (AddPeanoSym1 a6989586621679485958) arg) (AddPeanoSym2 a6989586621679485958 arg) => AddPeanoSym1 a6989586621679485958 a6989586621679485959 
Instances
SuppressUnusedWarnings (AddPeanoSym1 a6989586621679485958 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SingI d => SingI (AddPeanoSym1 d :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing (AddPeanoSym1 d) Source #

type Apply (AddPeanoSym1 a6989586621679485958 :: TyFun Peano Peano -> Type) (a6989586621679485959 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (AddPeanoSym1 a6989586621679485958 :: TyFun Peano Peano -> Type) (a6989586621679485959 :: Peano) = AddPeano a6989586621679485958 a6989586621679485959

type AddPeanoSym2 (a6989586621679485958 :: Peano) (a6989586621679485959 :: Peano) = AddPeano a6989586621679485958 a6989586621679485959 Source #

type family MultPeano (a :: Peano) (a :: Peano) :: Peano where ... Source #

data MultPeanoSym0 :: (~>) Peano ((~>) Peano Peano) where Source #

Constructors

MultPeanoSym0KindInference :: forall a6989586621679485965 arg. SameKind (Apply MultPeanoSym0 arg) (MultPeanoSym1 arg) => MultPeanoSym0 a6989586621679485965 
Instances
SuppressUnusedWarnings MultPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

SingI MultPeanoSym0 Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply MultPeanoSym0 (a6989586621679485965 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply MultPeanoSym0 (a6989586621679485965 :: Peano) = MultPeanoSym1 a6989586621679485965

data MultPeanoSym1 (a6989586621679485965 :: Peano) :: (~>) Peano Peano where Source #

Constructors

MultPeanoSym1KindInference :: forall a6989586621679485965 a6989586621679485966 arg. SameKind (Apply (MultPeanoSym1 a6989586621679485965) arg) (MultPeanoSym2 a6989586621679485965 arg) => MultPeanoSym1 a6989586621679485965 a6989586621679485966 
Instances
SuppressUnusedWarnings (MultPeanoSym1 a6989586621679485965 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

SingI d => SingI (MultPeanoSym1 d :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (MultPeanoSym1 a6989586621679485965 :: TyFun Peano Peano -> Type) (a6989586621679485966 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (MultPeanoSym1 a6989586621679485965 :: TyFun Peano Peano -> Type) (a6989586621679485966 :: Peano) = MultPeano a6989586621679485965 a6989586621679485966

type MultPeanoSym2 (a6989586621679485965 :: Peano) (a6989586621679485966 :: Peano) = MultPeano a6989586621679485965 a6989586621679485966 Source #

type family N24 :: Peano where ... Source #

type family Compare_6989586621679487700 (a :: Peano) (a :: Peano) :: Ordering where ... Source #

Equations

Compare_6989586621679487700 Z Z = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[] 
Compare_6989586621679487700 (S a_6989586621679485941) (S b_6989586621679485943) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_6989586621679485941) b_6989586621679485943)) '[]) 
Compare_6989586621679487700 Z (S _) = LTSym0 
Compare_6989586621679487700 (S _) Z = GTSym0 

type Compare_6989586621679487700Sym2 (a6989586621679487698 :: Peano) (a6989586621679487699 :: Peano) = Compare_6989586621679487700 a6989586621679487698 a6989586621679487699 Source #

data Compare_6989586621679487700Sym1 (a6989586621679487698 :: Peano) :: (~>) Peano Ordering where Source #

Constructors

Compare_6989586621679487700Sym1KindInference :: forall a6989586621679487698 a6989586621679487699 arg. SameKind (Apply (Compare_6989586621679487700Sym1 a6989586621679487698) arg) (Compare_6989586621679487700Sym2 a6989586621679487698 arg) => Compare_6989586621679487700Sym1 a6989586621679487698 a6989586621679487699 
Instances
SuppressUnusedWarnings (Compare_6989586621679487700Sym1 a6989586621679487698 :: TyFun Peano Ordering -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (Compare_6989586621679487700Sym1 a6989586621679487698 :: TyFun Peano Ordering -> Type) (a6989586621679487699 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (Compare_6989586621679487700Sym1 a6989586621679487698 :: TyFun Peano Ordering -> Type) (a6989586621679487699 :: Peano) = Compare_6989586621679487700 a6989586621679487698 a6989586621679487699

type family ShowsPrec_6989586621679488401 (a :: Nat) (a :: Peano) (a :: Symbol) :: Symbol where ... Source #

Equations

ShowsPrec_6989586621679488401 _ Z a_6989586621679488390 = Apply (Apply ShowStringSym0 (FromString "Z")) a_6989586621679488390 
ShowsPrec_6989586621679488401 p_6989586621679485945 (S arg_6989586621679485947) a_6989586621679488392 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_6989586621679485945) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 (FromString "S "))) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_6989586621679485947))) a_6989586621679488392 

type ShowsPrec_6989586621679488401Sym3 (a6989586621679488398 :: Nat) (a6989586621679488399 :: Peano) (a6989586621679488400 :: Symbol) = ShowsPrec_6989586621679488401 a6989586621679488398 a6989586621679488399 a6989586621679488400 Source #

data ShowsPrec_6989586621679488401Sym2 (a6989586621679488398 :: Nat) (a6989586621679488399 :: Peano) :: (~>) Symbol Symbol where Source #

Constructors

ShowsPrec_6989586621679488401Sym2KindInference :: forall a6989586621679488398 a6989586621679488399 a6989586621679488400 arg. SameKind (Apply (ShowsPrec_6989586621679488401Sym2 a6989586621679488398 a6989586621679488399) arg) (ShowsPrec_6989586621679488401Sym3 a6989586621679488398 a6989586621679488399 arg) => ShowsPrec_6989586621679488401Sym2 a6989586621679488398 a6989586621679488399 a6989586621679488400 
Instances
SuppressUnusedWarnings (ShowsPrec_6989586621679488401Sym2 a6989586621679488399 a6989586621679488398 :: TyFun Symbol Symbol -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (ShowsPrec_6989586621679488401Sym2 a6989586621679488399 a6989586621679488398 :: TyFun Symbol Symbol -> Type) (a6989586621679488400 :: Symbol) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (ShowsPrec_6989586621679488401Sym2 a6989586621679488399 a6989586621679488398 :: TyFun Symbol Symbol -> Type) (a6989586621679488400 :: Symbol) = ShowsPrec_6989586621679488401 a6989586621679488399 a6989586621679488398 a6989586621679488400

data ShowsPrec_6989586621679488401Sym1 (a6989586621679488398 :: Nat) :: (~>) Peano ((~>) Symbol Symbol) where Source #

Constructors

ShowsPrec_6989586621679488401Sym1KindInference :: forall a6989586621679488398 a6989586621679488399 arg. SameKind (Apply (ShowsPrec_6989586621679488401Sym1 a6989586621679488398) arg) (ShowsPrec_6989586621679488401Sym2 a6989586621679488398 arg) => ShowsPrec_6989586621679488401Sym1 a6989586621679488398 a6989586621679488399 
Instances
SuppressUnusedWarnings (ShowsPrec_6989586621679488401Sym1 a6989586621679488398 :: TyFun Peano (Symbol ~> Symbol) -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (ShowsPrec_6989586621679488401Sym1 a6989586621679488398 :: TyFun Peano (Symbol ~> Symbol) -> Type) (a6989586621679488399 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (ShowsPrec_6989586621679488401Sym1 a6989586621679488398 :: TyFun Peano (Symbol ~> Symbol) -> Type) (a6989586621679488399 :: Peano) = ShowsPrec_6989586621679488401Sym2 a6989586621679488398 a6989586621679488399

type family TFHelper_6989586621679488938 (a :: Peano) (a :: Peano) :: Peano where ... Source #

Equations

TFHelper_6989586621679488938 a_6989586621679488926 a_6989586621679488928 = Apply (Apply AddPeanoSym0 a_6989586621679488926) a_6989586621679488928 

type TFHelper_6989586621679488938Sym2 (a6989586621679488936 :: Peano) (a6989586621679488937 :: Peano) = TFHelper_6989586621679488938 a6989586621679488936 a6989586621679488937 Source #

data TFHelper_6989586621679488938Sym1 (a6989586621679488936 :: Peano) :: (~>) Peano Peano where Source #

Constructors

TFHelper_6989586621679488938Sym1KindInference :: forall a6989586621679488936 a6989586621679488937 arg. SameKind (Apply (TFHelper_6989586621679488938Sym1 a6989586621679488936) arg) (TFHelper_6989586621679488938Sym2 a6989586621679488936 arg) => TFHelper_6989586621679488938Sym1 a6989586621679488936 a6989586621679488937 
Instances
SuppressUnusedWarnings (TFHelper_6989586621679488938Sym1 a6989586621679488936 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (TFHelper_6989586621679488938Sym1 a6989586621679488936 :: TyFun Peano Peano -> Type) (a6989586621679488937 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (TFHelper_6989586621679488938Sym1 a6989586621679488936 :: TyFun Peano Peano -> Type) (a6989586621679488937 :: Peano) = TFHelper_6989586621679488938 a6989586621679488936 a6989586621679488937

type family TFHelper_6989586621679488954 (a :: Peano) (a :: Peano) :: Peano where ... Source #

Equations

TFHelper_6989586621679488954 a_6989586621679488942 a_6989586621679488944 = Apply (Apply SubtractPeanoSym0 a_6989586621679488942) a_6989586621679488944 

type TFHelper_6989586621679488954Sym2 (a6989586621679488952 :: Peano) (a6989586621679488953 :: Peano) = TFHelper_6989586621679488954 a6989586621679488952 a6989586621679488953 Source #

data TFHelper_6989586621679488954Sym1 (a6989586621679488952 :: Peano) :: (~>) Peano Peano where Source #

Constructors

TFHelper_6989586621679488954Sym1KindInference :: forall a6989586621679488952 a6989586621679488953 arg. SameKind (Apply (TFHelper_6989586621679488954Sym1 a6989586621679488952) arg) (TFHelper_6989586621679488954Sym2 a6989586621679488952 arg) => TFHelper_6989586621679488954Sym1 a6989586621679488952 a6989586621679488953 
Instances
SuppressUnusedWarnings (TFHelper_6989586621679488954Sym1 a6989586621679488952 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (TFHelper_6989586621679488954Sym1 a6989586621679488952 :: TyFun Peano Peano -> Type) (a6989586621679488953 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (TFHelper_6989586621679488954Sym1 a6989586621679488952 :: TyFun Peano Peano -> Type) (a6989586621679488953 :: Peano) = TFHelper_6989586621679488954 a6989586621679488952 a6989586621679488953

type family TFHelper_6989586621679488970 (a :: Peano) (a :: Peano) :: Peano where ... Source #

Equations

TFHelper_6989586621679488970 a_6989586621679488958 a_6989586621679488960 = Apply (Apply MultPeanoSym0 a_6989586621679488958) a_6989586621679488960 

type TFHelper_6989586621679488970Sym2 (a6989586621679488968 :: Peano) (a6989586621679488969 :: Peano) = TFHelper_6989586621679488970 a6989586621679488968 a6989586621679488969 Source #

data TFHelper_6989586621679488970Sym1 (a6989586621679488968 :: Peano) :: (~>) Peano Peano where Source #

Constructors

TFHelper_6989586621679488970Sym1KindInference :: forall a6989586621679488968 a6989586621679488969 arg. SameKind (Apply (TFHelper_6989586621679488970Sym1 a6989586621679488968) arg) (TFHelper_6989586621679488970Sym2 a6989586621679488968 arg) => TFHelper_6989586621679488970Sym1 a6989586621679488968 a6989586621679488969 
Instances
SuppressUnusedWarnings (TFHelper_6989586621679488970Sym1 a6989586621679488968 :: TyFun Peano Peano -> Type) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (TFHelper_6989586621679488970Sym1 a6989586621679488968 :: TyFun Peano Peano -> Type) (a6989586621679488969 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (TFHelper_6989586621679488970Sym1 a6989586621679488968 :: TyFun Peano Peano -> Type) (a6989586621679488969 :: Peano) = TFHelper_6989586621679488970 a6989586621679488968 a6989586621679488969

type family Abs_6989586621679488980 (a :: Peano) :: Peano where ... Source #

Equations

Abs_6989586621679488980 a_6989586621679488974 = Apply IdSym0 a_6989586621679488974 

type Abs_6989586621679488980Sym1 (a6989586621679488979 :: Peano) = Abs_6989586621679488980 a6989586621679488979 Source #

data Abs_6989586621679488980Sym0 :: (~>) Peano Peano where Source #

Constructors

Abs_6989586621679488980Sym0KindInference :: forall a6989586621679488979 arg. SameKind (Apply Abs_6989586621679488980Sym0 arg) (Abs_6989586621679488980Sym1 arg) => Abs_6989586621679488980Sym0 a6989586621679488979 
Instances
SuppressUnusedWarnings Abs_6989586621679488980Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply Abs_6989586621679488980Sym0 (a6989586621679488979 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply Abs_6989586621679488980Sym0 (a6989586621679488979 :: Peano) = Abs_6989586621679488980 a6989586621679488979

type Signum_6989586621679488986Sym1 (a6989586621679488985 :: Peano) = Signum_6989586621679488986 a6989586621679488985 Source #

data Signum_6989586621679488986Sym0 :: (~>) Peano Peano where Source #

Instances
SuppressUnusedWarnings Signum_6989586621679488986Sym0 Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply Signum_6989586621679488986Sym0 (a6989586621679488985 :: Peano) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply Signum_6989586621679488986Sym0 (a6989586621679488985 :: Peano) = Signum_6989586621679488986 a6989586621679488985

type FromInteger_6989586621679489003Sym1 (a6989586621679489002 :: Nat) = FromInteger_6989586621679489003 a6989586621679489002 Source #

type SPeano = (Sing :: Peano -> Type) Source #

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 #

ltSuccProof :: forall (n :: Peano) (m :: Peano) proxy. (S n < S m) ~ True => proxy n -> proxy m -> (n < m) :~: True Source #

This is a proof that if we know S n is less than S m, then we know n is also less than m.

>>> ltSuccProof (sing :: Sing N4) (sing :: Sing N5)
Refl

data Fin :: Peano -> Type where Source #

Constructors

FZ :: forall (n :: Peano). Fin (S n) 
FS :: forall (n :: Peano). !(Fin n) -> Fin (S n) 
Instances
Eq (Fin n) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(==) :: Fin n -> Fin n -> Bool Source #

(/=) :: Fin n -> Fin n -> Bool Source #

Ord (Fin n) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

compare :: Fin n -> Fin n -> Ordering Source #

(<) :: Fin n -> Fin n -> Bool Source #

(<=) :: Fin n -> Fin n -> Bool Source #

(>) :: Fin n -> Fin n -> Bool Source #

(>=) :: Fin n -> Fin n -> Bool Source #

max :: Fin n -> Fin n -> Fin n Source #

min :: Fin n -> Fin n -> Fin n Source #

Show (Fin n) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

showsPrec :: Int -> Fin n -> ShowS Source #

show :: Fin n -> String Source #

showList :: [Fin n] -> ShowS Source #

SingKind (Fin n) Source # 
Instance details

Defined in Termonad.Config.Vec

Associated Types

type Demote (Fin n) = (r :: Type) Source #

Methods

fromSing :: Sing a -> Demote (Fin n) Source #

toSing :: Demote (Fin n) -> SomeSing (Fin n) Source #

SingI (FZ :: Fin (S n)) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing FZ Source #

SingI n2 => SingI (FS n2 :: Fin (S n1)) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing (FS n2) Source #

Show (Sing n2) => Show (Sing (FS n2)) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

showsPrec :: Int -> Sing (FS n2) -> ShowS Source #

show :: Sing (FS n2) -> String Source #

showList :: [Sing (FS n2)] -> ShowS Source #

Show (Sing (FZ :: Fin (S n))) Source # 
Instance details

Defined in Termonad.Config.Vec

data Sing (z :: Fin n) Source # 
Instance details

Defined in Termonad.Config.Vec

data Sing (z :: Fin n) where
type Demote (Fin n) Source # 
Instance details

Defined in Termonad.Config.Vec

type Demote (Fin n) = Fin n

fin :: forall total n. (n < total) ~ True => Sing total -> Sing n -> Fin total Source #

Similar to ifin but for Fin.

>>> fin (sing :: Sing N5) (sing :: Sing N1) :: Fin N5
FS FZ

fin_ :: forall total n. (SingI total, (n < total) ~ True) => Sing n -> Fin total Source #

Similar to ifin_ but for Fin.

>>> fin_ @N4 (sing :: Sing N2) :: Fin N4
FS (FS FZ)

data IFin :: Peano -> Peano -> Type where Source #

Constructors

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 # 
Instance details

Defined in Termonad.Config.Vec

Methods

(==) :: IFin x y -> IFin x y -> Bool Source #

(/=) :: IFin x y -> IFin x y -> Bool Source #

Ord (IFin x y) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

compare :: IFin x y -> IFin x y -> Ordering Source #

(<) :: IFin x y -> IFin x y -> Bool Source #

(<=) :: IFin x y -> IFin x y -> Bool Source #

(>) :: IFin x y -> IFin x y -> Bool Source #

(>=) :: IFin x y -> IFin x y -> Bool Source #

max :: IFin x y -> IFin x y -> IFin x y Source #

min :: IFin x y -> IFin x y -> IFin x y Source #

Show (Sing n2) => Show (Sing (IFS n2)) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

showsPrec :: Int -> Sing (IFS n2) -> ShowS Source #

show :: Sing (IFS n2) -> String Source #

showList :: [Sing (IFS n2)] -> ShowS Source #

Show (Sing (IFZ :: IFin (S n) Z)) Source # 
Instance details

Defined in Termonad.Config.Vec

Show (IFin x y) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

showsPrec :: Int -> IFin x y -> ShowS Source #

show :: IFin x y -> String Source #

showList :: [IFin x y] -> ShowS Source #

SingKind (IFin n m) Source # 
Instance details

Defined in Termonad.Config.Vec

Associated Types

type Demote (IFin n m) = (r :: Type) Source #

Methods

fromSing :: Sing a -> Demote (IFin n m) Source #

toSing :: Demote (IFin n m) -> SomeSing (IFin n m) Source #

SingI (IFZ :: IFin (S n) Z) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing IFZ Source #

SingI n2 => SingI (IFS n2 :: IFin (S n1) (S m)) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

sing :: Sing (IFS n2) Source #

data Sing (z :: IFin n m) Source # 
Instance details

Defined in Termonad.Config.Vec

data Sing (z :: IFin n m) where
type Demote (IFin n m) Source # 
Instance details

Defined in Termonad.Config.Vec

type Demote (IFin n m) = IFin n m

toFinIFin :: IFin n m -> Fin n Source #

ifin :: forall total n. (n < total) ~ True => Sing total -> Sing n -> IFin total n Source #

Create an IFin.

>>> ifin (sing :: Sing N5) (sing :: Sing N2) :: IFin N5 N2
IFS (IFS IFZ)

ifin_ :: forall total n. (SingI total, (n < total) ~ True) => Sing n -> IFin total n Source #

Create an IFin, but take the total implicitly.

>>> ifin_ @N5 (sing :: Sing N3) :: IFin N5 N3
IFS (IFS (IFS IFZ))

data HList :: (k -> Type) -> [k] -> Type where Source #

Constructors

EmptyHList :: HList f '[] 
(:<) :: forall (f :: k -> Type) (a :: k) (as :: [k]). f a -> HList f as -> HList f (a ': as) infixr 6 

pattern ConsHList :: (f a :: Type) -> HList f as -> HList f (a ': as) Source #

Data constructor for :<.

data Vec (n :: Peano) :: Type -> Type where Source #

Constructors

EmptyVec :: Vec Z a 
(:*) :: !a -> !(Vec n a) -> Vec (S n) a infixr 6 
Instances
SingI n => Monad (Vec n) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(>>=) :: Vec n a -> (a -> Vec n b) -> Vec n b Source #

(>>) :: Vec n a -> Vec n b -> Vec n b Source #

return :: a -> Vec n a Source #

fail :: String -> Vec n a Source #

Functor (Vec n) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

fmap :: (a -> b) -> Vec n a -> Vec n b Source #

(<$) :: a -> Vec n b -> Vec n a Source #

SingI n => Applicative (Vec n) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

pure :: a -> Vec n a Source #

(<*>) :: Vec n (a -> b) -> Vec n a -> Vec n b Source #

liftA2 :: (a -> b -> c) -> Vec n a -> Vec n b -> Vec n c Source #

(*>) :: Vec n a -> Vec n b -> Vec n b Source #

(<*) :: Vec n a -> Vec n b -> Vec n a Source #

Foldable (Vec n) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

fold :: Monoid m => Vec n m -> m Source #

foldMap :: Monoid m => (a -> m) -> Vec n a -> m Source #

foldr :: (a -> b -> b) -> b -> Vec n a -> b Source #

foldr' :: (a -> b -> b) -> b -> Vec n a -> b Source #

foldl :: (b -> a -> b) -> b -> Vec n a -> b Source #

foldl' :: (b -> a -> b) -> b -> Vec n a -> b Source #

foldr1 :: (a -> a -> a) -> Vec n a -> a Source #

foldl1 :: (a -> a -> a) -> Vec n a -> a Source #

toList :: Vec n a -> [a] Source #

null :: Vec n a -> Bool Source #

length :: Vec n a -> Int Source #

elem :: Eq a => a -> Vec n a -> Bool Source #

maximum :: Ord a => Vec n a -> a Source #

minimum :: Ord a => Vec n a -> a Source #

sum :: Num a => Vec n a -> a Source #

product :: Num a => Vec n a -> a Source #

SingI n => Distributive (Vec n) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

distribute :: Functor f => f (Vec n a) -> Vec n (f a) Source #

collect :: Functor f => (a -> Vec n b) -> f a -> Vec n (f b) Source #

distributeM :: Monad m => m (Vec n a) -> Vec n (m a) Source #

collectM :: Monad m => (a -> Vec n b) -> m a -> Vec n (m b) Source #

SingI n => Representable (Vec n) Source # 
Instance details

Defined in Termonad.Config.Vec

Associated Types

type Rep (Vec n) :: Type Source #

Methods

tabulate :: (Rep (Vec n) -> a) -> Vec n a Source #

index :: Vec n a -> Rep (Vec n) -> a Source #

Eq a => Eq (Vec n a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(==) :: Vec n a -> Vec n a -> Bool Source #

(/=) :: Vec n a -> Vec n a -> Bool Source #

Ord a => Ord (Vec n a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

compare :: Vec n a -> Vec n a -> Ordering Source #

(<) :: Vec n a -> Vec n a -> Bool Source #

(<=) :: Vec n a -> Vec n a -> Bool Source #

(>) :: Vec n a -> Vec n a -> Bool Source #

(>=) :: Vec n a -> Vec n a -> Bool Source #

max :: Vec n a -> Vec n a -> Vec n a Source #

min :: Vec n a -> Vec n a -> Vec n a Source #

Show a => Show (Vec n a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

showsPrec :: Int -> Vec n a -> ShowS Source #

show :: Vec n a -> String Source #

showList :: [Vec n a] -> ShowS Source #

SingI n => MonoPointed (Vec n a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

opoint :: Element (Vec n a) -> Vec n a Source #

MonoFoldable (Vec n a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

ofoldMap :: Monoid m => (Element (Vec n a) -> m) -> Vec n a -> m Source #

ofoldr :: (Element (Vec n a) -> b -> b) -> b -> Vec n a -> b Source #

ofoldl' :: (a0 -> Element (Vec n a) -> a0) -> a0 -> Vec n a -> a0 Source #

otoList :: Vec n a -> [Element (Vec n a)] Source #

oall :: (Element (Vec n a) -> Bool) -> Vec n a -> Bool Source #

oany :: (Element (Vec n a) -> Bool) -> Vec n a -> Bool Source #

onull :: Vec n a -> Bool Source #

olength :: Vec n a -> Int Source #

olength64 :: Vec n a -> Int64 Source #

ocompareLength :: Integral i => Vec n a -> i -> Ordering Source #

otraverse_ :: Applicative f => (Element (Vec n a) -> f b) -> Vec n a -> f () Source #

ofor_ :: Applicative f => Vec n a -> (Element (Vec n a) -> f b) -> f () Source #

omapM_ :: Applicative m => (Element (Vec n a) -> m ()) -> Vec n a -> m () Source #

oforM_ :: Applicative m => Vec n a -> (Element (Vec n a) -> m ()) -> m () Source #

ofoldlM :: Monad m => (a0 -> Element (Vec n a) -> m a0) -> a0 -> Vec n a -> m a0 Source #

ofoldMap1Ex :: Semigroup m => (Element (Vec n a) -> m) -> Vec n a -> m Source #

ofoldr1Ex :: (Element (Vec n a) -> Element (Vec n a) -> Element (Vec n a)) -> Vec n a -> Element (Vec n a) Source #

ofoldl1Ex' :: (Element (Vec n a) -> Element (Vec n a) -> Element (Vec n a)) -> Vec n a -> Element (Vec n a) Source #

headEx :: Vec n a -> Element (Vec n a) Source #

lastEx :: Vec n a -> Element (Vec n a) Source #

unsafeHead :: Vec n a -> Element (Vec n a) Source #

unsafeLast :: Vec n a -> Element (Vec n a) Source #

maximumByEx :: (Element (Vec n a) -> Element (Vec n a) -> Ordering) -> Vec n a -> Element (Vec n a) Source #

minimumByEx :: (Element (Vec n a) -> Element (Vec n a) -> Ordering) -> Vec n a -> Element (Vec n a) Source #

oelem :: Element (Vec n a) -> Vec n a -> Bool Source #

onotElem :: Element (Vec n a) -> Vec n a -> Bool Source #

MonoFunctor (Vec n a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

omap :: (Element (Vec n a) -> Element (Vec n a)) -> Vec n a -> Vec n a Source #

type Rep (Vec n) Source # 
Instance details

Defined in Termonad.Config.Vec

type Rep (Vec n) = Fin n
type Element (Vec n a) Source # 
Instance details

Defined in Termonad.Config.Vec

type Element (Vec n a) = a

pattern ConsVec :: (a :: Type) -> Vec n a -> Vec (S n) a Source #

Data constructor for :*.

genVec_ :: SingI n => (Fin n -> a) -> Vec n a Source #

genVec :: SPeano n -> (Fin n -> a) -> Vec n a Source #

indexVec :: Fin n -> Vec n a -> a Source #

replaceVec :: Sing n -> a -> Vec n a Source #

imapVec :: forall n a b. (Fin n -> a -> b) -> Vec n a -> Vec n b Source #

replaceVec_ :: SingI n => a -> Vec n a Source #

apVec :: (a -> b -> c) -> Vec n a -> Vec n b -> Vec n c Source #

onHeadVec :: (a -> a) -> Vec (S n) a -> Vec (S n) a Source #

dropVec :: Sing m -> Vec (m + n) a -> Vec n a Source #

takeVec :: IFin n m -> Vec n a -> Vec m a Source #

updateAtVec :: Fin n -> (a -> a) -> Vec n a -> Vec n a Source #

setAtVec :: Fin n -> a -> Vec n a -> Vec n a Source #

fromListVec :: Sing n -> [a] -> Maybe (Vec n a) Source #

fromListVec_ :: SingI n => [a] -> Maybe (Vec n a) Source #

unsafeFromListVec :: Sing n -> [a] -> Vec n a Source #

unsafeFromListVec_ :: SingI n => [a] -> Vec n a Source #

type family MatrixTF (ns :: [Peano]) (a :: Type) :: Type where ... Source #

Equations

MatrixTF '[] a = a 
MatrixTF (n ': ns) a = Vec n (MatrixTF ns a) 

newtype Matrix ns a Source #

Constructors

Matrix 

Fields

Instances
SingI ns => Monad (Matrix ns) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(>>=) :: Matrix ns a -> (a -> Matrix ns b) -> Matrix ns b Source #

(>>) :: Matrix ns a -> Matrix ns b -> Matrix ns b Source #

return :: a -> Matrix ns a Source #

fail :: String -> Matrix ns a Source #

SingI ns => Functor (Matrix ns) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

fmap :: (a -> b) -> Matrix ns a -> Matrix ns b Source #

(<$) :: a -> Matrix ns b -> Matrix ns a Source #

SingI ns => Applicative (Matrix ns) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

pure :: a -> Matrix ns a Source #

(<*>) :: Matrix ns (a -> b) -> Matrix ns a -> Matrix ns b Source #

liftA2 :: (a -> b -> c) -> Matrix ns a -> Matrix ns b -> Matrix ns c Source #

(*>) :: Matrix ns a -> Matrix ns b -> Matrix ns b Source #

(<*) :: Matrix ns a -> Matrix ns b -> Matrix ns a Source #

SingI ns => Foldable (Matrix ns) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

fold :: Monoid m => Matrix ns m -> m Source #

foldMap :: Monoid m => (a -> m) -> Matrix ns a -> m Source #

foldr :: (a -> b -> b) -> b -> Matrix ns a -> b Source #

foldr' :: (a -> b -> b) -> b -> Matrix ns a -> b Source #

foldl :: (b -> a -> b) -> b -> Matrix ns a -> b Source #

foldl' :: (b -> a -> b) -> b -> Matrix ns a -> b Source #

foldr1 :: (a -> a -> a) -> Matrix ns a -> a Source #

foldl1 :: (a -> a -> a) -> Matrix ns a -> a Source #

toList :: Matrix ns a -> [a] Source #

null :: Matrix ns a -> Bool Source #

length :: Matrix ns a -> Int Source #

elem :: Eq a => a -> Matrix ns a -> Bool Source #

maximum :: Ord a => Matrix ns a -> a Source #

minimum :: Ord a => Matrix ns a -> a Source #

sum :: Num a => Matrix ns a -> a Source #

product :: Num a => Matrix ns a -> a Source #

SingI ns => Distributive (Matrix ns) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

distribute :: Functor f => f (Matrix ns a) -> Matrix ns (f a) Source #

collect :: Functor f => (a -> Matrix ns b) -> f a -> Matrix ns (f b) Source #

distributeM :: Monad m => m (Matrix ns a) -> Matrix ns (m a) Source #

collectM :: Monad m => (a -> Matrix ns b) -> m a -> Matrix ns (m b) Source #

SingI ns => Representable (Matrix ns) Source # 
Instance details

Defined in Termonad.Config.Vec

Associated Types

type Rep (Matrix ns) :: Type Source #

Methods

tabulate :: (Rep (Matrix ns) -> a) -> Matrix ns a Source #

index :: Matrix ns a -> Rep (Matrix ns) -> a Source #

Eq (MatrixTF ns a) => Eq (Matrix ns a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(==) :: Matrix ns a -> Matrix ns a -> Bool Source #

(/=) :: Matrix ns a -> Matrix ns a -> Bool Source #

Num a => Num (Matrix ([] :: [Peano]) a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

(+) :: Matrix [] a -> Matrix [] a -> Matrix [] a Source #

(-) :: Matrix [] a -> Matrix [] a -> Matrix [] a Source #

(*) :: Matrix [] a -> Matrix [] a -> Matrix [] a Source #

negate :: Matrix [] a -> Matrix [] a Source #

abs :: Matrix [] a -> Matrix [] a Source #

signum :: Matrix [] a -> Matrix [] a Source #

fromInteger :: Integer -> Matrix [] a Source #

Ord (MatrixTF ns a) => Ord (Matrix ns a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

compare :: Matrix ns a -> Matrix ns a -> Ordering Source #

(<) :: Matrix ns a -> Matrix ns a -> Bool Source #

(<=) :: Matrix ns a -> Matrix ns a -> Bool Source #

(>) :: Matrix ns a -> Matrix ns a -> Bool Source #

(>=) :: Matrix ns a -> Matrix ns a -> Bool Source #

max :: Matrix ns a -> Matrix ns a -> Matrix ns a Source #

min :: Matrix ns a -> Matrix ns a -> Matrix ns a Source #

Show (MatrixTF ns a) => Show (Matrix ns a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

showsPrec :: Int -> Matrix ns a -> ShowS Source #

show :: Matrix ns a -> String Source #

showList :: [Matrix ns a] -> ShowS Source #

SingI ns => MonoFoldable (Matrix ns a) Source # 
Instance details

Defined in Termonad.Config.Vec

Methods

ofoldMap :: Monoid m => (Element (Matrix ns a) -> m) -> Matrix ns a -> m Source #

ofoldr :: (Element (Matrix ns a) -> b -> b) -> b -> Matrix ns a -> b Source #

ofoldl' :: (a0 -> Element (Matrix ns a) -> a0) -> a0 -> Matrix ns a -> a0 Source #

otoList :: Matrix ns a -> [Element (Matrix ns a)] Source #

oall :: (Element (Matrix ns a) -> Bool) -> Matrix ns a -> Bool Source #

oany :: (Element (Matrix ns a) -> Bool) -> Matrix ns a -> Bool Source #

onull :: Matrix ns a -> Bool Source #

olength :: Matrix ns a -> Int Source #

olength64 :: Matrix ns a -> Int64 Source #

ocompareLength :: Integral i => Matrix ns a -> i -> Ordering Source #

otraverse_ :: Applicative f => (Element (Matrix ns a) -> f b) -> Matrix ns a -> f () Source #

ofor_ :: Applicative f => Matrix ns a -> (Element (Matrix ns a) -> f b) -> f () Source #

omapM_ :: Applicative m => (Element (Matrix ns a) -> m ()) -> Matrix ns a -> m () Source #

oforM_ :: Applicative m => Matrix ns a -> (Element (Matrix ns a) -> m ()) -> m () Source #

ofoldlM :: Monad m => (a0 -> Element (Matrix ns a) -> m a0) -> a0 -> Matrix ns a -> m a0 Source #

ofoldMap1Ex :: Semigroup m => (Element (Matrix ns a) -> m) -> Matrix ns a -> m Source #

ofoldr1Ex :: (Element (Matrix ns a) -> Element (Matrix ns a) -> Element (Matrix ns a)) -> Matrix ns a -> Element (Matrix ns a) Source #

ofoldl1Ex' :: (Element (Matrix ns a) -> Element (Matrix ns a) -> Element (Matrix ns a)) -> Matrix ns a -> Element (Matrix ns a) Source #

headEx :: Matrix ns a -> Element (Matrix ns a) Source #

lastEx :: Matrix ns a -> Element (Matrix ns a) Source #

unsafeHead :: Matrix ns a -> Element (Matrix ns a) Source #

unsafeLast :: Matrix ns a -> Element (Matrix ns a) Source #

maximumByEx :: (Element (Matrix ns a) -> Element (Matrix ns a) -> Ordering) -> Matrix ns a -> Element (Matrix ns a) Source #

minimumByEx :: (Element (Matrix ns a) -> Element (Matrix ns a) -> Ordering) -> Matrix ns a -> Element (Matrix ns a) Source #

oelem :: Element (Matrix ns a) -> Matrix ns a -> Bool Source #

onotElem :: Element (Matrix ns a) -> Matrix ns a -> Bool Source #

type Rep (Matrix ns) Source # 
Instance details

Defined in Termonad.Config.Vec

type Rep (Matrix ns) = HList Fin ns
type Element (Matrix ns a) Source # 
Instance details

Defined in Termonad.Config.Vec

type Element (Matrix ns a) = a

type MatrixTFSym2 (ns :: [Peano]) (t :: Type) = (MatrixTF ns t :: Type) Source #

data MatrixTFSym1 (ns :: [Peano]) (z :: TyFun Type Type) Source #

Instances
type Apply (MatrixTFSym1 l1 :: TyFun Type Type -> Type) (l2 :: Type) Source # 
Instance details

Defined in Termonad.Config.Vec

type Apply (MatrixTFSym1 l1 :: TyFun Type Type -> Type) (l2 :: Type) = MatrixTF l1 l2

data MatrixTFSym0 (l :: TyFun [Peano] (Type ~> Type)) Source #

Instances
type Apply MatrixTFSym0 (l :: [Peano]) Source # 
Instance details

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 #

consMatrix :: Matrix ns a -> Matrix (n ': ns) a -> Matrix (S n ': ns) a 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 #

genMatrix_ :: SingI ns => (HList Fin ns -> a) -> Matrix ns a Source #

indexMatrix :: HList Fin ns -> Matrix ns a -> a Source #

imapMatrix :: forall (ns :: [Peano]) a b. Sing ns -> (HList Fin ns -> a -> b) -> Matrix ns a -> Matrix ns b Source #

imapMatrix_ :: SingI ns => (HList Fin ns -> a -> b) -> Matrix ns a -> Matrix ns b Source #

onMatrixTF :: (MatrixTF ns a -> MatrixTF ms b) -> Matrix ns a -> Matrix ms b Source #

onMatrix :: (Matrix ns a -> Matrix ms b) -> MatrixTF ns a -> MatrixTF ms b Source #

updateAtMatrix :: HList Fin ns -> (a -> a) -> Matrix ns a -> Matrix ns a Source #

setAtMatrix :: HList Fin ns -> a -> Matrix ns a -> Matrix ns a Source #