-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix documentation #9219
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
Fix documentation #9219
Conversation
The `reflect` function was renamed to `to`, and its references need update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, and thank you for opening this PR! 🎉
All contributors have signed the CLA, thank you! ❤️
Have an awesome day! ☀️
|
||
```scala | ||
def reflect[T: Type, U: Type](f: Expr[T] => Expr[U]): Expr[T => U] = | ||
def to[T: Type, R: Type](f: Expr[T] => Expr[R]): Expr[T => R] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def to[T: Type, R: Type](f: Expr[T] => Expr[R]): Expr[T => R] = | |
def to[T: Type, R: Type](f: Expr[T] => Expr[R])(using QuoteContext): Expr[T => R] = |
'{ (x: T) => ${ f('x) } } | ||
``` | ||
would be rewritten to | ||
```scala | ||
def reflect[T: Type, U: Type](f: Expr[T] => Expr[U]): Expr[T => U] = | ||
def to[T: Type, R: Type](f: Expr[T] => Expr[R]): Expr[T => R] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def to[T: Type, R: Type](f: Expr[T] => Expr[R]): Expr[T => R] = | |
def to[T: Type, R: Type](f: Expr[T] => Expr[R])(using QuoteContext): Expr[T => R] = |
@nicolasstucki The suggested changes are included. |
Thank you @ShapelessCat |
The
reflect
function was renamed toto
, and its references needupdate