Skip to content

option/c works inconsistently in DrRacket #3

Description

@dented42

running this file:

#lang racket
(module thing racket
  (require racket/contract/option)
  (provide (contract-out [nothing proc/c] [something proc/c] [something* proc/c]))
  (define (my-list args) (list args))
  (define proc/c (option/c (-> any/c any/c) #:with-contract #t))
  (define something (λ (x) (my-list x)))
  (define something* (λ (x) (list x)))
  (define nothing (λ (x) '())))
(require rackunit 'thing)
(map value-contract `(,nothing ,something ,something*))
(check-equal? (value-contract something) (value-contract nothing))
(check-equal? (value-contract something) (value-contract something*))

in the command line produces the following (expected) output:

'(#<option> #<option> #<option>)

However running it in DrRacket (with dynamic properties set to 'Debugging', the default) produces the following:
image

I genuinely don't know whether to file this issue with racket, DrRacket, or option contracts. I'm happy to refile it elsewhere if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions