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

tx-generator TODO cleanups #5296

Merged
merged 10 commits into from
Jun 21, 2023
Merged

tx-generator TODO cleanups #5296

merged 10 commits into from
Jun 21, 2023

Conversation

NadiaYvette
Copy link
Contributor

@NadiaYvette NadiaYvette commented Jun 5, 2023

This addresses several places in the code marked with TODO, though the scope of the tasks marked strayed across modules sometimes. It also adds haddock documentation to a number of modules.

@NadiaYvette NadiaYvette self-assigned this Jun 5, 2023
@NadiaYvette NadiaYvette force-pushed the nadia.chambers/tx-gen-cleanups-01 branch 3 times, most recently from 61cb053 to 28191b3 Compare June 8, 2023 14:01
@NadiaYvette NadiaYvette force-pushed the nadia.chambers/tx-gen-cleanups-01 branch 2 times, most recently from 0698a23 to c333b38 Compare June 15, 2023 14:01
@NadiaYvette NadiaYvette requested a review from a team as a code owner June 17, 2023 02:25
@NadiaYvette NadiaYvette added the WIP Work In Progress (cannot be merged yet) label Jun 19, 2023
@NadiaYvette NadiaYvette force-pushed the nadia.chambers/tx-gen-cleanups-01 branch 4 times, most recently from 635f87b to 5db1929 Compare June 20, 2023 23:33
@NadiaYvette NadiaYvette requested review from a team as code owners June 20, 2023 23:33
Avoid import and increase readability

Avoid an import and increase readability
First cut at documenting Action.

Clean up haddock warnings & add module header.

Check in progress for Generator.

The whole data structure wasn't gotten through, but some comments
preparing for haddock, but not shown in it, were left on the cases
of the coproduct that hadn't been completely deciphered yet.

Beginnings of Env haddock

This is only really being checked in because a pull and rebase demanded
doing so. It would have been less log pollution if things wouldn't have
been rebased until after various more complete steps had been completed.

Module description for Env.

Check in Error type description.

Update haddock after new info from Micha.

Document Selftest and Action modules.

Document Wallet.
The module header haddock still had a reference to a function that had
just been moved mentioning the circular module import issues moving it
solved.

Fix stray detritus from merginga in Action
Document the Fund module.

This should silence some haddock warnings.

Haddock for FundQueue.

This was maybe too simple to merit documenting, but it silences haddock
warnings.

More docs and quieting haddock warnings.

Some of these are a bit trivial. There may be some debate as to how
worthwhile comments of these forms are. Some of the trivial and
repetitive things might make sense to be done with lenses so as to
cut down on what adds up to boilerplate code.

Add haddock for the Fifo data structure

The alternative implementation of removeN might be a bit verbose.

Trim down the removeN comment to something saner.

Document the Utils module.

Haddock for PlutusContext.
@NadiaYvette NadiaYvette force-pushed the nadia.chambers/tx-gen-cleanups-01 branch from 5db1929 to 3f1e41f Compare June 20, 2023 23:35
Copy link
Contributor

@mgmeier mgmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you @NadiaYvette !

mangle :: Monad m => [ CreateAndStore m era ] -> CreateAndStoreList m era [ Lovelace ]
mangle fkts values
= (outs, \txId -> mapM_ (\f -> f txId) fs)
where
(outs, fs) =unzip $ map worker $ zip3 fkts values [TxIx 0 ..]
worker (toUTxO, value, idx)
(outs, fs) = unzip $ zipWith3 worker fkts values [TxIx 0 ..]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@mgmeier mgmeier added this pull request to the merge queue Jun 21, 2023
@mgmeier mgmeier removed the WIP Work In Progress (cannot be merged yet) label Jun 21, 2023
Merged via the queue into master with commit 51c9002 Jun 21, 2023
@iohk-bors iohk-bors bot deleted the nadia.chambers/tx-gen-cleanups-01 branch June 21, 2023 11:58
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.

2 participants