[GHC] #15959: If a type signature is too long to read left-to-right then let it read top-to-bottom.

#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 | Status: new request | Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- 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 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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

#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: | -------------------------------------+------------------------------------- Comment (by simonpj): Yes, good idea! Should not be too difficult. See `IfaceType` which is where the main pretty-printer is. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15959#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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: | -------------------------------------+------------------------------------- Changes (by harpocrates): * cc: harpocrates (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15959#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC