| Copyright | (c) M1n3c4rt 2025 |
|---|---|
| License | BSD-3-Clause |
| Maintainer | vedicbits@gmail.com |
| Stability | stable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Utility.AOC
Description
Synopsis
- shortestDistance :: (Foldable t, Hashable n, Ord a, Num a) => HashMap n (t (n, a)) -> n -> n -> Maybe a
- shortestPaths :: (Foldable t, Hashable n, Ord a, Num a) => HashMap n (t (n, a)) -> n -> n -> (Maybe a, [[n]])
- shortestDistanceWith :: (Foldable t, Hashable n, Ord a, Num a) => (n -> t (n, a)) -> n -> n -> Maybe a
- shortestPathsWith :: (Foldable t, Hashable n, Ord a, Num a) => (n -> t (n, a)) -> n -> n -> (Maybe a, [[n]])
- neighbours4 :: (Num a, Num b) => (a, b) -> [(a, b)]
- neighbours8 :: (Eq a, Eq b, Num a, Num b) => (a, b) -> [(a, b)]
- neighbours6 :: (Num a, Num b, Num c) => (a, b, c) -> [(a, b, c)]
- neighbours26 :: (Eq a, Eq b, Eq c, Num a, Num b, Num c) => (a, b, c) -> [(a, b, c)]
- taxicab2 :: Num a => (a, a) -> (a, a) -> a
- taxicab3 :: Num a => (a, a, a) -> (a, a, a) -> a
- taxicab :: Num a => [a] -> [a] -> a
- enumerate' :: (Num y, Num x) => String -> [((x, y), Char)]
- enumerateRead' :: (Read c, Num y, Num x) => String -> [((x, y), c)]
- enumerate :: (Num y, Num x) => String -> [(x, y, Char)]
- enumerateRead :: (Read c, Num y, Num x) => String -> [(x, y, c)]
- enumerateHM :: (Num x, Num y, Enum x, Enum y, Hashable x, Hashable y) => String -> HashMap (x, y) Char
- enumerateReadHM :: (Num x, Num y, Enum x, Enum y, Hashable x, Hashable y, Read c) => String -> HashMap (x, y) c
- enumerateFilter :: (Num y, Num x) => (Char -> Bool) -> String -> [(x, y)]
- enumerateFilterSet :: (Ord x, Ord y, Num y, Num x) => (Char -> Bool) -> String -> Set (x, y)
- numbers :: (Num a, Read a) => String -> [a]
- numbers' :: (Num a, Read a) => String -> [a]
- binToDec :: Num a => [Bool] -> a
- floodFill :: Ord a => (a -> [a]) -> Set a -> Set a -> Set a
- floodFillWith :: Ord a => (a -> a -> Bool) -> (a -> [a]) -> Set a -> Set a
- choose :: (Num n, Ord n) => n -> [a] -> [[a]]
- permute :: (Num n, Ord n) => n -> [a] -> [[a]]
- takeEvery :: Int -> [a] -> [a]
- chunk :: Int -> [a] -> [[a]]
- extrapolate :: (Integral b, Ord a) => b -> [a] -> a
- prettyPrintSet :: (Enum b, Enum a, Ord a, Ord b) => Set (a, b) -> String
- prettyPrintSetWide :: (Enum b, Enum a, Ord a, Ord b) => Set (a, b) -> String
- prettyPrintHM :: (Enum b, Enum a, Hashable a, Hashable b, Ord a, Ord b) => HashMap (a, b) Char -> String
- prettyPrintHMWide :: (Enum b, Enum a, Hashable a, Hashable b, Ord a, Ord b) => HashMap (a, b) Char -> String
- traceSleep :: Int -> a -> a
- traceSleepSeconds :: Int -> a -> a
- memo2 :: (Ord a, Ord b) => (a -> b -> c) -> a -> b -> c
- memo3 :: (Ord a, Ord b, Ord c) => (a -> b -> c -> d) -> a -> b -> c -> d
- memo4 :: (Ord a, Ord b, Ord c, Ord d) => (a -> b -> c -> d -> e) -> a -> b -> c -> d -> e
- range :: (Ord a, Enum a) => a -> a -> [a]
- rangeIntersect :: Ord b => (b, b) -> (b, b) -> Maybe (b, b)
- rangeSubtract :: (Ord a, Num a) => (a, a) -> (a, a) -> [(a, a)]
- data ComplexL1 a = a :+ a
- realPart :: ComplexL1 a -> a
- imagPart :: ComplexL1 a -> a
- conjugate :: Num a => ComplexL1 a -> ComplexL1 a
- magnitude :: Num a => ComplexL1 a -> a
- displayPoints :: Integral a => [(a, a)] -> IO ()
- displayPolygon :: Integral a => [(a, a)] -> IO ()
- displayPolygons :: Integral a => [[(a, a)]] -> IO ()
- displayGraphDirected :: (Hashable n, Foldable t) => HashMap n (t n) -> IO ()
- displayGraphUndirected :: (Hashable n, Foldable t) => HashMap n (t n) -> IO ()
- class Eq a => Hashable a
- data HashMap k v
- data Set a
Pathfinding algorithms
All of the following functions return distances as a Maybe Int, where Nothing is returned if no path is found.
The graph is a HashMap mapping each node to a sequence of (neighbour, edge weight) pairs.
Functions that take a graph assume that any neighbour that a node in the graph points to is also in the graph.
Arguments
| :: (Foldable t, Hashable n, Ord a, Num a) | |
| => HashMap n (t (n, a)) | Graph |
| -> n | Start node |
| -> n | End node |
| -> Maybe a |
Returns the shortest distance between two nodes in a graph.
Arguments
| :: (Foldable t, Hashable n, Ord a, Num a) | |
| => HashMap n (t (n, a)) | Graph |
| -> n | Start node |
| -> n | End node |
| -> (Maybe a, [[n]]) |
Returns the shortest distance between two nodes in a graph and a list of all possible paths from the ending node to the starting node.
The starting node is not included in each path.
Arguments
| :: (Foldable t, Hashable n, Ord a, Num a) | |
| => (n -> t (n, a)) | Function to generate neighbours |
| -> n | Start node |
| -> n | End node |
| -> Maybe a |
Given a function that takes a node and returns a sequence of (neighbour,edge weight) pairs, returns the shortest distance between two nodes.
Arguments
| :: (Foldable t, Hashable n, Ord a, Num a) | |
| => (n -> t (n, a)) | Function to generate neighbours |
| -> n | Start node |
| -> n | End node |
| -> (Maybe a, [[n]]) |
Given a function that takes a node and returns a sequence of (neighbour,edge weight) pairs, returns the shortest distance between two nodes and a list of all possible paths from the ending node to the starting node.
The starting node is not included in each path.
Neighbour functions
neighbours4 :: (Num a, Num b) => (a, b) -> [(a, b)] Source #
Returns the 4 points orthogonally adjacent to the given point.
neighbours8 :: (Eq a, Eq b, Num a, Num b) => (a, b) -> [(a, b)] Source #
Returns the 8 points orthogonally or diagonally adjacent to the given point.
neighbours6 :: (Num a, Num b, Num c) => (a, b, c) -> [(a, b, c)] Source #
Returns the 6 points orthogonally adjacent to the given point in 3D space.
neighbours26 :: (Eq a, Eq b, Eq c, Num a, Num b, Num c) => (a, b, c) -> [(a, b, c)] Source #
Returns the 26 points orthogonally or diagonally adjacent to the given point in 3D space.
Taxicab (Manhattan) distance
taxicab2 :: Num a => (a, a) -> (a, a) -> a Source #
Returns the Taxicab/Manhattan distance between two points in 2D space.
taxicab3 :: Num a => (a, a, a) -> (a, a, a) -> a Source #
Returns the Taxicab/Manhattan distance between two points in 3D space.
taxicab :: Num a => [a] -> [a] -> a Source #
Returns the Taxicab/Manhattan distance between two points in n dimensions, where both points are lists of length n.
Input parsing
The following functions (beginning with "enumerate") operate on a grid of characters as a string with a newline after each row (as seen in several Advent of Code puzzle inputs).
enumerate' :: (Num y, Num x) => String -> [((x, y), Char)] Source #
Converts a grid to a list of pairs ((x,y),c) representing xy coordinates and the character at that location.
enumerateRead' :: (Read c, Num y, Num x) => String -> [((x, y), c)] Source #
Enumerates a grid along with reading the characters (usually as integers), and returns a list of pairs.
enumerate :: (Num y, Num x) => String -> [(x, y, Char)] Source #
Converts a grid to a list of triples (x,y,c) representing xy coordinates and the character at that location.
enumerateRead :: (Read c, Num y, Num x) => String -> [(x, y, c)] Source #
Enumerates a grid along with reading the characters (usually as integers), and returns a list of triples.
enumerateHM :: (Num x, Num y, Enum x, Enum y, Hashable x, Hashable y) => String -> HashMap (x, y) Char Source #
Enumerates a grid and stores it in a HashMap where points are mapped to the character at that location.
enumerateReadHM :: (Num x, Num y, Enum x, Enum y, Hashable x, Hashable y, Read c) => String -> HashMap (x, y) c Source #
Enumerates a grid and stores it in a HashMap along with reading the characters (usually as integers).
enumerateFilter :: (Num y, Num x) => (Char -> Bool) -> String -> [(x, y)] Source #
Returns a list of points on a grid for which a certain condition is met.
enumerateFilterSet :: (Ord x, Ord y, Num y, Num x) => (Char -> Bool) -> String -> Set (x, y) Source #
Returns a set of points on a grid for which a certain condition is met.
numbers :: (Num a, Read a) => String -> [a] Source #
Returns all the integers in a string (including negative signs).
numbers' :: (Num a, Read a) => String -> [a] Source #
Returns all the integers in a string (excluding negative signs).
binToDec :: Num a => [Bool] -> a Source #
Converts a list of booleans (parsed as a binary number) to an integer.
Flood fill
Arguments
| :: Ord a | |
| => (a -> [a]) | Neighbour function |
| -> Set a | Initial set of points |
| -> Set a | Set of points to avoid |
| -> Set a |
Applies a flood fill algorithm given a function to generate a point's neighbours, a starting set of points, and a set of points to avoid. Returns a set of all points covered.
Arguments
| :: Ord a | |
| => (a -> a -> Bool) | Condition |
| -> (a -> [a]) | Neighbour function |
| -> Set a | Initial set of points |
| -> Set a |
Applies a flood fill algorithm given a function to generate a point's neighbours, a condition that filters out points generated by said function, and a starting set of points. Returns a set of all points covered.
The condition is of the form a -> a -> Bool, which returns True if the second point is a valid neighbour of the first point and False otherwise.
List selection
choose :: (Num n, Ord n) => n -> [a] -> [[a]] Source #
Generates a list of all possible lists of length n by taking elements from the provided list of length l.
Relative order is maintained, and the length of the returned list is \(_{n}C_{l}\).
permute :: (Num n, Ord n) => n -> [a] -> [[a]] Source #
Generates a list of all possible lists of length n by taking elements from the provided list of length l.
The length of the returned list is \(_{n}P_{l}\).
takeEvery :: Int -> [a] -> [a] Source #
Takes every nth element from a list xs, starting from xs !! (n-1).
chunk :: Int -> [a] -> [[a]] Source #
Splits a list into sublists of size n. The length of the last sublist may be less than n.
Extrapolation
extrapolate :: (Integral b, Ord a) => b -> [a] -> a Source #
Gets the nth element of an infinite list, assuming that each element in the list can be generated using the previous element, for example, a list generated with iterate.
Debugging
prettyPrintSet :: (Enum b, Enum a, Ord a, Ord b) => Set (a, b) -> String Source #
Converts a set of points (x,y) to a string composed of and #' '. This function is useful when displaying puzzle answers formed by a grid of points.
Up to translation of points, prettyPrintSet . enumerateFilterSet (=='#') = id.
prettyPrintSetWide :: (Enum b, Enum a, Ord a, Ord b) => Set (a, b) -> String Source #
Same as prettyPrintSet, but displays points at double width to improve readability.
prettyPrintHM :: (Enum b, Enum a, Hashable a, Hashable b, Ord a, Ord b) => HashMap (a, b) Char -> String Source #
Converts a HashMap of points (x,y) and characters c to a string with the corresponding character at each point. This function is useful when displaying puzzle answers formed by a grid of points.
Up to translation of points, prettyPrintHM . enumerateHM = id.
prettyPrintHMWide :: (Enum b, Enum a, Hashable a, Hashable b, Ord a, Ord b) => HashMap (a, b) Char -> String Source #
Same as prettyPrintHM, but displays points at double width to improve readability.
traceSleep :: Int -> a -> a Source #
Pauses execution for n microseconds, before returning the second argument as its result. Useful for slowing down output that normally floods the terminal.
Like functions exported by Debug.Trace, this function should only be used for debugging.
The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of delaying execution.
traceSleepSeconds :: Int -> a -> a Source #
Pauses execution for n seconds. See traceSleep.
Memoization
Memoize a function with multiple arguments. Uses memo from Data.MemoUgly with slight modifications.
Range operations
range :: (Ord a, Enum a) => a -> a -> [a] Source #
Generates a range with [x..y], but reverses the list instead of returning an empty range if x > y.
rangeIntersect :: Ord b => (b, b) -> (b, b) -> Maybe (b, b) Source #
Takes (a,b) and (c,d) as arguments and returns the intersection of the ranges [a..b] and [c..d] as another pair if it is not empty.
rangeSubtract :: (Ord a, Num a) => (a, a) -> (a, a) -> [(a, a)] Source #
Takes (a,b) and (c,d) as arguments and returns every element in [c..d] that is not in [a..b] as a list of pairs of length at most 2.
ComplexL1 datatype
A Complex number type whose instance requires the constituent type to only be part of Num instead of RealFloat.
As a consequence of this, the abs and magnitude functions use the L1 metric instead of the L2 metric (which is quite useful for Advent of Code puzzles).
Also, signum is performed element-wise and can only return one of 8 different values.
This breaks the equality abs z * signum z == z that is true in the Complex datatype.
The functions mkPolar, cis, polar and phase are unimplemented for obvious reasons.
Unlike Complex, Ord and Hashable are supported. The Ord instance treats the values as tuples.
The name of the datatype contains "L1" in order to reflect these changes.
Constructors
| a :+ a infix 6 |
Instances
Visualization
displayPoints :: Integral a => [(a, a)] -> IO () Source #
Displays a list of points in an external window.
displayPolygon :: Integral a => [(a, a)] -> IO () Source #
Displays a polygon in an external window. The last point in the list of points is not joined to the first point.
displayPolygons :: Integral a => [[(a, a)]] -> IO () Source #
Displays a list of polygons in an external window. The last point in each list of points is not joined to the first point.
displayGraphDirected :: (Hashable n, Foldable t) => HashMap n (t n) -> IO () Source #
Displays a directed graph in an external window.
displayGraphUndirected :: (Hashable n, Foldable t) => HashMap n (t n) -> IO () Source #
Displays an undirected graph in an external window.
The graph is a HashMap mapping each node to a sequence of neighbours.
It is assumed that any neighbour that a node in the graph points to is also in the graph.
Note that this function and displayGraphDirected can be taxing on lower-end devices for well-connected graphs with more than a few hundred nodes.
The class of types that can be converted to a hash value.
Minimal implementation: hashWithSalt.
Hashable is intended exclusively for use in in-memory data structures.
.
Hashable does not have a fixed standard.
This allows it to improve over time.
.
Because it does not have a fixed standard, different computers or computers on different versions of the code will observe different hash values.
As such, Hashable is not recommended for use other than in-memory datastructures.
Specifically, Hashable is not intended for network use or in applications which persist hashed values.
For stable hashing use named hashes: sha256, crc32, xxhash etc.
If you are looking for Hashable instance in time package,
check time-compat
Instances
A map from keys to values. A map cannot contain duplicate keys; each key can map to at most one value.
Instances
| Bifoldable HashMap | Since: unordered-containers-0.2.11 |
| Eq2 HashMap | |
| Ord2 HashMap | |
Defined in Data.HashMap.Internal | |
| Show2 HashMap | |
| NFData2 HashMap | Since: unordered-containers-0.2.14.0 |
Defined in Data.HashMap.Internal | |
| Hashable2 HashMap | |
Defined in Data.HashMap.Internal | |
| (Lift k, Lift v) => Lift (HashMap k v :: Type) | Since: unordered-containers-0.2.17.0 |
| Foldable (HashMap k) | |
Defined in Data.HashMap.Internal Methods fold :: Monoid m => HashMap k m -> m # foldMap :: Monoid m => (a -> m) -> HashMap k a -> m # foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m # foldr :: (a -> b -> b) -> b -> HashMap k a -> b # foldr' :: (a -> b -> b) -> b -> HashMap k a -> b # foldl :: (b -> a -> b) -> b -> HashMap k a -> b # foldl' :: (b -> a -> b) -> b -> HashMap k a -> b # foldr1 :: (a -> a -> a) -> HashMap k a -> a # foldl1 :: (a -> a -> a) -> HashMap k a -> a # toList :: HashMap k a -> [a] # length :: HashMap k a -> Int # elem :: Eq a => a -> HashMap k a -> Bool # maximum :: Ord a => HashMap k a -> a # minimum :: Ord a => HashMap k a -> a # | |
| Eq k => Eq1 (HashMap k) | |
| Ord k => Ord1 (HashMap k) | |
Defined in Data.HashMap.Internal | |
| (Hashable k, Read k) => Read1 (HashMap k) | |
Defined in Data.HashMap.Internal | |
| Show k => Show1 (HashMap k) | |
| Traversable (HashMap k) | |
Defined in Data.HashMap.Internal | |
| Functor (HashMap k) | |
| NFData k => NFData1 (HashMap k) | Since: unordered-containers-0.2.14.0 |
Defined in Data.HashMap.Internal | |
| Hashable k => Hashable1 (HashMap k) | |
Defined in Data.HashMap.Internal | |
| (Eq k, Hashable k) => Affine (HashMap k) | |
| (Hashable k, Eq k) => Metric (HashMap k) | |
Defined in Linear.Metric | |
| (Eq k, Hashable k) => Trace (HashMap k) | |
| (Eq k, Hashable k) => Additive (HashMap k) | |
Defined in Linear.Vector Methods zero :: Num a => HashMap k a # (^+^) :: Num a => HashMap k a -> HashMap k a -> HashMap k a # (^-^) :: Num a => HashMap k a -> HashMap k a -> HashMap k a # lerp :: Num a => a -> HashMap k a -> HashMap k a -> HashMap k a # liftU2 :: (a -> a -> a) -> HashMap k a -> HashMap k a -> HashMap k a # liftI2 :: (a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c # | |
| (Data k, Data v, Hashable k) => Data (HashMap k v) | |
Defined in Data.HashMap.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashMap k v -> c (HashMap k v) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashMap k v) # toConstr :: HashMap k v -> Constr # dataTypeOf :: HashMap k v -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashMap k v)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashMap k v)) # gmapT :: (forall b. Data b => b -> b) -> HashMap k v -> HashMap k v # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r # gmapQ :: (forall d. Data d => d -> u) -> HashMap k v -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HashMap k v -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # | |
| Hashable k => Monoid (HashMap k v) | If a key occurs in both maps, the mapping from the first will be the mapping in the result. Examples
|
| Hashable k => Semigroup (HashMap k v) | If a key occurs in both maps, the mapping from the first will be the mapping in the result. Examples
|
| Hashable k => IsList (HashMap k v) | |
| (Hashable k, Read k, Read e) => Read (HashMap k e) | |
| (Show k, Show v) => Show (HashMap k v) | |
| (NFData k, NFData v) => NFData (HashMap k v) | |
Defined in Data.HashMap.Internal | |
| (Eq k, Eq v) => Eq (HashMap k v) | Note that, in the presence of hash collisions, equal
In general, the lack of extensionality can be observed with any function that depends on the key ordering, such as folds and traversals. |
| (Ord k, Ord v) => Ord (HashMap k v) | The ordering is total and consistent with the |
Defined in Data.HashMap.Internal | |
| (Hashable k, Hashable v) => Hashable (HashMap k v) | |
Defined in Data.HashMap.Internal | |
| (Eq k, Hashable k) => At (HashMap k a) | |
| (Eq k, Hashable k) => Ixed (HashMap k a) | |
Defined in Control.Lens.At | |
| (Hashable k, Eq k) => Wrapped (HashMap k a) | |
| (t ~ HashMap k' a', Hashable k, Eq k) => Rewrapped (HashMap k a) t | Use |
Defined in Control.Lens.Wrapped | |
| type Diff (HashMap k) | |
Defined in Linear.Affine | |
| type Item (HashMap k v) | |
Defined in Data.HashMap.Internal | |
| type Index (HashMap k a) | |
Defined in Control.Lens.At | |
| type IxValue (HashMap k a) | |
Defined in Control.Lens.At | |
| type Unwrapped (HashMap k a) | |
Defined in Control.Lens.Wrapped | |
A set of values a.
Instances
| Foldable Set | Folds in order of increasing key. |
Defined in Data.Set.Internal Methods fold :: Monoid m => Set m -> m # foldMap :: Monoid m => (a -> m) -> Set a -> m # foldMap' :: Monoid m => (a -> m) -> Set a -> m # foldr :: (a -> b -> b) -> b -> Set a -> b # foldr' :: (a -> b -> b) -> b -> Set a -> b # foldl :: (b -> a -> b) -> b -> Set a -> b # foldl' :: (b -> a -> b) -> b -> Set a -> b # foldr1 :: (a -> a -> a) -> Set a -> a # foldl1 :: (a -> a -> a) -> Set a -> a # elem :: Eq a => a -> Set a -> Bool # maximum :: Ord a => Set a -> a # | |
| Eq1 Set | Since: containers-0.5.9 |
| Ord1 Set | Since: containers-0.5.9 |
Defined in Data.Set.Internal | |
| Show1 Set | Since: containers-0.5.9 |
| Hashable1 Set | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
| Lift a => Lift (Set a :: Type) | Since: containers-0.6.6 |
| (Data a, Ord a) => Data (Set a) | |
Defined in Data.Set.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Set a -> c (Set a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Set a) # dataTypeOf :: Set a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Set a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Set a)) # gmapT :: (forall b. Data b => b -> b) -> Set a -> Set a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r # gmapQ :: (forall d. Data d => d -> u) -> Set a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Set a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) # | |
| Ord a => Monoid (Set a) | |
| Ord a => Semigroup (Set a) | Since: containers-0.5.7 |
| Ord a => IsList (Set a) | Since: containers-0.5.6.2 |
| (Read a, Ord a) => Read (Set a) | |
| Show a => Show (Set a) | |
| NFData a => NFData (Set a) | |
Defined in Data.Set.Internal | |
| Eq a => Eq (Set a) | |
| Ord a => Ord (Set a) | |
| Hashable v => Hashable (Set v) | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
| Ord k => At (Set k) | |
| Ord a => Contains (Set a) | |
| Ord k => Ixed (Set k) | |
Defined in Control.Lens.At | |
| Ord a => Wrapped (Set a) | |
| (t ~ Set a', Ord a) => Rewrapped (Set a) t | |
Defined in Control.Lens.Wrapped | |
| type Item (Set a) | |
Defined in Data.Set.Internal | |
| type Index (Set a) | |
Defined in Control.Lens.At | |
| type IxValue (Set k) | |
Defined in Control.Lens.At | |
| type Unwrapped (Set a) | |
Defined in Control.Lens.Wrapped | |