From 26311cc2ac500f9f8fdc32fd817e3591bb762ba4 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Sat, 18 Feb 2012 23:23:36 -0500 Subject: [PATCH] single-flonum? is not provided by TR's internals anymore. original commit: 240773ae6f6b998d6f57f423c7f4c2e57bf70fdb --- .../tests/typed-racket/succeed/single-flonum-contract.rkt | 4 ++++ collects/typed-racket/private/type-contract.rkt | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 collects/tests/typed-racket/succeed/single-flonum-contract.rkt diff --git a/collects/tests/typed-racket/succeed/single-flonum-contract.rkt b/collects/tests/typed-racket/succeed/single-flonum-contract.rkt new file mode 100644 index 00000000..619ea287 --- /dev/null +++ b/collects/tests/typed-racket/succeed/single-flonum-contract.rkt @@ -0,0 +1,4 @@ +#lang typed/racket +(provide (all-defined-out)) +(: foo Single-Flonum) +(define foo 1.0f0) diff --git a/collects/typed-racket/private/type-contract.rkt b/collects/typed-racket/private/type-contract.rkt index 5336e972..d24e9f4f 100644 --- a/collects/typed-racket/private/type-contract.rkt +++ b/collects/typed-racket/private/type-contract.rkt @@ -150,15 +150,15 @@ [(== t:-NonNegFlonum type-equal?) #'(flat-named-contract 'Nonnegative-Float (and/c flonum? (lambda (x) (>= x 0))))] [(== t:-NonPosFlonum type-equal?) #'(flat-named-contract 'Nonpositive-Float (and/c flonum? (lambda (x) (<= x 0))))] [(== t:-Flonum type-equal?) #'(flat-named-contract 'Float flonum?)] - [(== t:-SingleFlonumZero type-equal?) #'(flat-named-contract 'Single-Flonum-Zero (and/c t:single-flonum? zero?))] + [(== t:-SingleFlonumZero type-equal?) #'(flat-named-contract 'Single-Flonum-Zero (and/c single-flonum? zero?))] [(== t:-InexactRealZero type-equal?) #'(flat-named-contract 'Inexact-Real-Zero (and/c inexact-real? zero?))] [(== t:-PosInexactReal type-equal?) #'(flat-named-contract 'Positive-Inexact-Real (and/c inexact-real? positive?))] - [(== t:-NonNegSingleFlonum type-equal?) #'(flat-named-contract 'Nonnegative-Single-Flonum (and/c t:single-flonum? (lambda (x) (>= x 0))))] + [(== t:-NonNegSingleFlonum type-equal?) #'(flat-named-contract 'Nonnegative-Single-Flonum (and/c single-flonum? (lambda (x) (>= x 0))))] [(== t:-NonNegInexactReal type-equal?) #'(flat-named-contract 'Nonnegative-Inexact-Real (and/c inexact-real? (lambda (x) (>= x 0))))] [(== t:-NegInexactReal type-equal?) #'(flat-named-contract 'Negative-Inexact-Real (and/c inexact-real? negative?))] - [(== t:-NonPosSingleFlonum type-equal?) #'(flat-named-contract 'Nonpositive-Single-Flonum (and/c t:single-flonum? (lambda (x) (<= x 0))))] + [(== t:-NonPosSingleFlonum type-equal?) #'(flat-named-contract 'Nonpositive-Single-Flonum (and/c single-flonum? (lambda (x) (<= x 0))))] [(== t:-NonPosInexactReal type-equal?) #'(flat-named-contract 'Nonpositive-Inexact-Real (and/c inexact-real? (lambda (x) (<= x 0))))] - [(== t:-SingleFlonum type-equal?) #'(flat-named-contract 'Single-Flonum t:single-flonum?)] + [(== t:-SingleFlonum type-equal?) #'(flat-named-contract 'Single-Flonum single-flonum?)] [(== t:-InexactReal type-equal?) #'(flat-named-contract 'Inexact-Real inexact-real?)] [(== t:-RealZero type-equal?) #'(flat-named-contract 'Real-Zero (and/c real? zero?))] [(== t:-PosReal type-equal?) #'(flat-named-contract 'Positive-Real (and/c real? positive?))]