WeakSets-1.6.0.0: Simple set types. Useful to create sets of arbitrary types and nested sets.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Simplifiable

Description

and WeakMaps where duplicate elements remain in the container until the end of the lifetime of the container. Calling simplify on them will remove duplicate elements. Copyright : Guillaume Sabbagh 2022 License : LGPL-3.0-or-later Maintainer : guillaumesabbagh@protonmail.com Stability : experimental Portability : portable

A container may be simplified internally by the call of a function simplify. This is the case for WeakSets and WeakMaps where duplicate elements remain in the container until the end of the lifetime of the container. Calling simplify on them will remove duplicate elements.

Synopsis

Documentation

class Simplifiable a where Source #

A container may be simplified internally by the call of a function simplify. This is the case for WeakSets and WeakMaps where duplicate elements remain in the container until the end of the lifetime of the container. Calling --simplify on them will remove duplicate elements.

Methods

simplify :: a -> a Source #

A function to simplify a container recursively.

Instances

Instances details
Simplifiable Natural Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Natural -> Natural Source #

Simplifiable Bool Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Bool -> Bool Source #

Simplifiable Char Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Char -> Char Source #

Simplifiable Double Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Double -> Double Source #

Simplifiable Float Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Float -> Float Source #

Simplifiable Int Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Int -> Int Source #

(Simplifiable a, Eq a) => Simplifiable (Set a) Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Set a -> Set a Source #

Simplifiable a => Simplifiable (Maybe a) Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Maybe a -> Maybe a Source #

Simplifiable a => Simplifiable [a] Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: [a] -> [a] Source #

(Simplifiable k, Simplifiable v, Eq k) => Simplifiable (Map k v) Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Map k v -> Map k v Source #

(Simplifiable a, Simplifiable b) => Simplifiable (Either a b) Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: Either a b -> Either a b Source #

(Simplifiable a, Simplifiable b) => Simplifiable (a, b) Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: (a, b) -> (a, b) Source #

(Simplifiable a, Simplifiable b, Simplifiable c) => Simplifiable (a, b, c) Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: (a, b, c) -> (a, b, c) Source #

(Simplifiable a, Simplifiable b, Simplifiable c, Simplifiable d) => Simplifiable (a, b, c, d) Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: (a, b, c, d) -> (a, b, c, d) Source #

(Simplifiable a, Simplifiable b, Simplifiable c, Simplifiable d, Simplifiable e) => Simplifiable (a, b, c, d, e) Source # 
Instance details

Defined in Data.Simplifiable

Methods

simplify :: (a, b, c, d, e) -> (a, b, c, d, e) Source #