jonsterling / racket-grit

Grit: the kernel around which a PRL forms
Other
3 stars 0 forks source link

Allow LF signatures to be used as a #lang #7

Open david-christiansen opened 7 years ago

david-christiansen commented 7 years ago

It would be convenient to allow an LF signature to be easily used as a Racket language.

I imagine something like this:

foo.rkt:

#lang racket
(provide (signature-out foo))
(define-signature foo
  (thing () (TYPE))
  (other-thing () (thing))
  (more ((x (thing))) (thing)))

bar.rkt

#lang lf "foo.rkt" foo
(thing)
(other-thing)
(more)

and have (more) throw a syntax error for being ill-formed according to the signature.