Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,269
    • Issues 4,269
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 413
    • Merge Requests 413
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #19200

Closed
Open
Opened Jan 11, 2021 by jwaldmann@jwaldmann

ghci :info should show fixity of operator that is lacking a fixity declaration

While discussing a syntax question, I wanted to say "you first look up all the fixity information" but then I got:

Prelude> :i ($)
($) :: (a -> b) -> a -> b 	-- Defined in ‘GHC.Base’
infixr 0 $

Prelude> foo # bar = undefined
Prelude> :i (#)
(#) :: p1 -> p2 -> a 	-- Defined at <interactive>:1:5

So what fixity does # have? Of course, every-one knows it's infixl 9 (https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-820004.4.2) (NB: and it's easy to find, too - just scroll down to the very end of https://www.haskell.org/documentation/ because that's obviously where the most important documents are)

Well anyway, could ghci perhaps print a line

-- lacking a fixity declaration, assumed to be infixl 9 

or

infixl 9 #  -- assumed, since a fixity declaration is lacking

where I'm trying to use language of the standard verbally.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#19200