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

Plutus.V1.Ledger.Value uses OverloadedLists #4517

Closed
phadej opened this issue Apr 4, 2022 · 6 comments
Closed

Plutus.V1.Ledger.Value uses OverloadedLists #4517

phadej opened this issue Apr 4, 2022 · 6 comments
Labels

Comments

@phadej
Copy link

phadej commented Apr 4, 2022

Summary

... and sometimes when GHC does (or doesn't) something the code using that module fails to compile:

GHC Core to PLC plugin: E042:Error: Unsupported feature: Irreducible type family application: GHC.Exts.Item
Context: Compiling type: GHC.Exts.Item
                           [(Plutus.V1.Ledger.Value.CurrencySymbol,
                             PlutusTx.AssocMap.Map
                               Plutus.V1.Ledger.Value.TokenName GHC.Integer.Type.Integer)]

cc @brunjlar

Steps to reproduce the behavior

write scripts. In case I see, GHC produces coercions from [GHC.Exts.Item ...] to [(CurrencySymbol, AssocMap TokenName Integer)]. In other words, GHC doesn't see any reason to reduce Item type-family as it is just an intermediate type.

Actual Result

Expected Result

compilation works.

Describe the approach you would take to fix this

don't use OverloadedLists in plutus code.

System info

@phadej phadej added the bug label Apr 4, 2022
@phadej
Copy link
Author

phadej commented Jul 21, 2022

We are constantly hit by this bug. It's hard to reproduce as it seems to happen in incremental builds.

Please don't use OverloadedLists in plutus code (or make plutux-tx-plugin able to handle it).

@bezirg
Copy link
Contributor

bezirg commented Jul 29, 2022

This is is resolved in master.

@KristianBalaj
Copy link

@bezirg Could you please link to a PR/commit that fixed this issue?

@bezirg
Copy link
Contributor

bezirg commented Sep 26, 2022

@bezirg
Copy link
Contributor

bezirg commented Sep 26, 2022

@KristianBalaj Do you still run into a similar issue and needs to be reopened?

@KristianBalaj
Copy link

@bezirg sorry for the late reply, I've missed a notification.

No need to reopen I've checked whether the 4e0d6ed commit hash is in the git log of this commit of plutus we're using a56c965
It seems it's not. So it's okay that we're still experiencing the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants