[commit: packages/containers] changelog-foldtree, cleaned_bugfix394, develop-0.6, develop-0.6-questionable, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394, zip-devel: Implement fmap/coerce rules (ad24ce6)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:34:47 UTC 2017


Repository : ssh://git@git.haskell.org/containers

On branches: changelog-foldtree,cleaned_bugfix394,develop-0.6,develop-0.6-questionable,master,merge-doc-target,merge-fixes-5.9,merge-restrict-fix-5.8,revert-184-generic,revert-408-bugfix_394,zip-devel
Link       : http://git.haskell.org/packages/containers.git/commitdiff/ad24ce6e10d2a0168dcb4d68765b4a25ae22ad88

>---------------------------------------------------------------

commit ad24ce6e10d2a0168dcb4d68765b4a25ae22ad88
Author: David Feuer <David.Feuer at gmail.com>
Date:   Thu Nov 13 00:16:28 2014 -0500

    Implement fmap/coerce rules
    
    Implement fmap/coerce rules for Map, Sequence, and Tree. One concern:
    unfortunately, implementing the RULES forces the LANGUAGE to be turned
    from Safe to Trustworthy.  This is rather sad. An alternative would be
    to do this in another module, but orphan rules are not so lovely either.


>---------------------------------------------------------------

ad24ce6e10d2a0168dcb4d68765b4a25ae22ad88
 Data/Map/Base.hs               | 24 +++++++++++++++++-------
 Data/Map/Strict.hs             | 19 ++++++++++++++++++-
 Data/Sequence.hs               | 27 ++++++++++++++++++++-------
 Data/Tree.hs                   | 29 ++++++++++++++++++++++-------
 tests-ghc/all.T                |  3 +++
 tests-ghc/mapcoercemap.hs      | 25 +++++++++++++++++++++++++
 tests-ghc/mapcoercemap.stdout  |  3 +++
 tests-ghc/mapcoerceseq.hs      | 25 +++++++++++++++++++++++++
 tests-ghc/mapcoerceseq.stdout  |  3 +++
 tests-ghc/mapcoercesmap.hs     | 25 +++++++++++++++++++++++++
 tests-ghc/mapcoercesmap.stdout |  3 +++
 11 files changed, 164 insertions(+), 22 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc ad24ce6e10d2a0168dcb4d68765b4a25ae22ad88


More information about the ghc-commits mailing list