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,400
    • Issues 5,400
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 588
    • Merge requests 588
  • 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
  • #9692
Closed
Open
Issue created Oct 15, 2014 by hpacheco@trac-hpacheco

Template Haskell reification for Data Families is buggy?

I have found an example where I think that the TH reification for data/newtype families is incorrect, in that if forgets non-bound type variables in instance declarations.

For the attached example, it will infer the Info:

FamilyI (FamilyD DataFam TyFamReifyDefs.F [PlainTV a_1627399879,PlainTV b_1627399880] (Just StarT)) [DataInstD [] TyFamReifyDefs.F [ConT GHC.Types.Int] [NormalC TyFamReifyDefs.FInt [(NotStrict,VarT x_1627399881)]] []]

Note how the variable x is not declared in the body of the DataInstD. Since it does not need to have the same name as the family-declared variable, substituting is non-trivial this way...

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