[GHC] #4222: Template Haskell lets you reify supposedly-abstract data types

GHC ghc-devs at haskell.org
Mon Jul 2 12:16:57 UTC 2018


#4222: Template Haskell lets you reify supposedly-abstract data types
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Template Haskell  |              Version:  6.12.3
      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 RyanGlScott):

 Another possibility is to restrict what can be reified in the presence of
 the `Safe` language extension. To my knowledge, Template Haskell's ability
 to reify abstract names is precisely what makes `TemplateHaskell` imply
 `Unsafe`, so perhaps we could regain its safety by restricting what it can
 do in Safe Haskell.

 I agree that I wouldn't want to remove the ability to reify abstract names
 altogether, since there are many situations where that comes in handy.

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


More information about the ghc-tickets mailing list