fixed-vector 0.5.0.0 → 0.5.1.0
raw patch · 3 files changed
+24/−1 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.Vector.Fixed: Empty :: Empty a
+ Data.Vector.Fixed: data Empty a
+ Data.Vector.Fixed: instance Data a => Data (Empty a)
+ Data.Vector.Fixed: instance Foldable Empty
+ Data.Vector.Fixed: instance Functor Empty
+ Data.Vector.Fixed: instance Traversable Empty
+ Data.Vector.Fixed: instance Typeable1 Empty
+ Data.Vector.Fixed: instance Vector Empty a
+ Data.Vector.Fixed: mk0 :: (Vector v a, Dim v ~ Z) => v a
Files
- Data/Vector/Fixed.hs +20/−0
- Data/Vector/Fixed/Internal.hs +3/−0
- fixed-vector.cabal +1/−1
Data/Vector/Fixed.hs view
@@ -34,6 +34,7 @@ -- $construction -- ** Small dimensions -- $smallDim+ , mk0 , mk1 , mk2 , mk3@@ -114,6 +115,7 @@ -- * Data types , VecList(..) , Only(..)+ , Empty(..) -- ** Tuple synonyms , Tuple2 , Tuple3@@ -272,6 +274,24 @@ {-# INLINE construct #-} {-# INLINE inspect #-} +-- | Empty tuple.+data Empty a = Empty deriving (Typeable, Data)++instance Functor Empty where+ fmap _ Empty = Empty+instance F.Foldable Empty where+ foldr = foldr+instance T.Traversable Empty where+ sequenceA Empty = pure Empty+ traverse _ Empty = pure Empty++type instance Dim Empty = Z++instance Vector Empty a where+ construct = Fun Empty+ inspect _ (Fun b) = b+ {-# INLINE construct #-}+ {-# INLINE inspect #-} type Tuple2 a = (a,a) type Tuple3 a = (a,a,a)
Data/Vector/Fixed/Internal.hs view
@@ -64,6 +64,9 @@ infixr 1 <| +mk0 :: (Vector v a, Dim v ~ C.Z) => v a+mk0 = vector $ C.empty+{-# INLINE mk0 #-} mk1 :: (Vector v a, Dim v ~ C.N1) => a -> v a mk1 a1 = vector $ C.mk1 a1
fixed-vector.cabal view
@@ -1,5 +1,5 @@ Name: fixed-vector-Version: 0.5.0.0+Version: 0.5.1.0 Synopsis: Generic vectors with statically known size. Description: Generic library for vectors with statically known