[GHC] #15080: List Operators Sorted by Precedence in GHCi

GHC ghc-devs at haskell.org
Tue Apr 24 06:14:31 UTC 2018


#15080: List Operators Sorted by Precedence in GHCi
-------------------------------------+-------------------------------------
           Reporter:  sjs            |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:  8.6.1
          Component:  GHCi           |           Version:  8.2.2
           Keywords:  operator       |  Operating System:  Unknown/Multiple
  precedence                         |
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 In a large project, it can be difficult to keep track of the precedence of
 operators.  It would be a nice quality-of-life improvement if there were a
 GHCi command to list the current operators in scope by precedence.  It
 could list them in a table like this:


 {{{
 :operators

 | prec | nonassoc | leftassoc | rightassoc |
 |------+----------+-----------+------------|
 |    9 | !!       |           | .          |
 |    8 |          |           | ^ ^^ **    |
 |    7 | * /      |           |            |
 |    6 | + -      |           |            |
 |    5 |          |           | : ++       |
 |    4 |          | ==        |            |
 }}}

 Perhaps it could list all infix operators, as well as functions that have
 a fixity declaration?

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15080>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list