Skip to content
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

Minor Cleanup #194

Merged
merged 2 commits into from Oct 22, 2019
Merged

Minor Cleanup #194

merged 2 commits into from Oct 22, 2019

Conversation

fisx
Copy link
Collaborator

@fisx fisx commented Jun 15, 2019

New test case. Seems trivial now, but it took me a while (too long) to realize it's the expected behavior.

Update: I also removed some trivial warnings, and one about ListT that is not quite trivial. I'm happy to drop that commit that if you disagree.

Update: I removed the test case because it made no sense. It's probably a good idea to squash-merge this. Let me know if you want me to rebase instead.

@fisx fisx changed the title Collecting descriptions of inlined types. Minor Cleanup Jun 15, 2019
@fisx
Copy link
Collaborator Author

fisx commented Jun 15, 2019

updated description.

@fisx
Copy link
Collaborator Author

fisx commented Jun 16, 2019

success! :-)

Copy link
Member

@fizruk fizruk left a comment

Choose a reason for hiding this comment

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

Except for one thing everything seems good 😊

@@ -162,10 +162,6 @@ instance MonadDeclare d m => MonadDeclare d (IdentityT m) where
declare = lift . declare
look = lift look

instance MonadDeclare d m => MonadDeclare d (ListT m) where
Copy link
Member

Choose a reason for hiding this comment

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

Why remove this instance?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it created a deprecation warning:

Deprecated: This transformer is invalid on most monads

https://hoogle.zinfra.io/file/usr/share/doc/ghc-8.4.3/html/libraries/transformers-0.5.5.0/Control-Monad-Trans-List.html

I figured anybody who wants to use it can still re-create the instance, but they will be prompted to think about it at least.

I'm happy to revert that change if you disagree?

Copy link
Collaborator

Choose a reason for hiding this comment

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

"re-create the instance" would mean an orphan one. No go.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

but providing an instance in this library for a transformer that will almost always lead to broken monads is ok? i disagree, but ok: cf0c2a7

@@ -33,8 +34,9 @@ import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
import qualified Data.HashMap.Strict.InsOrd as InsOrdHashMap
import qualified "unordered-containers" Data.HashSet as HashSet
import Data.List (intercalate)
#if __GLASGOW_HASKELL__ < 840
Copy link
Collaborator

Choose a reason for hiding this comment

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

we depend on base-compat-batteries, so

import Prelude ()
import Prelude.Compat

and remeoving import Data.Monoid will solve this without CPP

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍 69b6c62

thanks!

@@ -8,6 +8,7 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
Copy link
Collaborator

@phadej phadej Jun 18, 2019

Choose a reason for hiding this comment

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

We don't use NoImplicitPrelude. I have no strong opinion about it specifically, but I value consistency, and elsewhere we use Prelude.Compat and Prelude imports as own block separated from other imports. For example

module Data.Swagger.Internal where

import Prelude ()
import Prelude.Compat

import           Control.Lens             ((&), (.~), (?~))
import           Control.Applicative
import           Data.Aeson
...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for bearing with me... :)

I hope I got it right this time: 5e71133

Even realized I should turn off CPP again if I don't use it...

@fisx
Copy link
Collaborator Author

fisx commented Jun 22, 2019

@phadej have I done everything you requested?

@fisx
Copy link
Collaborator Author

fisx commented Jul 29, 2019

just a friendly reminder that i'm still interested in this. @phadej? or perhaps somebody else has the authority to decide that i've answered all his requests?

@fisx fisx requested a review from phadej September 29, 2019 15:58
@fisx
Copy link
Collaborator Author

fisx commented Sep 29, 2019

Please let me know if I should

  • squash-merge using github
  • rebase, clean up the branch, and the merge normally using github (not sure if that's different from the above?)
  • change anything else before merging

If I don't hear anything within 5 days, I will take the one approving review seriously, assume it's ready to go to master, and squash-merge (my preference).

@fisx
Copy link
Collaborator Author

fisx commented Oct 11, 2019

I've cleaned up the branch, and there is not much left. I'll merge it together with #195 on Oct 22 or after if nobody stops me.

@fisx fisx merged commit c121663 into GetShopTV:master Oct 22, 2019
@fizruk fizruk mentioned this pull request Nov 23, 2019
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.

None yet

3 participants