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,262
    • Issues 4,262
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 404
    • Merge Requests 404
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #4188

Closed
Open
Opened Jul 13, 2010 by illissius@trac-illissius

Template Haskell support for reifying non-vanilla data constructors

Apart from not supporting GADT syntax, Template Haskell also doesn't currently have support for reifying non-vanilla data constructors given with the normal syntax, even though the API is fully capable of representing all of its features.

In the case where I try to reify a data declaration of the form,

data AnyShow = forall a. Show a => AnyShow a

(using !ExistentialQuantification)

I get the error: Can't reify a GADT data constructor: `!AnyShow',

Even though it can easily be represented:

DataD [] AnyShow [] [ForallC [PlainTV a] [ClassP Show [VarT a]] (NormalC AnyShow [(NotStrict,VarT a)])] []

I propose to add support for reifying non-vanilla data constructors given with the normal syntax.

(Of note is that everything that can be done using GADT syntax can also be done with the normal syntax, using !ExistentialQuantification and equality constraints from !TypeFamilies.)

Patch shortly.

Trac metadata
Trac field Value
Version
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Template Haskell
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#4188