Add Eq and Ord instances for TableIdentifier#625
Add Eq and Ord instances for TableIdentifier#625fpringle wants to merge 1 commit intotomjaguarpaw:masterfrom
Eq and Ord instances for TableIdentifier#625Conversation
|
Hmm, I'm a bit dubious about using this internal datatype in another library. Is there some public data type you could use instead? |
|
Not in Opaleye, but now you mention it I do notice that postgresql-simple has QualifiedIdentifier which seems to be isomorphic. I'll still need to depend on |
|
I see. For now can you just use your own custom type as the |
|
I'd imagine you could replce |
|
In case you're curious, this PR contains the code that uses |
Tiny PR adding an
Ordinstance toTableIdentifierso that I can use it as a key in aMapin effectful-opaleye.I understand there's an argument to be made against the
Eq, since there's a context in whichschema.tableandtablemight be considered equal, despite not comparing equal as Haskell values. If this is an issue, I'd be happy to swap the instances out for aHashableinstance (thehashablepackage is already a transitive dependency, so it wouldn't add to the footprint).