[GHC] #1830: Automatic derivation of Lift

GHC ghc-devs at haskell.org
Mon Aug 24 04:07:37 UTC 2015


#1830: Automatic derivation of Lift
-------------------------------------+-------------------------------------
        Reporter:  guest             |                   Owner:
                                     |  RyanGlScott
            Type:  feature request   |                  Status:  new
        Priority:  normal            |               Milestone:  ⊥
       Component:  Template Haskell  |                 Version:  6.8.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:  Phab:D1168
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 > What should we do if someone attempts to derive `Lift` on a datatype
 with no constructors?

 Since `lift` then has type `Void -> Q Exp`, I would be inclined to define
 it as `absurd`, i.e., an empty case. I don't see the point of turning it
 into a runtime error when `lift (error "foo")` is a splice-time error for
 an inhabited type.

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


More information about the ghc-tickets mailing list