Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile-pattern: unknown cross reference id-id #54

Closed
wilbowma opened this issue May 9, 2016 · 4 comments
Closed

compile-pattern: unknown cross reference id-id #54

wilbowma opened this issue May 9, 2016 · 4 comments

Comments

@wilbowma
Copy link
Collaborator

wilbowma commented May 9, 2016

When I try to use cross in a language definition, or use cross with a non-terminal alias, I get this error.
I'm running redex-lib built from ce1360b.

Here is a test file: https://gist.github.com/wilbowma/4e8dae31a08b7c8eb693d38affa6ee4c

@rfindler
Copy link
Member

rfindler commented May 9, 2016

The 'cross' pattern is not intended for direct use like that. What were you intending to achieve?

@wilbowma
Copy link
Collaborator Author

wilbowma commented May 9, 2016

The first of those three tests passes, which is why I expected the others to work. My intention was to define a non-terminal representing arbitrary contexts by using (cross e).

@rfindler
Copy link
Member

Here's the code in question, for easy reference:

#lang racket/base

(require
 redex/reduction-semantics)

(define-language lcL
  (e t ::= () (λ (x) e) (e e))
  (C ::= (cross e)))

(module+ test
  (require rackunit)
  (check-true
   (redex-match? lcL (cross e) (term (λ (x) hole))))
  (check-true
   (redex-match? lcL (cross t) (term (λ (x) hole))))
  (check-true
   (redex-match? lcL C (term (λ (x) hole)))))

@rfindler
Copy link
Member

This appears to have been fixed somewhere along the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants