Opened 9 years ago

Closed 9 years ago

#4423 closed bug (fixed)

Remove 'rename' and friends from TH.Lib

Reported by: simonpj Owned by: igloo
Priority: normal Milestone: 7.4.1
Component: Template Haskell Version: 6.12.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


There are a handful of functions in the template-haskell package, module Language.Haskell.TH.Lib, that are defined in that module, but are not used, and are not exported by the main Template Haskell interface Language.Haskell.TH.

I propose to nuke them. I assume no one is using them (since they are not exported by the main interface), and I'm not keen on the API of rename. Moreover, rename becomes signficantly more compilcated with the advent of view patterns.

The functions are:

combine :: [([(Name, Name)], Pat)] -> ([(Name, Name)], [Pat])
  -- Seems to be a helper for rename
rename :: Pat -> Q ([(Name, Name)], Pat)
genpat :: Pat -> Q ((Name -> ExpQ), Pat)
alpha :: [(Name, Name)] -> Name -> ExpQ

simpleMatch :: Pat -> Exp -> Match
  -- This is the most defensible; it's a "smart constructor"

Deadline 2 weeks.

Change History (4)

comment:1 Changed 9 years ago by igloo

Milestone: 7.2.1

All but alpha have been removed:

Fri Nov 12 17:08:08 GMT 2010
  * Remove unused functions combine, rename, genpat, simpleMatch
  Ignore-this: 997a0c5a9a7dcefaf763c06c1f7ae799
  See Trac #4423

What's the situation with alpha, Simon?

comment:2 Changed 9 years ago by simonpj

Bother. It too was only used from genpat. Ian, could you remove it too, please? Sorry.

comment:3 Changed 9 years ago by igloo

Owner: set to igloo

comment:4 Changed 9 years ago by igloo

Resolution: fixed
Status: newclosed


Sun Nov 21 06:26:46 PST 2010  Ian Lynagh <>
  * Remove the "alpha" helper function; trac #4423
Note: See TracTickets for help on using tickets.