Skip to content

Commit 5681a1f

Browse files
committed
[ docs ] Remove useless Congratulations section
1 parent 9108288 commit 5681a1f

12 files changed

Lines changed: 9 additions & 143 deletions

docs/source/tutorials/00-installation-and-setup.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,6 @@ Green : TrafficLight
191191

192192
---
193193

194-
## Congratulations!
195-
196-
You have successfully set up Idris 2 and DepTyCheck, created your first project, and run an automatic generator.
197-
198-
In this tutorial, you learned:
199-
200-
* ✅ How to install Idris 2 and DepTyCheck
201-
* ✅ How to create a project with the correct dependencies
202-
* ✅ How to define a data type and derive a generator
203-
* ✅ How to build and run a DepTyCheck project
204-
* ✅ How to use the REPL for interactive testing
205-
206194
## Next Steps
207195

208196
Now that you have a working setup, you are ready to learn the fundamentals of generator creation:

docs/source/tutorials/01-generator-monad.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -221,21 +221,6 @@ Finally, let's generate a list of test users. You can use the `listOf` combinato
221221
222222
---
223223
224-
## Congratulations!
225-
226-
You've learned the fundamentals of creating test data generators with `DepTyCheck`.
227-
228-
You now know how to:
229-
* ✅ Create a simple, constant generator with `pure`.
230-
* ✅ Generate random numbers and pick from lists with `choose` and `elements`.
231-
* ✅ Combine simple recipes into complex ones using `<$>` and `<*>`.
232-
* ✅ Create weighted and unweighted choices with `frequency` and `oneOf`.
233-
* ✅ Create dependent values using `do` notation.
234-
* ✅ Generate a collection of random data with `listOf`.
235-
* ✅ Run any generator to see the result using `pick1`.
236-
237-
This pattern of building small, simple recipes and combining them into larger ones is the core of `DepTyCheck`.
238-
239224
## Next Steps
240225
241226
You've mastered the basics. Where you go next depends on your needs:

docs/source/tutorials/02-handling-emptiness.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,6 @@ This demonstrates another critical aspect of `Gen0`: it allows for speculative g
159159
160160
---
161161
162-
## Congratulations!
163-
164-
You can now write safe, robust generators for complex dependent types and are prepared to handle the full range of data-generating scenarios.
165-
166-
In this tutorial, you learned how to:
167-
168-
* ✅ Identify types that can be uninhabited (empty).
169-
* ✅ Use `Gen0` to define a generator that might not produce a value.
170-
* ✅ Use `empty` to explicitly mark a generation path as impossible.
171-
* ✅ Use `pick` to safely run a `Gen0` and handle the resulting `Maybe` value.
172-
* ✅ Create filtered generators with `suchThat` and understand why they must also be `Gen0`.
173-
174162
## Next Steps
175163
176164
Now that you've mastered manual generation for both simple and complex types, it's time to see how `DepTyCheck` can do this work for you automatically.

docs/source/tutorials/03-measuring-test-coverage.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,7 @@ Besides aggregated reports, labels are also an invaluable tool for debugging. Yo
157157
```
158158
In the first run, the label `"Red"` was printed to the console the moment the corresponding generator was executed. In the second run, no labels were printed. For a deeply nested generator, this trace allows you to understand exactly which path was taken to produce a specific problematic value.
159159
160-
## Congratulations!
161-
162-
You can now generate, analyze, and debug your test generators using labels.
163-
164-
In this tutorial, you learned how to:
165-
166-
* ✅ Use `label` to instrument different paths in your generator.
167-
* ✅ **Aggregate Constructor Coverage:** Use `initCoverageInfo`, `unGenTryND`, and `registerCoverage` to produce a report on which constructors were hit.
168-
* ✅ **Debug Single Runs:** Use `PrintAllLabels` with `pick1` to trace the execution of a single generator run.
169-
* ✅ Understand that runners like `pick1` use a default `IgnoreLabels` implementation that can be overridden with the `@{...}` syntax.
160+
---
170161
171162
## Next Steps
172163

docs/source/tutorials/04-automatic-generator-derivation.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,6 @@ This powerful pattern allows you to create highly flexible generators that adapt
183183
184184
---
185185
186-
## Congratulations!
187-
188-
You have now unlocked the core power of `DepTyCheck`. You can say goodbye to writing boilerplate generators and let the compiler do the work for you, while still providing guidance when needed.
189-
190-
In this tutorial, you learned:
191-
192-
* ✅ How to replace a complex, manual recursive generator with a single `deriveGen` macro.
193-
* ✅ How to provide a **custom generator** for a base type like `String` by adding a `=>` constraint to the signature.
194-
* ✅ How to pass **runtime arguments** to a derived generator to make it more flexible and context-aware.
195-
196186
## Next Steps
197187
198188
Now that you know how to automatically generate data and provide hints, you are ready for more advanced topics:

docs/source/tutorials/05-derivegen-signatures.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,6 @@ Let's combine the patterns we've learned. Our final generator will be the most f
150150
151151
---
152152
153-
## Congratulations!
154-
155-
You have learned to 'speak' to `deriveGen` through its most powerful interface: the type signature. You are no longer just asking it to generate a type; you are giving it a precise blueprint of your intent.
156-
157-
By crafting the signature, you can control what `deriveGen` does:
158-
159-
* ✅ **Given Parameters (`(n : Nat) -> ...`):** Arguments before `Fuel` are treated as fixed runtime inputs.
160-
* ✅ **Generated Parameters (`... -> Gen (n ** Vect n a)`):** Using `**` in the return type tells `deriveGen` to invent a value for that parameter for you.
161-
* ✅ **External Generator Hints (`(...) => ...`):** A constraint tells `deriveGen` to use a generator you provide for a specific type.
162-
163-
Mastering these three patterns gives you the power to create flexible, reusable, and precise automatic generators for indexed types like `Vect` and `Fin`.
164-
165153
## Next Steps
166154
167155
Now that you know how to control `deriveGen` through signatures, you are ready for more advanced topics:

docs/source/tutorials/06-beyond-fuel.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,6 @@ This is the core optimization: when the type system guarantees termination throu
187187

188188
---
189189

190-
## Congratulations!
191-
192-
You now understand the sophisticated, two-pronged approach `deriveGen` uses to handle recursion safely and efficiently. This knowledge will help you design data types that can be generated more effectively and to reason about the performance of your generators.
193-
194-
In this tutorial, you learned:
195-
196-
***`SpendingFuel` Recursion:** The default behavior for simple recursive types like `PNat` or `List`, where each recursive step consumes one unit of fuel.
197-
***`StructurallyDecreasing` Recursion:** An advanced optimization for indexed types like `Fin` or `Vect`, where `deriveGen` proves termination from type indices and doesn't spend fuel.
198-
***Under the Hood:** How `deriveGen` translates to manual Fuel pattern matching, and why the two recursion types generate different code.
199-
200190
## Next Steps
201191

202192
Now that you understand how `deriveGen` handles recursion, you are ready for more advanced topics:

docs/source/tutorials/07-derivation-tuning.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,6 @@ data LtPair : Type where
143143
144144
---
145145
146-
## Congratulations!
147-
148-
You have now learned the true, advanced methods for controlling `DepTyCheck`'s derivation engine. By implementing the tuning interfaces, you can provide expert guidance to the compiler, resulting in efficient and well-distributed test data for any data type.
149-
150-
In this tutorial, you learned how to:
151-
152-
* ✅ **Prove Bias:** Use coverage analysis to find and prove when a default generator is not producing a good data distribution.
153-
* ✅ **Tune Probabilities:** Implement the `ProbabilityTuning` interface to fix biases by giving a constructor a new `Weight`.
154-
* ✅ **Tune Generation Order:** Implement the `GenOrderTuning` interface to tell `deriveGen` which arguments to generate first, making generation for constrained dependent types more efficient.
155-
* ✅ Use advanced Idris features like `instance` declarations and `Name` literals to apply these tuning rules.
156-
157-
This completes the advanced derivation tuning tutorial! You now have the tools to control `deriveGen`'s behavior for any data type.
158-
159146
## Next Steps
160147
161148
* **Want to integrate handwritten generators?** Continue to **[Mixing Manual and Automatic Generation](09-mixing-manual-and-automatic.md)** to see how `deriveGen` automatically discovers and uses your custom generators.

docs/source/tutorials/08-under-the-hood-a-derivegen-like-macro.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ Now we need to create the manager that understands the `Simple` type as a whole.
100100
-- Get constructor info: B first (non-recursive), then A (recursive)
101101
let [conB, conA] = sig.targetType.cons
102102
let emptyGivs = empty -- No given constructor arguments for Simple
103-
103+
104104
-- Get the code for the two constructor bodies using our named strategies
105105
b_body <- consGenExpr @{MyStrategy} sig conB emptyGivs (var "fuel")
106106
a_body <- consGenExpr @{MyStrategy} sig conA emptyGivs (var "fuel")
107-
107+
108108
-- Our biased logic!
109109
let body = `(case fuel of
110110
Dry => ~b_body -- Out of fuel, MUST choose B
@@ -125,7 +125,7 @@ We have now defined a complete, custom derivation pipeline. All that's left is t
125125
126126
## Step 4: Create the Top-Level Macro
127127
128-
Users don't interact with `DeriveBodyForType` directly. They use the `deriveGen` macro. The `deriveGen` function takes an optional `@` argument providing the core derivation logic. By default, this is `MainCoreDerivator @{LeastEffort}`.
128+
Users don't interact with `DeriveBodyForType` directly. They use the `deriveGen` macro. The `deriveGen` function takes an optional `@` argument providing the core derivation logic. By default, this is `MainCoreDerivator @{LeastEffort}`.
129129
130130
We will create our own macro, `myDeriveGen`, that simply calls `deriveGen` but passes our custom `MyTypeStrategy` instead.
131131
@@ -244,17 +244,6 @@ main = do
244244

245245
---
246246

247-
## Congratulations!
248-
249-
You have built a working derivation macro from scratch. You now understand the fundamental architecture of `DepTyCheck`'s derivation engine and have seen that it is not magic, but a well-structured system of extensible interfaces. This is the deepest level of `DepTyCheck` mastery.
250-
251-
In this tutorial, you learned:
252-
253-
* ✅ The core interfaces of the derivation engine: `DeriveBodyForType` and `DeriveBodyRhsForCon`.
254-
* ✅ How the "Type Expert" delegates work to "Constructor Experts".
255-
* ✅ How to implement these interfaces to create a custom derivation strategy.
256-
* ✅ How to wrap up your custom logic in a top-level macro that acts just like `deriveGen`.
257-
258247
## Path to Contribution
259248

260249
Understanding these internal APIs is the first step to extending `DepTyCheck`. If you find a new, useful derivation pattern or a more advanced strategy, you now have the foundational knowledge to implement it and contribute back to the project.

docs/source/tutorials/09-mixing-manual-and-automatic.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ It works! `deriveGen` automatically found and used our `genSpecialString` functi
7777
2. **Explicit (`=>` syntax):** As seen in Tutorial 4, you can add a `(Fuel -> Gen MaybeEmpty String) =>` constraint to the signature.
7878
* **When to use:** This is best when you want to provide a generator for a *primitive* or *built-in* type (like `String`, `Nat`, `List`), or when you want the caller to be able to supply *different* generators in different contexts.
7979
80-
## Congratulations!
81-
82-
You've learned how to seamlessly mix automatic and manual generation, giving you the perfect balance of convenience and control.
80+
---
8381
8482
## Next Steps
8583

0 commit comments

Comments
 (0)