packages feed

type-unary 0.2.2 → 0.2.3

raw patch · 2 files changed

+14/−5 lines, 2 files

Files

src/TypeUnary/Vec.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE TypeFamilies, EmptyDataDecls, TypeOperators-           , GADTs, KindSignatures+           , GADTs, KindSignatures, TupleSections            , FlexibleInstances, FlexibleContexts            , UndecidableInstances            , ScopedTypeVariables, CPP@@ -35,6 +35,7 @@   , flattenV, swizzle, split, deleteV, elemsV   , zipV , zipWithV , unzipV   , zipV3, zipWithV3, unzipV3+  , cross   , ToVec(..)   ) where @@ -568,6 +569,10 @@ unzipV3 ((a,b,c) :< ps) = (a :< as, b :< bs, c :< cs)    where (as,bs,cs) = unzipV3 ps +-- | Cross-product of two vectors, in the set-theory sense, not the geometric+-- sense. You can 'flattenV' the resulting vector of vectors.+cross :: Vec m a -> Vec n b -> Vec m (Vec n (a,b))+cross as bs = (\ a -> (a,) <$> bs) <$> as  {--------------------------------------------------------------------     Conversion to vectors
type-unary.cabal view
@@ -1,21 +1,25 @@ Name:                type-unary-Version:             0.2.2-Cabal-Version:       >= 1.2+Version:             0.2.3+Cabal-Version:       >= 1.6 Synopsis:               Type-level and typed unary natural numbers, inequality proofs, vectors Category:            Data Description:   Type-level and value-typed unary natural numbers, inequality proofs,   and length-typed vectors. There are probably many of these packages.-  Perhaps consolidate. This one is extracted from Shady.+  Perhaps consolidate. Author:              Conal Elliott Maintainer:          conal@conal.net Homepage:            https://github.com/conal/type-unary Copyright:           (c) 2009-2012 by Conal Elliott License:             BSD3 License-File:        COPYING-Stability:           experimental+Stability:           provisional build-type:          Simple++source-repository head+  type:     git+  location: git://github.com/conal/type-unary  Library   hs-Source-Dirs:      src