[GHC] #14061: reflection

GHC ghc-devs at haskell.org
Mon Jul 31 11:18:11 UTC 2017


#14061: reflection
-------------------------------------+-------------------------------------
        Reporter:  zaoqi             |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Runtime System    |              Version:  8.0.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by AntC):

 Replying to [comment:3 zaoqi]:

 > Reflection

 The approach in ticket:14004#comment:8 uses reflection. In the code, the
 line:

 {{{

       | Just HRefl <- ra `eqTypeRep` rb = a == b

 }}}

 For `Just HRefl`, the `Refl` is reflection. (Defined in base library
 `Data.Type.Equality`)

 This is advanced Haskell. It is very unlikely you need this. Your
 questions are at beginner level, so it would not help you to just copy the
 code. You have not explained why you cannot change the definition of
 `Dyn`.

 I have put out a request for some Chinese speaking Haskellers to try to
 help you. I hope they will contact you soon. (Apologies to the GHC team in
 advance: you might see Chinese text on this ticket.)

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


More information about the ghc-tickets mailing list