Safe Haskell | None |
---|---|
Language | Haskell2010 |
Optics.Empty.Core
Description
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
.
Minimal complete definition
Nothing