Ticket #2904 (closed bug: duplicate)

Opened 4 years ago

Last modified 4 years ago

Broken pipe when quitting "ghc --show-iface file.hi | less"

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

Description

Here is an example of a very minor rough edge in ghc:

% ghc --show-iface Matrix.hi | less
ghc: <stdout>: hFlush: resource vanished (Broken pipe)

If one quits less before reading all the output (a likely scenario), one sees this predictable error message.

I'd argue that one should suppress this message, so users learn to pay attention to the messages they do see.

A work-around is

% ghc --show-iface Matrix.hi 2> /dev/null | less

but this suppresses other messages one might want to see. My attempts at a more precise work-around get me into "damned if you do, damned if you don't" territory. For example,

% (ghc --show-iface Matrix.hi 2| grep -v 'Broken') | less

doesn't work.

Change History

Changed 4 years ago by simonmar

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to duplicate

See #2699

Note: See TracTickets for help on using tickets.