import RdrHsSyn
import RdrName
import PrelNames ( unitTyCon_RDR )
-import OccName ( dataName, varName, tcClsName,
+import OccName ( dataName, varName, tcClsName, isDataOcc,
occNameSpace, setOccNameSpace, occNameUserString )
import CStrings ( CLabelString )
import FastString ( nullFastString )
OpApp l op fix r -> checkPat l [] `thenP` \l ->
checkPat r [] `thenP` \r ->
case op of
- HsVar c -> returnP (ConOpPatIn l c fix r)
+ HsVar c | isDataOcc (rdrNameOcc c)
+ -> returnP (ConOpPatIn l c fix r)
_ -> patFail
HsPar e -> checkPat e [] `thenP` (returnP . ParPatIn)