[GHC] #10384: "Can't splice the polymorphic local variable" check looks dead

GHC ghc-devs at haskell.org
Tue May 5 09:59:43 UTC 2015


#10384: "Can't splice the polymorphic local variable" check looks dead
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                   Owner:
            Type:  task              |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Template Haskell  |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I don't think it's dead:

  * In `RnSplice.checkCrossStageLifting` you'll see that it applies ONLY if
 the stage is `RnPendingUntyped`, i.e. we are renaming the body of an
 untyped bracket.  It does nothing for typed brackets.

 So what is happening in `RnSplice` is that we treat `[| ...x...|]` as
 equivalent to `[| ...(lift x)... |]`, which seems right.

 But what should happen for ''typed'' splices?  Presumably, `[||
 ...x....||]` should be equivalent to `[|| ....$(tlift x).... ||]`, where
 {{{
 tlift :: Lift t => t -> TExp t
 }}}
 It shouldn't matter if `x` has a polymorphic type, because it'll be
 instantiated by its context.  We might need to whiz up a new
 `SplicePointName` though.

 But we don't seem to have `tlift` or anything like it.  I'm puzzled.

 Simon

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


More information about the ghc-tickets mailing list