TH: Use atomicModifyIORef' for fresh names
authorErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 27 Sep 2016 21:37:33 +0000 (07:37 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 27 Sep 2016 21:37:34 +0000 (07:37 +1000)
commitf897b7427a4804e3285144f57676574d338be1f5
tree3b4c9f55080fc55fdc8aed8f61c246a801c9f8d9
parentc36904d66f30d4386a231ce365a056962a881767
TH: Use atomicModifyIORef' for fresh names

This prevents the possibility of race conditions when creating fresh
names.

Test Plan: validate

Reviewers: goldfire, austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2548
libraries/template-haskell/Language/Haskell/TH/Syntax.hs