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:
parent
30809ccecd
commit
2937899bef
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue