Copyright | Kazuki Okamoto |
---|---|
License | see LICENSE |
Maintainer | kazuki.okamoto@kakkun61.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Extensions |
|
Homotuples, whoes items are the same type or which are lists with type-level length.
Synopsis
- type family Homotuple (n :: Nat) (a :: Type) = (t :: Type) | t -> n
- replicate :: forall (n :: Nat) a. (IsHomolisttuple n a, IsHomotupleItem n a, KnownNat n) => a -> Homotuple n a
- (<$>) :: (IsHomolisttuple n a, IsHomolisttuple n b, IsHomotupleItem n a, IsHomotupleItem n b) => (a -> b) -> Homotuple n a -> Homotuple n b
- (<*>) :: (IsHomolisttuple n0 (a -> b), IsHomolisttuple n1 a, IsHomolisttuple (n0 * n1) b, IsHomotupleItem n0 (a -> b), IsHomotupleItem n1 a, IsHomotupleItem (n0 * n1) b) => Homotuple n0 (a -> b) -> Homotuple n1 a -> Homotuple (n0 * n1) b
- pure :: Single c => a -> c a
- (>>=) :: (IsHomolisttuple n0 a, IsHomolisttuple n1 b, IsHomolisttuple (n0 * n1) b, IsHomotupleItem n0 a, IsHomotupleItem n1 b, IsHomotupleItem (n0 * n1) b) => Homotuple n0 a -> (a -> Homotuple n1 b) -> Homotuple (n0 * n1) b
- (<>) :: (IsHomolisttuple n0 a, IsHomolisttuple n1 a, IsHomolisttuple (n0 + n1) a, IsHomotupleItem n0 a, IsHomotupleItem n1 a, IsHomotupleItem (n0 + n1) a) => Homotuple n0 a -> Homotuple n1 a -> Homotuple (n0 + n1) a
- pattern Empty :: Homotuple 0 a
- type IsHomolisttuple (n :: Nat) a = IsList (Homotuple n a)
- type IsHomotupleItem (n :: Nat) a = a ~ Item (Homotuple n a)
- errorLengthMismatch :: HasCallStack => a
Documentation
type family Homotuple (n :: Nat) (a :: Type) = (t :: Type) | t -> n Source #
Instances
type Homotuple 0 a Source # | |
Defined in Data.Tuple.Homotuple | |
type Homotuple 1 a Source # | |
Defined in Data.Tuple.Homotuple.Identity | |
type Homotuple 1 a Source # | |
Defined in Data.Tuple.Homotuple.OneTuple | |
type Homotuple 1 a Source # | |
Defined in Data.Tuple.Homotuple.Only | |
type Homotuple 2 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 2 a = (a, a) | |
type Homotuple 3 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 3 a = (a, a, a) | |
type Homotuple 4 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 4 a = (a, a, a, a) | |
type Homotuple 5 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 5 a = (a, a, a, a, a) | |
type Homotuple 6 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 6 a = (a, a, a, a, a, a) | |
type Homotuple 7 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 7 a = (a, a, a, a, a, a, a) | |
type Homotuple 8 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 8 a = (a, a, a, a, a, a, a, a) | |
type Homotuple 9 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 9 a = (a, a, a, a, a, a, a, a, a) | |
type Homotuple 10 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 10 a = (a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 11 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 11 a = (a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 12 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 12 a = (a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 13 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 13 a = (a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 14 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 14 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 15 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 15 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 16 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 16 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 17 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 17 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 18 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 18 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 19 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 19 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 20 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 20 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 21 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 21 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 22 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 22 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 23 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 23 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 24 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 24 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 25 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 25 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 26 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 26 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 27 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 27 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 28 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 28 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 29 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 29 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 30 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 30 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 31 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 31 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 32 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 32 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 33 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 33 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 34 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 34 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 35 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 35 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 36 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 36 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 37 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 37 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 38 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 38 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 39 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 39 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 40 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 40 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 41 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 41 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 42 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 42 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 43 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 43 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 44 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 44 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 45 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 45 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 46 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 46 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 47 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 47 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 48 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 48 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 49 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 49 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 50 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 50 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 51 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 51 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 52 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 52 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 53 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 53 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 54 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 54 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 55 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 55 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 56 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 56 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 57 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 57 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 58 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 58 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 59 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 59 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 60 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 60 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 61 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 61 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) | |
type Homotuple 62 a Source # | |
Defined in Data.Tuple.Homotuple type Homotuple 62 a = (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) |
List-like
replicate :: forall (n :: Nat) a. (IsHomolisttuple n a, IsHomotupleItem n a, KnownNat n) => a -> Homotuple n a Source #
Functor-like
(<$>) :: (IsHomolisttuple n a, IsHomolisttuple n b, IsHomotupleItem n a, IsHomotupleItem n b) => (a -> b) -> Homotuple n a -> Homotuple n b Source #
Applicative-like
(<*>) :: (IsHomolisttuple n0 (a -> b), IsHomolisttuple n1 a, IsHomolisttuple (n0 * n1) b, IsHomotupleItem n0 (a -> b), IsHomotupleItem n1 a, IsHomotupleItem (n0 * n1) b) => Homotuple n0 (a -> b) -> Homotuple n1 a -> Homotuple (n0 * n1) b Source #
Monad-like
(>>=) :: (IsHomolisttuple n0 a, IsHomolisttuple n1 b, IsHomolisttuple (n0 * n1) b, IsHomotupleItem n0 a, IsHomotupleItem n1 b, IsHomotupleItem (n0 * n1) b) => Homotuple n0 a -> (a -> Homotuple n1 b) -> Homotuple (n0 * n1) b Source #
Semigoupe-like
(<>) :: (IsHomolisttuple n0 a, IsHomolisttuple n1 a, IsHomolisttuple (n0 + n1) a, IsHomotupleItem n0 a, IsHomotupleItem n1 a, IsHomotupleItem (n0 + n1) a) => Homotuple n0 a -> Homotuple n1 a -> Homotuple (n0 + n1) a infixr 6 Source #
Monoid-like
Utility constraints
For implementers
errorLengthMismatch :: HasCallStack => a Source #
Orphan instances
IsList (a, a) Source # | |
IsList (Proxy a) Source # | |
IsList (a, a, a) Source # | |
IsList (a, a, a, a) Source # | |
IsList (a, a, a, a, a) Source # | |
IsList (a, a, a, a, a, a) Source # | |
IsList (a, a, a, a, a, a, a) Source # | |
IsList (a, a, a, a, a, a, a, a) Source # | |
IsList (a, a, a, a, a, a, a, a, a) Source # | |
IsList (a, a, a, a, a, a, a, a, a, a) Source # | |
IsList (a, a, a, a, a, a, a, a, a, a, a) Source # | |
IsList (a, a, a, a, a, a, a, a, a, a, a, a) Source # | |
IsList (a, a, a, a, a, a, a, a, a, a, a, a, a) Source # | |
fromList :: [Item (a, a, a, a, a, a, a, a, a, a, a, a, a)] -> (a, a, a, a, a, a, a, a, a, a, a, a, a) # fromListN :: Int -> [Item (a, a, a, a, a, a, a, a, a, a, a, a, a)] -> (a, a, a, a, a, a, a, a, a, a, a, a, a) # toList :: (a, a, a, a, a, a, a, a, a, a, a, a, a) -> [Item (a, a, a, a, a, a, a, a, a, a, a, a, a)] # | |
IsList (a, a, a, a, a, a, a, a, a, a, a, a, a, a) Source # | |
fromList :: [Item (a, a, a, a, a, a, a, a, a, a, a, a, a, a)] -> (a, a, a, a, a, a, a, a, a, a, a, a, a, a) # fromListN :: Int -> [Item (a, a, a, a, a, a, a, a, a, a, a, a, a, a)] -> (a, a, a, a, a, a, a, a, a, a, a, a, a, a) # toList :: (a, a, a, a, a, a, a, a, a, a, a, a, a, a) -> [Item (a, a, a, a, a, a, a, a, a, a, a, a, a, a)] # | |
IsList (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) Source # | |
fromList :: [Item (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a)] -> (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) # fromListN :: Int -> [Item (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a)] -> (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) # toList :: (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) -> [Item (a, a, a, a, a, a, a, a, a, a, a, a, a, a, a)] # |