Skip to content

If a type signature is too long to read left-to-right then let it read top-to-bottom.

When pretty printing a type signature that is too long to show in one line, can we please break the lines on the top-level punctuation of the type signature, on ::, => and -> as shown in the second listing below?

FlareTiming/Task/Score.hs:186:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      showMax :: (Reflex t, Functor f) =>
                 (a -> b)
                 -> (f b -> b -> c) -> Dynamic t (f a) -> Dynamic t a -> Dynamic t c
    |
186 | showMax getField f pt points =
    | ^^^^^^^
FlareTiming/Task/Score.hs:186:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      showMax
        :: (Reflex t, Functor f)
        => (a -> b)
        -> (f b -> b -> c)
        -> Dynamic t (f a)
        -> Dynamic t a
        -> Dynamic t c
    |
186 | showMax getField f pt points =
    | ^^^^^^^

If a type signature is too long to display in one line and read left-to-right then please let it read top-to-bottom.

Edited by Phil de Joux
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information