[GHC] #8656: Identical functions in Templeta Haskell

GHC ghc-devs at haskell.org
Wed Jan 8 19:27:09 UTC 2014


#8656: Identical functions in Templeta Haskell
-------------------------------+-------------------------------------------
        Reporter:  jstolarek   |            Owner:
            Type:  bug         |           Status:  new
        Priority:  normal      |        Milestone:
       Component:  Template    |          Version:  7.7
  Haskell                      |         Keywords:
      Resolution:              |     Architecture:  Unknown/Multiple
Operating System:              |       Difficulty:  Easy (less than 1 hour)
  Unknown/Multiple             |       Blocked By:
 Type of failure:              |  Related Tickets:
  None/Unknown                 |
       Test Case:              |
        Blocking:              |
-------------------------------+-------------------------------------------

Comment (by goldfire):

 My sense is that functions like `varE` (and even type synonyms like
 `ExpQ`) are present mainly to ease the implementation of the !DsMeta
 module. That module takes quotes (like `[| 1 + x |]`) and converts them
 into Core code (like `appE (appE (varE '+) (litE (integerL 1))) (varE
 'x)`). So, even though `global` exists, it's really nice to have `varE` so
 that there is regularity in these monadic functions. (Each constructor,
 say, of `Exp` has a function counterpart defined in
 `Language.Haskell.TH.Lib`.)

 Whether or not it's useful to have `global` is another question. But, my
 thought is that it's best not to disrupt potential clients of that
 function.

 I agree that it's a little silly to have both of these functions, but it
 doesn't seem worth changing, to me. I'm also not sure how best to document
 this issue. My tendency would be toward closing this ticket as "wontfix",
 but I'll wait for someone to second my reasoning before doing so.

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


More information about the ghc-tickets mailing list