map/coerce rule does not fire until the coercion is known
If I write a nice, simple use, like:
myPotato = map coerce
or even
myPotato = Data.OldList.map coerce
the "map/coerce
" rule does not fire.
It looks like there are two things getting in the way:
- The
map
rule fires first, turningmap
into abuild/foldr
form, whichmap/coerce
does not recognize. - Even if
map
gets written back,coerce
has been expanded into something the rule doesn't recognize.
So we end up with something that looks like
myPotato =
\ (@ a_are)
(@ b_arf)
($dCoercible_arz :: Coercible a_are b_arf)
(lst_aqx :: [a_are]) ->
map
@ a_are
@ b_arf
(\ (tpl_B2 [OS=ProbOneShot] :: a_are) ->
case $dCoercible_arz
of _ [Occ=Dead] { GHC.Types.MkCoercible tpl1_B3 ->
tpl_B2 `cast` (tpl1_B3 :: a_are ~R# b_arf)
})
lst_aqx
Trac metadata
Trac field | Value |
---|---|
Version | 7.9 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Core Libraries |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | core-libraries-committee@haskell.org |
Operating system | |
Architecture |