mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +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 New Issue
Block a user