Commit 2937899b authored by Robert Hensing's avatar Robert Hensing Committed by Yueh-Shun Li
Browse files

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: default avatarYueh-Shun Li <shamrocklee@posteo.net>
parent 30809cce
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -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