Improve plugin loading error message
When a plugin doesn't have the right type (i.e. plugin
name in the plugin module isn't of type Plugin
, see plugins02
test case), we get a quite terse error message:
The value plugin did not have the type Plugin as required
In a complex build it is not very useful. We would like to get more information:
- the name of the module containing the bogus
plugin
name - the current type of the
plugin
name - slightly enhance the error message to give a qualified name for the expected
Plugin
type (i.e.GHC.Plugins.Plugin
)