Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines the
AsEmpty
class, which provides a
Prism
for a type
that may be
_Empty
.
Note that orphan instances for this class are defined in the
Optics.Empty
module from
optics-extra
, so if you are not simply depending on
optics
you may wish to import that module instead.
>>>
isn't _Empty [1,2,3]
True
>>>
case Nothing of { Empty -> True; _ -> False }
True
Documentation
class AsEmpty a where Source #
Class for types that may be
_Empty
.
Nothing
Instances
AsEmpty Ordering Source # | |
AsEmpty () Source # | |
Defined in Optics.Empty.Core |
|
AsEmpty Event Source # | |
AsEmpty All Source # | |
AsEmpty Any Source # | |
AsEmpty IntSet Source # | |
AsEmpty [a] Source # | |
Defined in Optics.Empty.Core |
|
AsEmpty ( Maybe a) Source # | |
AsEmpty ( ZipList a) Source # | |
AsEmpty ( First a) Source # | |
AsEmpty ( Last a) Source # | |
AsEmpty a => AsEmpty ( Dual a) Source # | |
( Eq a, Num a) => AsEmpty ( Sum a) Source # | |
( Eq a, Num a) => AsEmpty ( Product a) Source # | |
AsEmpty ( IntMap a) Source # | |
AsEmpty ( Seq a) Source # | |
AsEmpty ( Set a) Source # | |
( AsEmpty a, AsEmpty b) => AsEmpty (a, b) Source # | |
Defined in Optics.Empty.Core |
|
AsEmpty ( Map k a) Source # | |
( AsEmpty a, AsEmpty b, AsEmpty c) => AsEmpty (a, b, c) Source # | |
Defined in Optics.Empty.Core |