gelisam / klister

an implementation of stuck macros
BSD 3-Clause "New" or "Revised" License
134 stars 11 forks source link

local-expand-type #246

Open gelisam opened 5 months ago

gelisam commented 5 months ago

We have decided that we prefer to implement the #244 approach first, but for future reference, at some point it would be nice for a macro to be able to grab some syntax from the code it is transforming, and to parse it into a Type value. This is similar to local-expand, which takes a Syntax object and interprets it into another Syntax object, except that local-expand-type would take a Syntax object and interpret it into a Type value.

(>>= (local-expand-type '(Maybe Integer))
  (lambda (type)
    (type-case type
      [(Maybe Integer) 'success])))