packages feed

type-combinators 0.2.4.2 → 0.2.4.3

raw patch · 3 files changed

+19/−1 lines, 3 files

Files

src/Data/Type/Product.hs view
@@ -242,6 +242,15 @@   Ø     -> pure Ø   x:<xs -> (:<) <$> index x <*> select xs +indices :: forall as. Known Length as => Prod (Index as) as+indices = indices' known++indices' :: Length as -> Prod (Index as) as+indices' = \case+  LZ   -> Ø+  LS l -> IZ :< map1 IS (indices' l)++ instance Functor1 Prod where   map1 f = \case     Ø -> Ø
src/Data/Type/Vector.hs view
@@ -60,6 +60,10 @@   (:*) :: !(f a) -> !(VecT n f a) -> VecT (S n) f a infixr 4 :* +(*:) :: f a -> f a -> VecT (S (S Z)) f a+a *: b = a :* b :* ØV+infix 5 *:+ elimVecT :: p Z        -> (forall x. f a -> p x -> p (S x))        -> VecT n f a@@ -75,9 +79,14 @@ elimV z s = elimVecT z $ s . getI  type Vec n = VecT n I+ pattern (:+) :: a -> Vec n a -> Vec (S n) a pattern a :+ as = I a :* as infixr 4 :+++(+:) :: a -> a -> Vec (S (S Z)) a+a +: b = a :+ b :+ ØV+infix 5 +:  deriving instance Eq   (f a) => Eq   (VecT n f a) deriving instance Ord  (f a) => Ord  (VecT n f a)
type-combinators.cabal view
@@ -1,5 +1,5 @@ name: type-combinators-version: 0.2.4.2+version: 0.2.4.3 category: Data synopsis: A collection of data types for type-level programming cabal-version: >=1.10