about summary refs log tree commit diff
path: root/users/glittershark/xanthous/src/Xanthous/Data
diff options
context:
space:
mode:
Diffstat (limited to 'users/glittershark/xanthous/src/Xanthous/Data')
-rw-r--r--users/glittershark/xanthous/src/Xanthous/Data/VectorBag.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/users/glittershark/xanthous/src/Xanthous/Data/VectorBag.hs b/users/glittershark/xanthous/src/Xanthous/Data/VectorBag.hs
index bd9af369e01c..2e6d48062a45 100644
--- a/users/glittershark/xanthous/src/Xanthous/Data/VectorBag.hs
+++ b/users/glittershark/xanthous/src/Xanthous/Data/VectorBag.hs
@@ -35,6 +35,7 @@ newtype VectorBag a = VectorBag (Vector a)
     , Semigroup
     , Arbitrary
     , CoArbitrary
+    , Filterable
     )
 makeWrapped ''VectorBag
 
@@ -59,6 +60,11 @@ instance AsEmpty (VectorBag a) where
     (VectorBag Empty) -> Just ()
     _ -> Nothing
 
+instance Witherable VectorBag where
+  wither f (VectorBag v) = VectorBag <$> wither f v
+  witherM f (VectorBag v) = VectorBag <$> witherM f v
+  filterA p (VectorBag v) = VectorBag <$> filterA p v
+
 {-
     TODO:
     , Ixed