Safe Haskell | Safe-Inferred |
---|---|

Language | Haskell2010 |

## Synopsis

- data NubList a
- toNubList :: Ord a => [a] -> NubList a
- fromNubList :: NubList a -> [a]
- overNubList :: Ord a => ([a] -> [a]) -> NubList a -> NubList a
- data NubListR a
- toNubListR :: Ord a => [a] -> NubListR a
- fromNubListR :: NubListR a -> [a]
- overNubListR :: Ord a => ([a] -> [a]) -> NubListR a -> NubListR a

# Documentation

NubList : A de-duplicated list that maintains the original order.

#### Instances

Structured a => Structured (NubList a) Source # | |

Defined in Distribution.Utils.NubList | |

Ord a => Monoid (NubList a) Source # | Monoid operations on NubLists. For a valid Monoid instance we need to satistfy the required monoid laws; identity, associativity and closure. Identity : by inspection:
mempty Associativity : by inspection:
(NubList xs Closure : appending two lists of type a and removing duplicates obviously does not change the type. |

Ord a => Semigroup (NubList a) Source # | |

Generic (NubList a) Source # | |

(Ord a, Read a) => Read (NubList a) Source # | |

Show a => Show (NubList a) Source # | |

(Ord a, Binary a) => Binary (NubList a) Source # | Binary instance for 'NubList a' is the same as for '[a]'. For |

Eq a => Eq (NubList a) Source # | |

type Rep (NubList a) Source # | |

Defined in Distribution.Utils.NubList |

fromNubList :: NubList a -> [a] Source #

overNubList :: Ord a => ([a] -> [a]) -> NubList a -> NubList a Source #

Lift a function over lists to a function over NubLists.

NubListR : A right-biased version of `NubList`

. That is ```
toNubListR
["-XNoFoo", "-XFoo", "-XNoFoo"]
```

will result in `["-XFoo", "-XNoFoo"]`

,
unlike the normal `NubList`

, which is left-biased. Built on top of
`ordNubRight`

and `listUnionRight`

.

toNubListR :: Ord a => [a] -> NubListR a Source #

Smart constructor for the NubListR type.

fromNubListR :: NubListR a -> [a] Source #