[GHC] #10267: Add support for typed holes in Template Haskell

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.10.1 Component: Template | Operating System: Unknown/Multiple Haskell | Type of failure: None/Unknown Keywords: | Blocked By: Architecture: | Related Tickets: Unknown/Multiple | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- I want to be able to work with typed holes using Template Haskell. These are currently rejected: {{{#!hs [d| i :: a -> a i x = _ |] }}} {{{ Expression form not (yet) handled by Template Haskell _ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: jstolarek Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by jstolarek): * owner: => jstolarek -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: jstolarek Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 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): By all means add typed holes. Should not be hard. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: jstolarek Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 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 jstolarek): Yes, the implementation is actually a matter of ~30 minutes of hacking. There is one catch though: `HsUnboundVar`, used to represent holes, always stores `RdrName`. That becomes a problem in `DsMeta`, where we expect `Name`s. My solution: parametrize `HsUnboundVar` with `id` like all the other constructors in `HsExpr`. I'm not certain if I got the details right - patch will require careful review in several place (I will mark those on Phab with inline comments). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: jstolarek Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: Phab:D835 -------------------------------------+------------------------------------- Changes (by jstolarek): * differential: => Phab:D835 Comment: Looks like underestimated the difficulty of this - there are some issues with name handling. I will post details in a moment on Phab. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: jstolarek Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: Phab:D835 -------------------------------------+------------------------------------- Comment (by jstolarek): I'd appreciate if anyone with more knowledge of name handling inside the renamer could take a look at the Phab revision. I'm blocked with this ticket at the moment but would love to push it forward. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: jstolarek Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10945, #10946 | Differential Rev(s): Phab:D835 Wiki Page: | -------------------------------------+------------------------------------- Changes (by jstolarek): * related: => #10945, #10946 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10267: Add support for typed holes in Template Haskell
-------------------------------------+-------------------------------------
Reporter: jstolarek | Owner: jstolarek
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #10945, #10946 | Differential Rev(s): Phab:D835
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Jan Stolarek

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: jstolarek Type: feature request | Status: closed Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10945, #10946 | Differential Rev(s): Phab:D835 Wiki Page: | -------------------------------------+------------------------------------- Changes (by jstolarek): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: jstolarek Type: feature request | Status: closed Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: th/T10267 Blocked By: | Blocking: Related Tickets: #10945, #10946 | Differential Rev(s): Phab:D835 Wiki Page: | -------------------------------------+------------------------------------- Changes (by jstolarek): * testcase: => th/T10267 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10267: Add support for typed holes in Template Haskell
-------------------------------------+-------------------------------------
Reporter: jstolarek | Owner: jstolarek
Type: feature request | Status: closed
Priority: normal | Milestone: 8.0.1
Component: Template Haskell | Version: 7.10.1
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case: th/T10267
Blocked By: | Blocking:
Related Tickets: #10945, #10946 | Differential Rev(s): Phab:D835
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#10267: Add support for typed holes in Template Haskell -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: jstolarek Type: feature request | Status: closed Priority: normal | Milestone: 8.0.1 Component: Template Haskell | Version: 7.10.1 Resolution: fixed | Keywords: TypedHoles Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: th/T10267 Blocked By: | Blocking: Related Tickets: #10945, #10946 | Differential Rev(s): Phab:D835 Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => TypedHoles -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10267#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC