On further inspection, the problem is not with TH but with family instances.
That is, suppose Library.hs is has the constructors defined in the simple
top-level style:
```
data EntityField typ where
BlobXVal :: EntityField Int
BlobYVal :: EntityField Int
```
However, if instead, Library.hs defines the constructors within an instance:
```
instance PersistEntity Blob where
data EntityField Blob typ where
BlobXVal :: EntityField Blob Int
BlobYVal :: EntityField Blob Int
```
then, when analyzing Client.hs, the `hscTcRcLookupName` function FAILS.
Clearly there is some difference in how `hscTcRcLookupName` works in these two cases.
Does someone know what it is?
Thanks in advance!
- Ranjit.