Skip to content

Types of quotient/remainder and remainder are not consistent #1039

@LiberalArtist

Description

@LiberalArtist

In Racket 7.9 CS, the type quotient/remainder includes a case (-> Integer Fixnum (values Integer Fixnum)), but remainder's corresponding case is (-> Integer Fixnum Integer). There may be other, similar inconsistencies.

As an example, this program works:

#lang typed/racket
(: my-remainder (-> Integer Fixnum Fixnum))
(define (my-remainder x y)
  (define-values [q r]
    (quotient/remainder x y))
  r)

whereas this version fails to typecheck:

#lang typed/racket
(: my-remainder (-> Integer Fixnum Fixnum))
(define (my-remainder x y)
  (remainder x y))

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions