Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a couple of _Empty examples

  • Loading branch information...
commit eeeb9810e67af9419361d541380cf133a0336ee7 1 parent 67f1846
@ekmett authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/Control/Lens/Prism.hs
View
7 src/Control/Lens/Prism.hs
@@ -172,6 +172,9 @@ without k = case runPrism k of
--
-- >>> isn't _Left (Left 12)
-- False
+--
+-- >>> isn't _Empty []
+-- False
isn't :: APrism s t a b -> s -> Bool
isn't k s = case runPrism k of
Market _ seta -> case seta s of
@@ -309,6 +312,10 @@ nearly a p = prism' (\() -> a) $ guard . p
{-# INLINE nearly #-}
class AsEmpty a where
+ -- |
+ --
+ -- >>> isn't _Empty [1,2,3]
+ -- True
_Empty :: Prism' a ()
#ifndef HLINT
#ifdef DEFAULT_SIGNATURES
Please sign in to comment.
Something went wrong with that request. Please try again.