Drop `template-haskell`'s build-dep on `containers`
authorHerbert Valerio Riedel <hvr@gnu.org>
Thu, 24 Apr 2014 07:05:45 +0000 (09:05 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Fri, 25 Apr 2014 17:10:55 +0000 (19:10 +0200)
commit07388af843ad61757207a54d75ab336606beed4f
tree2546223341397a70e66941bb0631c92f25deba67
parent4ceb5dec42ff8d17e24ed80d0265eb8fb60dd804
Drop `template-haskell`'s build-dep on `containers`

This is an attempt to address

  https://github.com/haskell/cabal/issues/1811

by replicating the less than 100 lines of code actually used from the
containers package into an internal non-exposed `template-haskell` module.

Moreover, `template-haskell` does not expose the `Map` type, so this change
should have no visible effect on the public API.

It may turn out that `Data.Map` is not necessary and that even a simple
list-based associative list (`Prelude.lookup`) may suffice. However, in
order to avoid any regressions, this commit takes the safe route and just
clones `Data.Map` for now.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
libraries/template-haskell/Language/Haskell/TH/Lib/Map.hs [new file with mode: 0644]
libraries/template-haskell/Language/Haskell/TH/PprLib.hs
libraries/template-haskell/template-haskell.cabal
testsuite/tests/th/TH_Roles2.stderr