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,239
    • Issues 5,239
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 566
    • Merge requests 566
  • 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
  • #14290
Closed
Open
Issue created Sep 27, 2017 by Simon Marlow@simonmarDeveloper

Strictness bug with existential contexts on data constructors

The following:

{-# LANGUAGE ExistentialQuantification #-}
module Main (main) where
 
main :: IO ()
main = r `seq` return ()

r :: Rec
r = Rec{ a = error "xxx", b = 3, c = True }

class C t
instance C Bool

data Rec = forall t. C t => Rec
  { a :: ()
  , b :: !Int
  , c :: t
  }

Should succeed, but fails with error "xxx" (but only when compiled with -O). The problem is that the strictness signature for the data con wrapper doesn't take into account the dictionary fields.

I have a patch which I'll upload to Phabricator shortly...

Edited Mar 10, 2019 by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking