X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FId.lhs;fp=ghc%2Fcompiler%2FbasicTypes%2FId.lhs;h=0d15b20f22c750da90563caf1686279fc8ef4de3;hb=36436bc62a98f53e126ec02fe946337c4c766c3f;hp=85c474d1c3c55f8285f24001e4799eaac192e8c0;hpb=8761b73561019d5514194fc8b0eee2b13f0e0ec9;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/Id.lhs b/ghc/compiler/basicTypes/Id.lhs index 85c474d..0d15b20 100644 --- a/ghc/compiler/basicTypes/Id.lhs +++ b/ghc/compiler/basicTypes/Id.lhs @@ -26,7 +26,7 @@ module Id ( -- Predicates isImplicitId, isDeadBinder, isDictId, isExportedId, isLocalId, isGlobalId, - isRecordSelector, + isRecordSelector, isNaughtyRecordSelector, isClassOpId_maybe, isPrimOpId, isPrimOpId_maybe, isFCallId, isFCallId_maybe, @@ -230,13 +230,17 @@ idPrimRep id = typePrimRep (idType id) \begin{code} recordSelectorFieldLabel :: Id -> (TyCon, FieldLabel) recordSelectorFieldLabel id = case globalIdDetails id of - RecordSelId tycon lbl -> (tycon,lbl) + RecordSelId tycon lbl _ -> (tycon,lbl) other -> panic "recordSelectorFieldLabel" isRecordSelector id = case globalIdDetails id of - RecordSelId _ _ -> True + RecordSelId {} -> True other -> False +isNaughtyRecordSelector id = case globalIdDetails id of + RecordSelId { sel_naughty = n } -> n + other -> False + isClassOpId_maybe id = case globalIdDetails id of ClassOpId cls -> Just cls _other -> Nothing @@ -297,7 +301,7 @@ isImplicitId :: Id -> Bool -- file, even if it's mentioned in some other interface unfolding. isImplicitId id = case globalIdDetails id of - RecordSelId _ _ -> True + RecordSelId {} -> True FCallId _ -> True PrimOpId _ -> True ClassOpId _ -> True