
#14046: “Illegal type synonym family application in instance” is too strict in the presence of functional dependencies -------------------------------------+------------------------------------- Reporter: lexi.lambda | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: #3485 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Random thoughts, we can derive `MonadReader Bool` {{{#!hs newtype A a = A (Bool -> a) deriving newtype (Functor, Applicative, Monad, MonadReader Bool) }}} but given an instance like `instance (Representable f, Rep f ~ a) => MonadReader a (Co f)`.. if we ever want to (non-standalone) derive that we cannot specify the context.. and if we can [https://www.reddit.com/r/haskell/comments/6ksr76/rfc_part_1_deriving_instanc... derive via newtypes] the `~(Rep f)` notation makes sense to have: {{{#!hs newtype B f a = B (f a) deriving newtype (Functor, Applicative, Monad) deriving via Co (B r) (MonadReader ~(Rep r)) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14046#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler