Skip to content

Conversation

treeowl
Copy link
Contributor

@treeowl treeowl commented Nov 21, 2014

Data.Functor.Identity has just entered base, and includes some optimizations that may or
may not be relevant. For older versions, don't bother making Identity a
Monad instance--it's not exported, and that instance is never used.
Make applicativeTree slightly more readable. There doesn't seem to
be any reason to seq the quotient, as quotRem calculates that along
with the remainder.

@foxik
Copy link
Contributor

foxik commented Nov 21, 2014

Please rebase to current HEAD, because in the chunk

 #if MIN_VERSION_base(4,8,0)
 import Data.Coerce
+import Data.Functor.Identity (Identity(..))
 #endif

the MIN_VERSION_base(4,8,0) was replaced in #75 by __GLASGOW__HASKELL__. Nevertheless, the Data.Functor.Identity should be really used in MIN_VERSION_base(4,8,0) and its later usage on line 559 is conditioned agan by !MIN_VERSION_base(4,8,0).

This has just entered base, and includes some optimizations that may or
may not be relevant. For older versions, don't bother making Identity a
Monad instance--it's not exported, and that instance is never used.
Make applicativeTree slightly more readable.
@treeowl
Copy link
Contributor Author

treeowl commented Nov 21, 2014

I think that should do the trick. Do you know why all the GHC HEAD builds fail always on Travis?

foxik added a commit that referenced this pull request Nov 21, 2014
Use Data.Functor.Identity
@foxik foxik merged commit c138008 into haskell:master Nov 21, 2014
@foxik
Copy link
Contributor

foxik commented Nov 21, 2014

It seems the ChasingBottoms package has base < 4.8.

If you are interested, we could create a flag in the container.cabal allowing to compile tests without ChasingBottoms, which is used in only 2 out of 8 test-suites, until there is ChaginBottoms for newer GHC.

@treeowl treeowl deleted the identity branch November 21, 2014 19:42
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.

2 participants