IntersectMBO / IntersectMBO/plutus
Report better errors when the plugin fails to run in GHCi
- Dominant language
- Haskell
- Stars
- 1.6k
- Forks
- 508
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
Running the plugin in GHCi often fails with the following message: “GHC Core to PLC plugin: Error: Found invalid marker, not applied correctly in expression plc”.
Here, “marker” refers to PlutusTx.Plugin.Utils.plc, which is what the plugin looks for and processes.
The plugin requires that the plc function be [applied to the right arguments](https://github.com/IntersectMBO/plutus/blob/a9729bcfda308f0d39564cf4631cfa8183674e4f/plutus-tx-plugin/src/PlutusTx/Plugin.hs#L319-L330) - i.e., type arguments loc, a, and term arguments Proxy loc, a. Otherwise, it throws [InvalidMarkerError](https://github.com/IntersectMBO/plutus/blob/a9729bcfda308f0d39564cf4631cfa8183674e4f/plutus-tx-plugin/src/PlutusTx/Plugin.hs#L332).
When running in GHCi, GHCi may insert things like breakpoints to make debugging possible, which may cause plc to no longer be applied to the right arguments. When this happens, a more illuminating error message should be reported.
Extricated from https://input-output.atlassian.net/browse/PLT-9311
Contributor guide
Assessment
This issue has not been assessed yet.