diff options
| author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-11-01 07:38:45 +0000 |
|---|---|---|
| committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-11-01 07:38:45 +0000 |
| commit | 08094008890d88830f101a45e696d12212be0b61 (patch) | |
| tree | 7ba08d375892134eb4288eddfa2294495ec22d2e /compiler/hsSyn | |
| parent | bfbea5e60b48674e70dcff8b4c7391141b942f57 (diff) | |
| download | haskell-08094008890d88830f101a45e696d12212be0b61.tar.gz | |
Minor refactoring only
Diffstat (limited to 'compiler/hsSyn')
| -rw-r--r-- | compiler/hsSyn/HsBinds.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/hsSyn/HsBinds.lhs b/compiler/hsSyn/HsBinds.lhs index e42706acb4..31e7c29798 100644 --- a/compiler/hsSyn/HsBinds.lhs +++ b/compiler/hsSyn/HsBinds.lhs @@ -779,15 +779,15 @@ overlapHsSig :: Eq a => LSig a -> LSig a -> Bool overlapHsSig sig1 sig2 = case (unLoc sig1, unLoc sig2) of (FixSig (FixitySig n1 _), FixSig (FixitySig n2 _)) -> unLoc n1 == unLoc n2 (IdSig n1, IdSig n2) -> n1 == n2 - (TypeSig ns1 _, TypeSig ns2 _) -> not . null $ overlap ns1 ns2 - (GenericSig ns1 _, GenericSig ns2 _) -> not . null $ overlap ns1 ns2 + (TypeSig ns1 _, TypeSig ns2 _) -> ns1 `overlaps_with` ns2 + (GenericSig ns1 _, GenericSig ns2 _) -> ns1 `overlaps_with` ns2 (InlineSig n1 _, InlineSig n2 _) -> unLoc n1 == unLoc n2 -- For specialisations, we don't have equality over HsType, so it's not -- convenient to spot duplicate specialisations here. Check for this later, -- when we're in Type land (_other1, _other2) -> False where - overlap ns1 ns2 = intersect (map unLoc ns1) (map unLoc ns2) + ns1 `overlaps_with` ns2 = not (null (intersect (map unLoc ns1) (map unLoc ns2))) \end{code} \begin{code} |
