Skip to content

Detect when a ~literal is unbound #76

@michaelballantyne

Description

@michaelballantyne

Like syntax-parse does here:

#lang racket

(require (for-syntax syntax/parse))

(define-syntax (m stx)
  (syntax-parse stx
    #:literals (els)
    [(_ else)
     #''TODO]))

(m els)
;; => syntax-parse: literal is unbound in phase 0 (phase 0 relative to the enclosing module) in: els

Unfortunately syntax-parse doesn't do this for ~literal patterns which is what we are using, so we may not be able to just re-use the behavior from syntax-parse. But we can go look at how Ryan implements it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions