lib.fixedPoints.toExtension: Improve type

This makes the type more informative and general - closer to how the function behaves, particularly in isolation.

Co-authored-by: Yueh-Shun Li <shamrocklee@posteo.net>
This commit is contained in:
Robert Hensing 2024-08-28 11:26:32 +02:00 committed by Yueh-Shun Li
parent 30809ccecd
commit 2937899bef

View File

@ -463,8 +463,17 @@ rec {
# Type
```
toExtension ::: (a | a -> a | a -> a -> a) -> a -> a -> a
a = AttrSet & !Function
toExtension ::
b' -> Any -> Any -> b'
or
toExtension ::
(a -> b') -> Any -> a -> b'
or
toExtension ::
(a -> a -> b) -> a -> a -> b
where b' = ! Callable
Set a = b = b' = AttrSet & ! Callable to make toExtension return an extending function.
```
# Examples