
#12784: Typechecker regression in GHC 8.0.2 involving DefaultSignatures -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.2 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): I just mean to say that `monad-logger` should just fix its code, since the fix will surely be needed anyway. RyanGlScott, it's more wrong than that. Let's charitably assume that `t m` refers to the instance we are deriving, like `IdentityT m`. Then how can the body of the default declaration type check? {{{#!hs askLoggerIO = Trans.lift askLoggerIO }}} `askLoggerIO` is a method of `MonadLoggerIO` and we need it at type `m`. But we only have the constraints `MonadLogger (t m), MonadIO (t m)`, which are insufficient (and useless). The only way GHC could think this type checks is if BOTH `t m` and `m` refer to the instance being derived, which is terribly wrong. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12784#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler