
#13463: Deriving Functor / Foldable / Traversable for co-pattern type -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: closed Priority: low | Milestone: Component: Compiler | Version: 8.0.1 Resolution: wontfix | 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: | -------------------------------------+------------------------------------- Changes (by dfeuer): * priority: normal => low * status: new => closed * resolution: => wontfix Comment: Valid `Functor` instances are always uniquely determined. Valid `Traversable` instances usually aren't, but are they're tightly constrained. `Foldable` is pretty wild; it could shuffle the stream however it liked. In this case, you'd have to come up with a general convention for ordering such things, which seems impractical. The biggest problem here, probably, is that the deriving mechanism only works with one type at a time (indeed, really one constructor at a time). It doesn't dig into other mentioned types at all, and it seems likely quite hard to do so in a consistent way. GADTs only compound the problem. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13463#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler