Deprecated
Result-based Try functions (procedural Map_Exception pattern)
Try_To_Result- UseFunctional.Try.Map_To_ResultTry_To_Any_Result_With_Param- UseFunctional.Try.Map_To_Result_With_ParamTry_To_Functional_Result- UseFunctional.Try.Map_To_ResultTry_To_Result_With_Param- UseFunctional.Try.Map_To_Result_With_Param
Rationale: Declarative exception mappings (data) are clearer and more
maintainable than procedural Map_Exception functions (code). The Map
versions use a mapping array that is self-documenting and allows multiple
exception-to-error-kind discriminations without if/elsif chains.
Note: Option-based Try functions (Try_To_Functional_Option,
Try_To_Option_With_Param) are NOT deprecated. They serve valid use cases
for "probe" operations with sensible defaults where error details don't matter.
Changed
Functional.Try.To_Result- Reimplemented with inline exception handling
instead of delegating to deprecatedTry_To_Functional_Result. This eliminates
deprecation warnings when building the functional library itself.Functional.Try.To_Option- Reimplemented with inline exception handling
instead of delegating toTry_To_Functional_Option(consistency).- Added "When to Use Option" documentation section to
functional-try.ads
Fixed
- Suppress expected warnings in test suite:
test_try.adb: obsolescent warnings (testing deprecated functions still work)test_scoped.adb: "condition is always True" (intentional test pattern)
- Added
*__GNATPP-TEMPto.gitignore(GNAT Pretty Print temp files)
Technical Details
- Test Coverage: 269 unit tests (all passing)
- SPARK Status: 410 checks: 8 flow, 401 proved, 1 unproved (~98% proved)
SPARK Formal Verification
| Metric | Result |
|---|---|
| Status | Verified |
| Mode | gnatprove --mode=prove --level=2 |
| Results | 410 checks: 8 flow, 401 proved, 1 unproved |
Verified using SPARK Ada formal verification tools.