| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.Unrestricted.Internal.Dupable
Contents
Dupable
class Consumable a => Dupable a where Source #
The laws of Dupable are dual to those of Monoid:
first consume (dup2 a) ≃ a ≃ second consume (dup2 a)(neutrality)first dup2 (dup2 a) ≃ (second dup2 (dup2 a))(associativity)
Where the (≃) sign represents equality up to type isomorphism.
When implementing Dupable instances for composite types, using dupV
should be more convenient since V has a zipping Applicative instance.
Instances
| Dupable Bool Source # | |
| Dupable Char Source # | |
| Dupable Double Source # | |
| Dupable Int Source # | |
| Dupable Ordering Source # | |
| Dupable () Source # | |
| Dupable Any Source # | |
| Dupable All Source # | |
| Dupable Pool Source # | |
| Dupable a => Dupable [a] Source # | |
| Dupable a => Dupable (Maybe a) Source # | |
| Dupable a => Dupable (Sum a) Source # | |
| Dupable a => Dupable (Product a) Source # | |
| Dupable a => Dupable (NonEmpty a) Source # | |
| Dupable (Ur a) Source # | |
| Dupable (Array a) Source # | |
| Dupable (Vector a) Source # | |
| Dupable (Set a) Source # | |
| (Dupable a, Dupable b) => Dupable (Either a b) Source # | |
| (Dupable a, Dupable b) => Dupable (a, b) Source # | |
| Dupable (HashMap k v) Source # | |
| (Dupable a, Dupable b, Dupable c) => Dupable (a, b, c) Source # | |