more standard merge operation;
authorwenzelm
Sun, 01 Oct 2017 12:28:52 +0200
changeset 66736 148891036469
parent 66735 5887ae5b95a8
child 66737 2edc0c42c883
more standard merge operation;
src/Pure/Thy/sessions.scala
src/Pure/Tools/build.scala
--- a/src/Pure/Thy/sessions.scala	Sat Sep 30 22:55:23 2017 +0200
+++ b/src/Pure/Thy/sessions.scala	Sun Oct 01 12:28:52 2017 +0200
@@ -373,14 +373,14 @@
     session_groups: List[String] = Nil,
     sessions: List[String] = Nil)
   {
-    def + (other: Selection): Selection =
+    def ++ (other: Selection): Selection =
       Selection(
         requirements = requirements || other.requirements,
         all_sessions = all_sessions || other.all_sessions,
-        exclude_session_groups = exclude_session_groups ::: other.exclude_session_groups,
-        exclude_sessions = exclude_sessions ::: other.exclude_sessions,
-        session_groups = session_groups ::: other.session_groups,
-        sessions = sessions ::: other.sessions)
+        exclude_session_groups = Library.merge(exclude_session_groups, other.exclude_session_groups),
+        exclude_sessions = Library.merge(exclude_sessions, other.exclude_sessions),
+        session_groups = Library.merge(session_groups, other.session_groups),
+        sessions = Library.merge(sessions, other.sessions))
 
     def apply(graph: Graph[String, Info]): (List[String], Graph[String, Info]) =
     {
--- a/src/Pure/Tools/build.scala	Sat Sep 30 22:55:23 2017 +0200
+++ b/src/Pure/Tools/build.scala	Sun Oct 01 12:28:52 2017 +0200
@@ -372,7 +372,7 @@
     val (selected, selected_sessions) =
       full_sessions.selection(
           Sessions.Selection(requirements, all_sessions, exclude_session_groups,
-            exclude_sessions, session_groups, sessions) + selection)
+            exclude_sessions, session_groups, sessions) ++ selection)
 
     val deps =
       Sessions.deps(selected_sessions, progress = progress, inlined_files = true,