
#10828: TH could do a better job of representing GADTs -------------------------------------+------------------------------------- Reporter: spinda | Owner: jstolarek Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Replying to [comment:8 jstolarek]:
It is possible to automatically derive `Foldable` for all three declarations `T1`, `T2` and `T3`, both in GADT form as well as in the standard form given above, so `DerivingFoldable` makes no distinction between these three declarations.
I agree that deriving `Foldable` works for all of them, but does it do the same thing? I would expect not, from the commentary on #10447. Your `GadtC` is missing a place for a `[TyVarBndr]` (to store the quantified type variables, both universals and existentials) and a `Cxt` to store any extra constraints. It also forbids record syntax, but maybe we can live without GADT record syntax. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10828#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler