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 461
    • Merge requests 461
  • 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
  • #21265
Closed
Open
Created Mar 19, 2022 by Ryan Scott@RyanGlScottMaintainer

winery-1.3.2 panics on HEAD (expectJust isRecDataCon:go_tc_app)

(Originally discovered in a head.hackage build here.)

The winery-1.3.2 library on Hackage panics when compiled with GHC HEAD at commit bb779b90. Here is a minimized example:

{-# LANGUAGE RankNTypes #-}
module Codec.Winery.Class (extractorProduct') where

class GSerialiseProduct f where
  dummy :: f x -> ()
  productExtractor :: TransFusion [] ((->) Bool) (f Int)

extractorProduct' :: GSerialiseProduct f => Maybe (f Int)
extractorProduct' = unTransFusion productExtractor go

go :: f x -> Maybe (g x)
go _ = Nothing

newtype TransFusion f g a = TransFusion { unTransFusion :: forall h. Applicative h => (forall x. f x -> h (g x)) -> h a }
$ ~/Software/ghc-9.3.20220316/bin/ghc Bug.hs -O -fforce-recomp
[1 of 1] Compiling Codec.Winery.Class ( Bug.hs, Bug.o )

<no location info>: error:
    expectJust isRecDataCon:go_tc_app
CallStack (from HasCallStack):
  error, called at compiler/GHC/Data/Maybe.hs:71:27 in ghc:GHC.Data.Maybe
  expectJust, called at compiler/GHC/Core/Opt/WorkWrap/Utils.hs:1348:25 in ghc:GHC.Core.Opt.WorkWrap.Utils

This regression was introduced in commit 8ff32124 (DmdAnal: Don't unbox recursive data types). cc @sgraf812

Edited Mar 19, 2022 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