Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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,842
    • Issues 4,842
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 456
    • Merge requests 456
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #11182

Closed
Open
Created Dec 08, 2015 by Ryan Scott@RyanGlScottMaintainer

-XStrict doesn't imply -XStrictData

Compiling this code:

{-# LANGUAGE Strict #-}

data Lazy a = Lazy ~a

main :: IO ()
main = case Lazy undefined of
            Lazy _ -> putStrLn "Lazy"

fails with the following error:

$ .\inplace\bin\ghc-stage2.exe ../Lazy.hs
[1 of 1] Compiling Main             ( ..\Lazy.hs, ..\Lazy.o )

..\Lazy.hs:3:15: error:
    * Lazy annotation (~) without StrictData
        on the first argument of `Lazy'
    * In the definition of data constructor `Lazy'
      In the data type declaration for `Lazy'

I was under the impression that -XStrict implied -XStrictData. Is this not the case?

Trac metadata
Trac field Value
Version 7.11
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC adamse, osa1, tibbe
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking