[GHC] #2110: Rules to eliminate casted id's

GHC ghc-devs at haskell.org
Sun Sep 15 19:03:46 CEST 2013


#2110: Rules to eliminate casted id's
-------------------------------------+------------------------------------
        Reporter:  igloo             |            Owner:
            Type:  feature request   |           Status:  new
        Priority:  lowest            |        Milestone:  7.6.2
       Component:  Compiler          |          Version:  6.8.2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by nomeata):

 Alternative, similar idea: Leave the RULE as it is, but be smart when
 matching `(GHC.Prim.coerce @ t @ t1 $dCoercible)` and if the expression is
 of the form {{{(\x -> x) `cast` c}}}, succeed with a substitution
 `$dCoercible = MkCoercion @ t1 @ t2 @~ c`. The RHS would then look a bit
 convoluted, but the simplifier surely cleans that up.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/2110#comment:37>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list