X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Frename%2FRnBinds.lhs;h=d107ecc76c0c3f23b12d090a25e6487d04a6d88c;hb=f83a5a68edb4b9dbdff1eebeed84527711efc728;hp=d5a7731e98df92d51cf9495386cdb80500971d86;hpb=72512afb8186c5e383bd2341ad67709958f70eac;p=ghc-hetmet.git diff --git a/ghc/compiler/rename/RnBinds.lhs b/ghc/compiler/rename/RnBinds.lhs index d5a7731..d107ecc 100644 --- a/ghc/compiler/rename/RnBinds.lhs +++ b/ghc/compiler/rename/RnBinds.lhs @@ -541,10 +541,11 @@ renameSig lookup_occ_nm (FixSig (FixitySig v fix src_loc)) lookup_occ_nm v `thenRn` \ new_v -> returnRn (FixSig (FixitySig new_v fix src_loc), unitFV new_v) -renameSig lookup_occ_nm (DeprecSig (DeprecName v txt) src_loc) +-- SUP: TEMPORARY HACK, ignoring module deprecations and constructors for now +renameSig lookup_occ_nm (DeprecSig (Deprecation (IEVar v) txt) src_loc) = pushSrcLocRn src_loc $ lookup_occ_nm v `thenRn` \ new_v -> - returnRn (DeprecSig (DeprecName new_v txt) src_loc, unitFV new_v) + returnRn (DeprecSig (Deprecation (IEVar new_v) txt) src_loc, unitFV new_v) renameSig lookup_occ_nm (InlineSig v p src_loc) = pushSrcLocRn src_loc $ @@ -559,14 +560,17 @@ renameSig lookup_occ_nm (NoInlineSig v p src_loc) Checking for distinct signatures; oh, so boring + \begin{code} cmp_sig :: RenamedSig -> RenamedSig -> Ordering -cmp_sig (Sig n1 _ _) (Sig n2 _ _) = n1 `compare` n2 -cmp_sig (DeprecSig (DeprecName n1 _) _) (DeprecSig (DeprecName n2 _) _) = n1 `compare` n2 -cmp_sig (InlineSig n1 _ _) (InlineSig n2 _ _) = n1 `compare` n2 -cmp_sig (NoInlineSig n1 _ _) (NoInlineSig n2 _ _) = n1 `compare` n2 -cmp_sig (SpecInstSig ty1 _) (SpecInstSig ty2 _) = cmpHsType compare ty1 ty2 -cmp_sig (SpecSig n1 ty1 _) (SpecSig n2 ty2 _) +cmp_sig (Sig n1 _ _) (Sig n2 _ _) = n1 `compare` n2 +-- SUP: TEMPORARY HACK, ignoring module deprecations and constructors for now +cmp_sig (DeprecSig (Deprecation (IEVar n1) _) _) + (DeprecSig (Deprecation (IEVar n2) _) _) = n1 `compare` n2 +cmp_sig (InlineSig n1 _ _) (InlineSig n2 _ _) = n1 `compare` n2 +cmp_sig (NoInlineSig n1 _ _) (NoInlineSig n2 _ _) = n1 `compare` n2 +cmp_sig (SpecInstSig ty1 _) (SpecInstSig ty2 _) = cmpHsType compare ty1 ty2 +cmp_sig (SpecSig n1 ty1 _) (SpecSig n2 ty2 _) = -- may have many specialisations for one value; -- but not ones that are exactly the same... thenCmp (n1 `compare` n2) (cmpHsType compare ty1 ty2)