[project @ 2005-06-15 12:03:19 by simonmar]
[ghc-hetmet.git] / ghc / compiler / basicTypes / Id.lhs
index 4348e4a..62c722a 100644 (file)
@@ -27,6 +27,7 @@ module Id (
        isImplicitId, isDeadBinder,
        isSpecPragmaId, isExportedId, isLocalId, isGlobalId,
        isRecordSelector,
+       isClassOpId_maybe,
        isPrimOpId, isPrimOpId_maybe, 
        isFCallId, isFCallId_maybe,
        isDataConWorkId, isDataConWorkId_maybe, idDataCon,
@@ -249,6 +250,10 @@ isRecordSelector id = case globalIdDetails id of
                        RecordSelId _ _ -> True
                        other           -> False
 
+isClassOpId_maybe id = case globalIdDetails id of
+                       ClassOpId cls -> Just cls
+                       _other        -> Nothing
+
 isPrimOpId id = case globalIdDetails id of
                    PrimOpId op -> True
                    other       -> False