Closed Yuliosity closed 3 years ago
This breaks data-family definitions (which use name of constructor to get hand of the type).
@RyanGlScott do you have an idea how this can be solved?
I'm trying to find a minimal test case for the problem this is supposed to fix. It looks to me as if reifyDatatype
produces a qualified name if needed.
I can't recommend a solution because I don't yet understand what the problem is. The PR description is too vague for me to make a judgment one way or the other. A minimal example of the issue would be helpful.
I'm sorry, @kosmikus is right and the problem with name clashes in our module was not caused by generics-sop at all. I'll close the PR, sorry for taking your time again 🙏
Currently Generics.SOP.TH loses the qualification of the type name, e.g.
deriveGeneric ''Foo.Bar
generates the code just forBar
, which leads to name clashes whenFoo
imports anotherBar
. This is solved by using the passed type name instead of re-extracting it from the type definition.