1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00

Simplify the context for comparableByConstructor.

This commit is contained in:
Rob Rix 2017-09-25 18:27:09 -04:00
parent 4c4ae14bf8
commit c0a526c264

View File

@ -100,7 +100,7 @@ comparableByCategory :: (HasField fields1 Category, HasField fields2 Category) =
comparableByCategory (In a _) (In b _) = category a == category b
-- | Test whether two terms are comparable by their constructor.
comparableByConstructor :: (Declaration.Method :< fs, Declaration.Function :< fs, Syntax.Context :< fs, Apply Functor fs, Apply Foldable fs, Apply GAlign fs) => ComparabilityRelation (Union fs) ann1 ann2
comparableByConstructor :: (Syntax.Context :< fs, Apply GAlign fs) => ComparabilityRelation (Union fs) ann1 ann2
comparableByConstructor (In _ u1) (In _ u2)
| Just Syntax.Context{} <- prj u1 = True
| Just Syntax.Context{} <- prj u2 = True