From aae17a0bc03de7c7aa2cfb3555838e456ad77e52 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 10 Aug 2015 16:45:12 -0500 Subject: [PATCH] `in-pairs` -> `in-dict` --- typed-racket-lib/typed-racket/infer/constraints.rkt | 8 ++++---- typed-racket-lib/typed-racket/infer/infer-unit.rkt | 4 ++-- typed-racket-lib/typed-racket/types/printer.rkt | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/typed-racket-lib/typed-racket/infer/constraints.rkt b/typed-racket-lib/typed-racket/infer/constraints.rkt index d382cd69..7be1ecf7 100644 --- a/typed-racket-lib/typed-racket/infer/constraints.rkt +++ b/typed-racket-lib/typed-racket/infer/constraints.rkt @@ -2,7 +2,7 @@ (require "../utils/utils.rkt" (types abbrev union subtype) - racket/sequence + racket/dict "fail.rkt" "signatures.rkt" "constraint-structs.rkt" racket/match racket/list) @@ -26,7 +26,7 @@ (define (insert cs var S T) (match cs [(struct cset (maps)) - (make-cset (for/list ([(map dmap) (in-pairs maps)]) + (make-cset (for/list ([(map dmap) (in-dict maps)]) (cons (hash-set map var (make-c S T)) dmap)))])) @@ -66,8 +66,8 @@ [(x y) (match* (x y) [((struct cset (maps1)) (struct cset (maps2))) - (define maps (for*/list ([(map1 dmap1) (in-pairs (remove-duplicates maps1))] - [(map2 dmap2) (in-pairs (remove-duplicates maps2))] + (define maps (for*/list ([(map1 dmap1) (in-dict (remove-duplicates maps1))] + [(map2 dmap2) (in-dict (remove-duplicates maps2))] [v (in-value (% cons (hash-union/fail map1 map2 #:combine c-meet) (dmap-meet dmap1 dmap2)))] diff --git a/typed-racket-lib/typed-racket/infer/infer-unit.rkt b/typed-racket-lib/typed-racket/infer/infer-unit.rkt index 11d9f9f6..f841725b 100644 --- a/typed-racket-lib/typed-racket/infer/infer-unit.rkt +++ b/typed-racket-lib/typed-racket/infer/infer-unit.rkt @@ -25,7 +25,7 @@ (for-syntax racket/base syntax/parse) - racket/sequence + racket/dict racket/hash racket/list) (import dmap^ constraints^) @@ -106,7 +106,7 @@ ;; (CMap DMap -> Pair) CSet -> CSet ;; Map a function over a constraint set (define (map/cset f cset) - (% make-cset (for/list/fail ([(cmap dmap) (in-pairs (cset-maps cset))]) + (% make-cset (for/list/fail ([(cmap dmap) (in-dict (cset-maps cset))]) (f cmap dmap)))) ;; Symbol DCon -> DMap diff --git a/typed-racket-lib/typed-racket/types/printer.rkt b/typed-racket-lib/typed-racket/types/printer.rkt index 7b89357f..6e9f5892 100644 --- a/typed-racket-lib/typed-racket/types/printer.rkt +++ b/typed-racket-lib/typed-racket/types/printer.rkt @@ -3,7 +3,7 @@ ;; This module provides functions for printing types and related ;; data structures such as filters and objects -(require racket/require racket/match racket/sequence racket/string racket/promise +(require racket/require racket/match racket/dict racket/string racket/promise racket/pretty racket/list racket/set @@ -59,7 +59,7 @@ ;; has-name : Type -> Maybe[Listof] (define (has-name? t) (define candidates - (for/list ([(n t*) (in-pairs (in-list (force (current-type-names))))] + (for/list ([(n t*) (in-dict (force (current-type-names)))] #:when (and print-aliases (Type? t*) (type-equal? t t*))) n)) (and (pair? candidates)