Repository navigation
GhcOptions: use NubListR where appropriate. - #2111
Merged
Merged
Conversation
23Skidoo
force-pushed
the
ghc-options-union
branch
2 times, most recently
from
September 17, 2014 22:33
af176a7 to
05ad067
Compare
23Skidoo
force-pushed
the
ghc-options-union
branch
4 times, most recently
from
September 27, 2014 14:39
3648af5 to
c223872
Compare
23Skidoo
referenced
this pull request
in erikd/cabal
Oct 18, 2014
During implementation and testing of the 'saved-config update' feature,
it was found that `mappend`ing SavedConfig could result in duplicate
entries in some fields which were lists, eg the fields extra-prog-path,
remote-repo and build-summary.
The solution was to add and use a 'NubList a' type, a list where every
element in the list is unique to the list and the original list ordering
is maintained. The Monoid NubList's mappend implement is just:
NubList xs `mappend` NubList ys = NubList . nub $ xs ++ ys
which preserves NubList's required properties (ordering and unique-ness
of elements) and meets the requirements of the Monoid laws (identity,
associativity and closure).
Closes: haskell#2160
23Skidoo
force-pushed
the
ghc-options-union
branch
from
October 19, 2014 14:18
c223872 to
f8bf00e
Compare
Some Cabal API clients apparently use `foldl mappend` on large lists of `GhcOptions` records. Fixes haskell#2110.
23Skidoo
force-pushed
the
ghc-options-union
branch
from
October 19, 2014 16:12
f8bf00e to
75e598b
Compare
Member
Author
|
Updated to use |
Data.List.union where appropriate.NubListR where appropriate.
23Skidoo
added a commit
that referenced
this pull request
Oct 19, 2014
GhcOptions: use `NubListR` where appropriate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some Cabal API clients apparently use
foldl mappendon large lists ofGhcOptionsrecords. Fixes #2110.