Ticket #4433 (closed bug: wontfix)

Opened 3 years ago

Last modified 3 years ago

Suboptimal rendering of long type signatures

Reported by: osaunders Owned by:
Priority: normal Milestone:
Component: GHCi Version: 6.12.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

At present GHCi displays the type signature of zipWith7 like this:

zipWith7 ::
  (a -> b -> c -> d -> e -> f -> g -> h)
  -> [a]
  -> [b]
  -> [c]
  -> [d]
  -> [e]
  -> [f]
  -> [g]
  -> [h]

Is it possible to could be displayed like this instead?:

zipWith7 ::
  (a -> b -> c -> d -> e -> f -> g -> h)
  -> [a] -> [b] -> [c] -> [d]
  -> [e] -> [f] -> [g] -> [h]

Change History

Changed 3 years ago by simonpj

This would be easy to do (use fsep instead of sep) but it'd affect the display of all types in GHCi. That is, types would be displayed with as many arguments as would fit on each line. Perhaps one on one line, three on the next, two on the next...

f :: a -> b -> c
  -> Either a b
  -> [b] -> [c]
  -> b -> c -> a

If that's what's wanted, it's easy to do. Perhaps broadcast a proposal to ghc-users?

Simon

Changed 3 years ago by osaunders

I'm not on the list. Could you do it for me? If you can't be bothered then don't worry. I don't really care that much. I just thought it was a good idea and someone might want to carry it forward.

Changed 3 years ago by simonpj

Your idea seems a good one, but if I am on the critical path to forming a consenus to go ahead and make a change, then progress will be slow. It will be faster if you drive! I could send an email to the list on your behalf, but then you would be unable to respond to any replies, which seems a pity. Why not join?

Simon

Changed 3 years ago by igloo

  • status changed from new to closed
  • resolution set to wontfix

I'll close this ticket for now, but if someone wants to take the reins please feel free to reopen it.

Note: See TracTickets for help on using tickets.