From db07756a7393468cede9b2ee304d9b5eb3b1403b Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Wed, 6 Jul 2005 03:07:18 +0000 Subject: [PATCH] merging 355:360 from branches/sstrickl Added basic uniqueness checks for type/class members, fun args, etc. Also added checks to make sure that all exports for the same type agree in what they're exporting. svn: r361 --- .../private/compiler/translate-class-utils.ss | 36 ++++++++++- .../typechecker/typecheck-expression.ss | 23 +++++++ .../honu/private/typechecker/typechecker.ss | 61 ++++++++++++++++++- collects/honu/utils.ss | 16 +++++ 4 files changed, 134 insertions(+), 2 deletions(-) diff --git a/collects/honu/private/compiler/translate-class-utils.ss b/collects/honu/private/compiler/translate-class-utils.ss index 316f0db2f6..cdaa3f66c5 100644 --- a/collects/honu/private/compiler/translate-class-utils.ss +++ b/collects/honu/private/compiler/translate-class-utils.ss @@ -1,8 +1,10 @@ (module translate-class-utils mzscheme (require (lib "list.ss" "srfi" "1") + (only (lib "list.ss") quicksort) (lib "plt-match.ss") "../../ast.ss" + "../../readerr.ss" "../../tenv.ss" "../../utils.ss" "../typechecker/type-utils.ss" @@ -81,7 +83,38 @@ (honu:exp-bind-new (car exp-binds)) (honu:type-disp? (tenv:member-type matched))) comp-binds))))))))) - + + (define (sort-binds export) + (quicksort (comp:export-binds export) + (lambda (b1 b2) + (tenv-keystring (syntax-e a)) + (symbol->string (syntax-e b)))) + + (provide get-first-non-unique-name) + (define (get-first-non-unique-name lst) + (let loop ([lst (quicksort lst identifier