Skip to content

Add some hashed operations from classes that cannot be implemented #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 9, 2016

Conversation

phadej
Copy link
Contributor

@phadej phadej commented Oct 17, 2016

Especially traverseHashed which is a Lens (Hashed a) (Hashed b) a b can prove to be useful (there could be Iso, but we'd need a profunctors for that, which we cannot have here).

@phadej phadej force-pushed the hashed-operators branch 7 times, most recently from 5742270 to e0ac463 Compare October 17, 2016 15:31
traverseHashed f (Hashed a _) = fmap hashed (f a)

-- | 'Hashed' cannot be 'Monad'
joinHashed :: Hashed (Hashed a) -> Hashed a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one feels a bit odd. Do you have an example of how you would use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I don't know, added it for "completeness". Not insisting on it to be included.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed joinHashed

@phadej
Copy link
Contributor Author

phadej commented Nov 6, 2016

rebased

@phadej phadej force-pushed the hashed-operators branch 3 times, most recently from 6f5b1b3 to 7910f69 Compare November 6, 2016 10:53
@RyanGlScott
Copy link
Contributor

@phadej: Sadly, fixing the tests won't be easy because of the reasons I mention in #124 (comment).

@phadej
Copy link
Contributor Author

phadej commented Nov 6, 2016

@RyanGlScott well, the tests are run with newer GHCs at least, which is better than nothing.

As you can see, I found an issues with in the library itself, when build on older GHC (e.g. DeriveDataTypeable and Proxy), so having at least somehow working CI should be top priority. (EDIT and keeping it green!)

Now the travis is finally green, with tests run with GHC7.10 and GHC8.0.

@RyanGlScott
Copy link
Contributor

@phadej, I totally agree that having green Travis builds is a must. Although at the moment, we're cheating a bit by selectively disabling tests, aren't we? It would be great if you could run the hashable tests on old GHCs yourself to verify that they do indeed work (after manually working around the dependency cycle by preinstalling all dependencies, then configuring).

Our task would probably be a lot simpler if QuickCheck had a -flight flag as proposed in nick8325/quickcheck#118 (comment).

@phadej
Copy link
Contributor Author

phadej commented Nov 6, 2016

@RyanGlScott I'd rather fix cabal. Using cabal-head is an option, would rather fix the issue (cabal is dumb) than try to work around it. This issue hits us in many packages, especially their benchmarks.

@RyanGlScott
Copy link
Contributor

If you can fix the issue by depending on a newer version of cabal-install, I'm all for it :)

@phadej
Copy link
Contributor Author

phadej commented Nov 6, 2016

@RyanGlScott, will do, but separately.

@tibbe tibbe merged commit a0c288e into haskell-unordered-containers:master Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants