Implement fmap/coerce rules
authorDavid Feuer <David.Feuer@gmail.com>
Thu, 13 Nov 2014 05:16:28 +0000 (00:16 -0500)
committerDavid Feuer <David.Feuer@gmail.com>
Tue, 18 Nov 2014 13:38:41 +0000 (08:38 -0500)
commitad24ce6e10d2a0168dcb4d68765b4a25ae22ad88
tree2456cdb1508f0bc42acc7df3ce24ee26642a963b
parentf9c23af0c7396aaf457ce9916392c7f949b60384
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.
Data/Map/Base.hs
Data/Map/Strict.hs
Data/Sequence.hs
Data/Tree.hs
tests-ghc/all.T
tests-ghc/mapcoercemap.hs [new file with mode: 0644]
tests-ghc/mapcoercemap.stdout [new file with mode: 0644]
tests-ghc/mapcoerceseq.hs [new file with mode: 0644]
tests-ghc/mapcoerceseq.stdout [new file with mode: 0644]
tests-ghc/mapcoercesmap.hs [new file with mode: 0644]
tests-ghc/mapcoercesmap.stdout [new file with mode: 0644]