Plutonomicon / plutarch-plutus

Typed eDSL for writing UPLC /ˈpluː.tɑːk/
MIT License
124 stars 64 forks source link

New `plutarch-extra` functions from Liqwid-Labs #542

Closed SeungheonOh closed 2 years ago

SeungheonOh commented 2 years ago

This is first batch of plutarch-extra functions from Liqwid-Labs/liqwid-plutarch-extra.

L-as commented 2 years ago

Do you have any tests you could port over?

L-as commented 2 years ago

Thanks BTW! Looks great from a first look.

SeungheonOh commented 2 years ago

We did have some test, but I don't think they will be compatible with plutarch-test because we use liqwid-labs/plutarch-quickcheck for property checking and tasty for unit tests. Not much was there for these functions as well.

L-as commented 2 years ago

By the way, I noticed that these functions were originally Apache licensed. I assume Liqwid owns all of the copyright for the code in that repo? In that case, it's OK, otherwise, it gets a bit messy due to how Apache works.

L-as commented 2 years ago

I don't really think we can merge this without tests. Perhaps we can bring in plutarch-quickcheck, and also clean it up in the process. I was always a bit baffled by your problems with it.

SeungheonOh commented 2 years ago

Those functions are copyrighted under Liqwid-Labs. I'll get confirmation from @emiflake to make sure.

Plutarch-Quickcheck 2.0 has been released and it's currently at an usable state. The previous problems have only been circumvented by only allowing hask types that can be lifted at this point. However, thanks to the addition of evalTerm, we can have efficient shrinkers that doesn't grow almost exponentially in size for non-liftable types (mostly scott encoded lists).

I think with a bit of cleaning we can replace current Hedgehog properties with this one as well. It will be quite quicker than Hedgehog.

emiflake commented 2 years ago

I assume Liqwid owns all of the copyright for the code in that repo?

Yes, this is correct.

SeungheonOh commented 2 years ago

I think going with these tests is a good idea for now. Using PQ should be in another PR.

SeungheonOh commented 2 years ago

Oh wow pelimList is quite a bit faster

SeungheonOh commented 2 years ago

Liqwid-Labs internally, we found out some(a lot) of functions here are quite poorly designed and we have decided to rewrite/update them all together. Therefore, this PR will be closed, and there will be new PRs with revised functionalities.

Sorry for inconvenience.