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,310
    • Issues 4,310
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 382
    • Merge Requests 382
  • 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
  • #11044

Closed
Open
Opened Nov 01, 2015 by inaki@trac-inaki

Parse error on empty multi-line deprecation warnings

Bug #3303 (closed) introduced support for multi-line deprecation messages, with syntax

{-# DEPRECATED someFunction ["One line", "another line"] #-}

The following gives a parse error, though:

{-# DEPRECATED someFunction [] #-}

I think that it would be reasonable to treat this case as

{-# DEPRECATED somefunction "" #-}

For motivation: we ran into this problem when writing bindings to external libraries. The API description for the original library includes deprecation info, with the deprecation messages sometimes spanning multiple lines, so it was convenient to use the list syntax above when generating the Haskell wrappers. But the parse error forced us to special case the case of no deprecation message. We can easily do this, of course, but perhaps the restriction to non-empty lists was not intentional?

Trac metadata
Trac field Value
Version 7.10.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
8.0.1
Milestone
8.0.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#11044