Tracking down where an instance comes from

Hi, I'm in a situation where we have a 140+ module program (Yi) with some 30+ packages of dependencies and somewhere along the lines, this little guy gets in: instance [safe] Show (a -> b) -- Defined in ‘Text.Show.Functions’ Of course this automatically infects everything to import Yi. This is bad. What would be the best way to track down through which import this actually comes in? There's nothing directly importing Text.Show.Functions and I wonder if there's a better way than ‘remove imports one by one going deeper each time you hit it’ which might take a while, especially as there seems to be no way to unload instances except restarting GHCi. -- Mateusz K.

On Sat, Oct 25, 2014, at 08:14 PM, Mateusz Kowalczyk wrote:
instance [safe] Show (a -> b) -- Defined in ‘Text.Show.Functions’
An easy start may be a Google search for "import Text.Show.Functions". If you are lucky, you will spot a dependency of Yi in the results. -Karl

I can support the guess. A similar problem was found in Tasty a while ago: https://github.com/feuerbach/tasty/issues/71 In the case of Tasty, the problem was solved by using regex-tdfa-rc instead of regex-tdfa. On Tue, Oct 28, 2014 at 11:58:23AM +0100, Tobias Florek wrote:
Hi,
instance [safe] Show (a -> b) -- Defined in ‘Text.Show.Functions’
What would be the best way to track down through which import this actually comes in?
I might be late and you already found it, but my strong guess is that it's regex-tdfa.
Cheers, tobias florek _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (4)
-
Karl Voelker
-
Mateusz Kowalczyk
-
Rudy Matela
-
Tobias Florek