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,410
    • Issues 5,410
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 604
    • Merge requests 604
  • 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
  • #23036
Closed
Open
Issue created Feb 23, 2023 by Krzysztof Gogolewski@monoidalDeveloper

Template Haskell quotes drop strictness of bindings

Quoting a strict binding gives the same result as a lazy binding:

ghci> :set -XTemplateHaskell
ghci> [|let x = undefined in ()|]
LetE [ValD (VarP x_0) (NormalB (VarE GHC.Err.undefined)) []] (ConE GHC.Tuple.())
ghci> [|let !x = undefined in ()|]
LetE [ValD (VarP x_1) (NormalB (VarE GHC.Err.undefined)) []] (ConE GHC.Tuple.())
ghci> $([|let x = undefined in ()|])
()
ghci> $([|let !x = undefined in ()|])
()

The last line should throw an exception.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking