Skip to content

Force, rentrent promise promise/e (or, pam/e is too strict) #4

Description

@LeifAndersen

I have the following program:

#lang racket

(require data/enumerate
         data/enumerate/lib)

(pam/e (λ (x) x)
       (letrec ([expr/e (delay/e
                         (or/e
                          natural/e
                          (pam/e (λ (x) x)
                                 expr/e
                                 #:contract any/c)))])
         expr/e)
       #:contract any/c)

And when I run it, I get:

. . racket/racket/collects/racket/private/promise.rkt:104:10: force: reentrant promise `promise/e'

I suspect the problem is related to the inner pam/e, because when I turn the inner expression:

(pam/e (λ (x) x)
    expr/e
    #:contract any/c)))])

Into: expr/e the program runs normally.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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