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,323
    • Issues 4,323
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 377
    • Merge Requests 377
  • 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
  • #16456

Closed
Open
Opened Mar 18, 2019 by Krzysztof Gogolewski@monoidalDeveloper

Typed holes show applications to inferred arguments

Typed hole suggestions print type arguments using @T, even if the argument is inferred. For example,

λ> :set -XPolyKinds -XTypeApplications
λ> data T a = MkT
λ> foo :: T Int; foo = _

<interactive>:3:21: error:
    • Found hole: _ :: T Int
    • In the expression: _
      In an equation for ‘foo’: foo = _
    • Relevant bindings include
        foo :: T Int (bound at <interactive>:3:15)
      Valid hole fits include
        foo :: T Int (bound at <interactive>:3:15)
        MkT :: forall k (a :: k). T a
          with MkT @* @Int
          (defined at <interactive>:2:12)

The penultimate line should be MkT @Int (or, if we allowed to specify inferred arguments, something like MkT @{*} @Int).

The motivation comes from the linear types branch; in linear types, constructors have additional inferred multiplicity arguments, which significantly clutters the output.

Edited Mar 18, 2019 by Krzysztof Gogolewski
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#16456