Skip to content

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

@LeifAndersen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions