Skip to content

Bring back mkType function and deprecate it. Fix #287 Also: - #288

Closed
lehins wants to merge 1 commit into
haskell:release/v0.12.1from
lehins:287-fix-lost-mktype-func
Closed

lehins wants to merge 1 commit into
haskell:release/v0.12.1from
lehins:287-fix-lost-mktype-func

Conversation

@lehins

@lehins lehins commented Feb 1, 2020

Copy link
Copy Markdown
Contributor
  • Bump up the version in cabal and update changelog.
  • Fix markdown header formatting in changelog.

@Shimuuar

Shimuuar commented Feb 1, 2020

Copy link
Copy Markdown
Contributor

Accorfing to PVP

Deprecation. Deprecated entities (via a DEPRECATED pragma) SHOULD be counted as removed for the purposes of upgrading the API, because packages that use -Werror will be broken by the deprecation. In other words the new A.B SHOULD be greater than the previous A.B.

I think we should remove deprecation

@chessai

chessai commented Feb 1, 2020

Copy link
Copy Markdown
Member

I just commented the same thing as @Shimuuar in the related issue. This violates PVP, unfortunately

* Bump up the version in cabal and update changelog.
* Fix markdown header formatting in changelog.
@lehins
lehins force-pushed the 287-fix-lost-mktype-func branch from 9c1ae17 to 716074a Compare February 1, 2020 18:49
@lehins

lehins commented Feb 1, 2020

Copy link
Copy Markdown
Contributor Author

@chessai I sincerely do not agree with that part of PVP, but at the same time I really don't care about this mkType function. So here, dropped the DEPRECATE pragma

Comment thread Data/Vector/Generic.hs
import qualified Data.List.NonEmpty as NonEmpty

import qualified Data.Traversable as T (Traversable(mapM))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

was this shuffled because of how you wanted to do the cpp to conditionalize mkNoRepType?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was shuffled because function definitions should not appear between imports, if I didn't move it it would look like this for base < 4.2.0:

import Data.Data ( Data, DataType, Constr, Fixity(Prefix),
                   mkDataType, mkConstr, constrIndex )
                   mkDataType, mkConstr, constrIndex,
                   mkNorepType )
mkNoRepType :: String -> DataType
mkNoRepType = mkNorepType

import qualified Data.Traversable as T (Traversable(mapM))

The slight improvement to the way I did CPP was to reduce multiple imports from the same module, but it had nothing to do with Traversable import. hlint is a great tool that points those flaws to you.

@cartazio

cartazio commented Feb 1, 2020

Copy link
Copy Markdown
Contributor

I think changing pvp stance on deprecation annotations is ultimately gated on improving how ghc handles those and related warnings. (as with many things, the real way to progress stuff turns into "contrib the nice things you want into ghc and friends")

@cartazio

cartazio commented Feb 1, 2020

Copy link
Copy Markdown
Contributor

@lehins this patch looks good, i'd be inclined to undo the shuffle and have two cpp clause so import order styling doesn't get semi spurious reordering.

@cartazio

cartazio commented Feb 1, 2020

Copy link
Copy Markdown
Contributor

unrealtedly:
https://gist.github.com/piscisaureus/3342247 is an example of how to improve the working with PR workflow by registering the PR refs with git for local manipulation

@lehins

lehins commented Feb 1, 2020

Copy link
Copy Markdown
Contributor Author

Reverting the ordering of imports is a wrong decision here. See my answer to your comment.

@cartazio cartazio closed this Feb 1, 2020
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.

4 participants