[GHC] #15959: If a type signature is too long to read left-to-right then let it read top-to-bottom.
GHC
ghc-devs at haskell.org
Tue Nov 27 13:37:17 UTC 2018
#15959: If a type signature is too long to read left-to-right then let it read top-
to-bottom.
-------------------------------------+-------------------------------------
Reporter: philderbeast | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 8.6.3
Component: Compiler | Version: 8.6.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by philderbeast:
Old description:
> 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.
New description:
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.
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15959#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list