From 31637d4439b86abc6fc21799106e312d3515b8f1 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 15 May 2015 14:20:26 -0400 Subject: [PATCH] Do not link to the same object more than once --- cyclone.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cyclone.scm b/cyclone.scm index ff22f024..20cae660 100644 --- a/cyclone.scm +++ b/cyclone.scm @@ -249,11 +249,13 @@ (program? (let ((objs-str (if (tagged-list? 'import (car in-prog)) - (apply string-append - (map - (lambda (str) - (string-append " " str " ")) - (lib:imports->objs (cdar in-prog)))) + (apply + string-append + (delete-duplicates + (map + (lambda (str) + (string-append " " str " ")) + (lib:imports->objs (cdar in-prog))))) ""))) (if (equal? 0 (system