X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FId.lhs;fp=ghc%2Fcompiler%2FbasicTypes%2FId.lhs;h=62c722a352e20c73e08ec8408a3c605f8eb73592;hb=e6de067858737daac62fe9066f6bda308c5616c3;hp=4348e4a9614b14a847806900a148f1a7d31b6d22;hpb=3fad64f3328778032439a87ec2108cdeea370552;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/Id.lhs b/ghc/compiler/basicTypes/Id.lhs index 4348e4a..62c722a 100644 --- a/ghc/compiler/basicTypes/Id.lhs +++ b/ghc/compiler/basicTypes/Id.lhs @@ -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