Commits

Aleksey Khudyakov committed d516788

Bump version

Comments (0)

Files changed (2)

Data/Vector/Fixed/Internal/Id.hs

     Id(..)
   ) where
 
+import Control.Applicative (Applicative(..))
+
+
 -- | Strict identity monad
 newtype Id a = Id { runID :: a }
 
+instance Functor Id where
+  fmap f (Id a) = Id (f a)
+  {-# INLINE fmap #-}
+
+instance Applicative Id where
+  pure          = Id
+  Id f <*> Id a = Id (f a)
+  {-# INLINE pure  #-}
+  {-# INLINE (<*>) #-}
+
 instance Monad Id where
   return     = Id
   Id a >>= f = f a

fixed-vector.cabal

 Name:           fixed-vector
-Version:        0.4.3.0
+Version:        0.4.4.0
 Synopsis:       Generic vectors with statically known size.
 Description:
   Generic library for vectors with statically known
   [@Data.Vector.Fixed.Monomorphic@]
   Wrappers for monomorphic vectors
   .
+  Changes in 0.4.4.0
+  .
+  * Functor and Applicative instances are added to Id.
+  .
   Changes in 0.4.3.0
   .
   * Typeable instance for @S@ and @Z@ added.