-tcLookupDataCon con_name
- = tcLookupGlobal con_name `thenM` \ thing ->
- return (tyThingDataCon thing)
+tcLookupDataCon name
+ = tcLookupGlobal name `thenM` \ thing ->
+ case thing of
+ ADataCon con -> return con
+ other -> wrongThingErr "data constructor" (AGlobal thing) name