GHC 8 and Template Haskell

Bardur Arantsson spam at scientician.net
Fri Apr 15 03:56:04 UTC 2016


On 04/14/2016 08:17 PM, Austin Seipp wrote:
> Here's a question, on top of this one: why don't we require
> template-haskell changes for most corresponding syntax changes? We
> tend to play catch up with template-haskell sometimes and it's
> relatively strange. I mean, in some sense, we could have said a while
> back "This needs another revision, please add template haskell
> support" and avoided it all.
> 
> Richard has a better insight into this than I do, I'm sure, but it
> seems - to me, anyway - like template-haskell support is a reasonable
> bar for most surface-level syntax change to cross, before getting
> merged.
> 
> My intuition tells me that, most of the time, a lot of us simply
> forget to make the changes, or ask for them in reviews, and so it
> goes.
> 

ISTM that this kind of thing could be reasonably handled by simply
having a checklist for new functionality -- which includes TH support as
a checkbox.

I'm sure others there are other frequently-forgotten-but-important
things that people can think of to put into such a checklist.

(Not sure if GHC has a "Release" checklist, but I'd imagine one of those
might also be useful.)

Checklists can be very effective as long as you remember two rules:

 [ ] You need be consistent about following them
 [ ] They need to be kept as short and succinct as possible so that it
     doesn't become an undue burden (and thus, liable to be ignored).

The first point might seem paradoxical given that we're talking about
forgetting to do something, but it really isn't. As long as all one has
to remember is *one* thing[1], namely to "always do the checklist", then
it's easy to remember doing it and to make it a habit. And if you
forget, it's easy for others to remember to remind you to go through it.

If Phab supports "message templates" for proposed merges, then it'd
probably be easiest to just include such a checklist there. Otherwise, a
good home might be the wiki so that there's always a fixed place to
refer to.

As to the "succinct" bit: Whether to have an item on the list is
determined by "cost of failure to do" said item and likelihood of
forgetting. The list is obviously up for revision as one learns more.

If anyone's interested in what checklists can do for you, I'd recommend
the marvelous book "The Checklist Manifesto" by Atul Gawande.

Regards,

[1] Rather than many different things -- the things *on* the checklist.




More information about the Libraries mailing list