Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,865
    • Issues 4,865
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #21101
Closed
Open
Created Feb 18, 2022 by Richard Eisenberg@raeDeveloper

Error message text for invalid record wildcard match

If I say

data LogOutView = LogOutView

html LogOutView { .. } = ()

GHC says

Illegal .. notation for constructor LogOutView.
  The constructor has no labeled fields

On https://github.com/haskell/error-messages/issues/15, we suggest

The data constructor 'LogOutView' does not have named record fields,
so a pattern match 'LogOutView { .. }' is incorrect.
Possible fixes:
 * Replace the pattern 'LogOutView { .. }' with 'LogOutView'
 * Replace the pattern 'LogOutView { .. }' with 'LogOutView {}'. This version works even if
   you add/remove fields to 'LogOutView' later.
 * Add named record fields to the declaration of constructor 'LogOutView' at LogOutView.hs:3.

as an improvement.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking