Skip to content
GitLab
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 5,399
    • Issues 5,399
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 592
    • Merge requests 592
  • 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 CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #14918
Closed
Open
Issue created Mar 14, 2018 by Ryan Scott@RyanGlScottMaintainer

GHC 8.4.1 regression: derived Read instances with field names containing # no longer parse

(Originally noticed here.)

Consider the following program:

{-# LANGUAGE MagicHash #-}
module Bug where

data T a = MkT { runT# :: a }
  deriving (Read, Show)

t1, t2 :: T Int
t1 = MkT 1
t2 = read $ show t1

main :: IO ()
main = print t2

In GHC 8.2.1, this runs without issue:

$ /opt/ghc/8.2.2/bin/runghc Bug.hs
MkT {runT# = 1}

In GHC 8.4.1, however, this produces a runtime error:

$ ~/Software/ghc-8.4.1/bin/runghc Bug.hs
Bug.hs: Prelude.read: no parse
Edited Mar 10, 2019 by Ryan Scott
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking