[GHC] #16194: deriving, wrong code: newtype T cat a = MkT ((forall xx. cat xx xx) -> a) deriving stock Functor
GHC
ghc-devs at haskell.org
Fri Jan 18 14:38:25 UTC 2019
#16194: deriving, wrong code: newtype T cat a = MkT ((forall xx. cat xx xx) -> a)
deriving stock Functor
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 8.7
Resolution: wontfix | Keywords: DeriveFunctor
| deriving RankNTypes
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 Iceland_jack):
Thought: The second representation (`g & \g' -> f (g' x)`) can maybe be
captured as a newtype with an instance (like `DList` changes the
representation of change the representation of `[a]` to `Endo [a]`). GHC
would generate the newtype form, the instance takes care of the operation
and coerce back.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16194#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list