Make promote-demote no longer a unit.
This commit is contained in:
parent
7137c8d6a6
commit
5e4eecc8c6
|
@ -18,6 +18,7 @@
|
|||
make-env -> ->* one-of/c)
|
||||
"constraint-structs.rkt"
|
||||
"signatures.rkt" "fail.rkt"
|
||||
"promote-demote.rkt"
|
||||
racket/match
|
||||
mzlib/etc
|
||||
(contract-req)
|
||||
|
@ -27,7 +28,7 @@
|
|||
unstable/sequence unstable/list unstable/hash
|
||||
racket/list)
|
||||
|
||||
(import dmap^ constraints^ promote-demote^)
|
||||
(import dmap^ constraints^)
|
||||
(export infer^)
|
||||
|
||||
;; For more data definitions, see "constraint-structs.rkt"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#lang racket/base
|
||||
|
||||
(require "infer-unit.rkt" "constraints.rkt" "dmap.rkt" "signatures.rkt"
|
||||
"restrict.rkt" "promote-demote.rkt"
|
||||
"restrict.rkt"
|
||||
(only-in racket/unit provide-signature-elements
|
||||
define-values/invoke-unit/infer link))
|
||||
|
||||
(provide-signature-elements restrict^ infer^)
|
||||
|
||||
(define-values/invoke-unit/infer
|
||||
(link infer@ constraints@ dmap@ restrict@ promote-demote@))
|
||||
(link infer@ constraints@ dmap@ restrict@))
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#lang racket/unit
|
||||
#lang racket/base
|
||||
|
||||
(require "../utils/utils.rkt")
|
||||
(require (rep type-rep rep-utils)
|
||||
(require "../utils/utils.rkt"
|
||||
(rep type-rep rep-utils)
|
||||
(types abbrev union utils)
|
||||
"signatures.rkt"
|
||||
racket/list racket/match)
|
||||
|
||||
(import)
|
||||
(export promote-demote^)
|
||||
(provide/cond-contract
|
||||
[var-promote (-> Type/c (listof symbol?) Type/c)]
|
||||
[var-demote (-> Type/c (listof symbol?) Type/c)])
|
||||
|
||||
(define (V-in? V . ts)
|
||||
(for/or ([e (in-list (append* (map fv ts)))])
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
(define-signature dmap^
|
||||
([cond-contracted dmap-meet (dmap? dmap? . -> . (or/c #f dmap?))]))
|
||||
|
||||
(define-signature promote-demote^
|
||||
([cond-contracted var-promote (Type/c (listof symbol?) . -> . Type/c)]
|
||||
[cond-contracted var-demote (Type/c (listof symbol?) . -> . Type/c)]))
|
||||
|
||||
(define-signature constraints^
|
||||
([cond-contracted cset-meet ((cset? cset?) #:rest (listof cset?) . ->* . (or/c #f cset?))]
|
||||
[cond-contracted cset-meet* ((listof cset?) . -> . (or/c #f cset?))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user