[Haskell-cafe] Tracking down where an instance comes from

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Sun Oct 26 03:14:48 UTC 2014


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.


More information about the Haskell-Cafe mailing list