1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

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