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,836
    • Issues 4,836
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 459
    • Merge requests 459
  • 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
  • #16881

Closed
Open
Created Jun 27, 2019 by Richard Eisenberg@raeDeveloper

Template Haskell drops unary tuples

Summary

Template Haskell drops unary tuples

Steps to reproduce

foo = $( return (TupE [VarE 'undefined]) )

bar = foo `seq` "hi"

and evaluate bar. You will observe undefined is evaluated leading to an exception.

Expected behavior

I expect Template Haskell to throw an exception, saying that unary tuples do not exist.

Environment

  • GHC version used: 8.6

Commentary

Convert.hs drops unary tuple constructors. Of course, we don't have unary boxed tuples, but if foo is accepted above, I would surely expect bar to be "hi". Instead, we should just reject foo outright.

Edited Jun 27, 2019 by Richard Eisenberg
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking