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

GHC ghc-devs at haskell.org
Thu Dec 13 22:55:53 UTC 2018


#15080: List Operators Sorted by Precedence in GHCi
-------------------------------------+-------------------------------------
        Reporter:  sjs               |                Owner:
                                     |  artemohanjanyan
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  GHCi              |              Version:  8.2.2
      Resolution:                    |             Keywords:  operator
                                     |  precedence,  newcomer
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 sjs):

 The current iteration of this is really simple, it adds a `:fixities`
 command to GHCi that shows a table of all functions in scope with non-
 default fixities.  With just the Prelude loaded, here's the output:

 {{{
 Prelude> :fixities
 9: right: .
 8: right: ^ ** ^^
 7: left:  * / div mod quot rem
 6: left:  + -
    right: <>
 5: right: ++
 4: left:  <*> *> <$ <* <$>
    none:  elem >= == /= < <= > notElem
 3: right: &&
 2: right: ||
 1: left:  >>= >>
    right: =<<
 0: right: $ seq $!
 }}}

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


More information about the ghc-tickets mailing list