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,267
    • Issues 4,267
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 408
    • Merge Requests 408
  • 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
  • #14761

Closed
Open
Opened Feb 05, 2018 by dminuoso@dminuosoReporter

Incorrect diagnostic for UNPACK/missing strictness

data A = A { a :: {-# UNPACK #-} Maybe Int}
[1 of 1] Compiling Main             ( Temp.hs, Temp.o )

Temp.hs:1:19: error:
    • Unexpected strictness annotation: {-# UNPACK #-}Maybe
    • In the type ‘{-# UNPACK #-}Maybe Int’
      In the definition of data constructor ‘A’
      In the data declaration for ‘A’
  |
1 | data A = A { a :: {-# UNPACK #-} Maybe Int}
  |

The diagnostic is incorrect because it complains about an "unexpected strictness annotation" although the error is the opposite.

A quick glance at the relevant GHC code suggests that it's running into the wrong diagnostic from #7210 (closed). Verified on nightly-2018-01-29.

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