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

PyF as a source plugin #146

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

PyF as a source plugin #146

wants to merge 17 commits into from

Conversation

guibou
Copy link
Owner

@guibou guibou commented Jan 6, 2025

First implementaiton of #49

guibou added 13 commits January 3, 2025 17:44
The new plugin, activable with `-fplugin=PyF.Plugin` can detect the
usage of `fmt` and replace the template haskell by pure haskell code at
plugin time. In the future, it could be possible to simplify the code
(e.g. no more template Haskell, no more `Meta.hs`), give nicer feedbacks
(instance errors can be localized on the real expression) and it should
be faster because plugin do not require the dynamic logic required for
template haskell.
`String` inside the AST.

TODO: restore correct locations.
By replacing the remaining QQ we have in the source code of nova in
silico, I aim at having faster and more robust HLS.

```
git grep -o -h '\[[a-zA-Z0-9]\+|' **/*.hs | sort | uniq -c | sort -n -k1
      2 [strTrim|
      6 [fmtTrim|
     23 [duration|
     51 [aesonQQ|
    231 [fmt|
```
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

Successfully merging this pull request may close these issues.

1 participant