Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,392
    • Issues 4,392
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 373
    • Merge Requests 373
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16881

Closed
Open
Opened 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
Assignee
Assign to
8.10.1
Milestone
8.10.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#16881