Permalink
Browse files

_Empty Storable.Vector and Unboxed.Vector

  • Loading branch information...
1 parent c4c1277 commit 4f5ad23659c3a354c2f15966cb474eb8701a9ffa @ekmett committed Mar 29, 2013
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/Control/Lens/Prism.hs
View
@@ -62,6 +62,8 @@ import Data.Monoid
import Data.Profunctor
import Data.Set as Set
import Data.Vector as Vector
+import Data.Vector.Unboxed as Unboxed
+import Data.Vector.Storable as Storable
import Data.Void
#ifndef SAFE
import Unsafe.Coerce
@@ -390,6 +392,14 @@ instance AsEmpty IntSet where
_Empty = nearly IntSet.empty IntSet.null
{-# INLINE _Empty #-}
-instance AsEmpty (Vector a) where
+instance AsEmpty (Vector.Vector a) where
_Empty = nearly Vector.empty Vector.null
{-# INLINE _Empty #-}
+
+instance Unbox a => AsEmpty (Unboxed.Vector a) where
+ _Empty = nearly Unboxed.empty Unboxed.null
+ {-# INLINE _Empty #-}
+
+instance Storable a => AsEmpty (Storable.Vector a) where
+ _Empty = nearly Storable.empty Storable.null
+ {-# INLINE _Empty #-}

0 comments on commit 4f5ad23

Please sign in to comment.