Skip to content

Commit 74ddb60

Browse files
committed
use the more sensible ordering because it manifests in elm.json deps
1 parent cd682c9 commit 74ddb60

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

compiler/src/Elm/Package.hs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ data Name =
5858
{ _author :: !Author
5959
, _project :: !Project
6060
}
61+
deriving (Ord)
6162

6263

6364
type Author = Utf8.Utf8 AUTHOR
@@ -267,14 +268,6 @@ instance Eq Canonical where
267268
version1 == version2 && package1 == package2
268269

269270

270-
instance Ord Name where
271-
compare (Name author1 project1) (Name author2 project2) =
272-
case compare project1 project2 of
273-
LT -> LT
274-
EQ -> compare author1 author2
275-
GT -> GT
276-
277-
278271

279272
-- BINARY
280273

0 commit comments

Comments
 (0)