kazu-yamamoto / logger

A fast logging system for Haskell
159 stars 68 forks source link

‘m’ is a rigid type variable bound: build failure with 8.0.1.20161022 #106

Closed ilovezfs closed 7 years ago

ilovezfs commented 7 years ago

Build log is here: https://gist.github.com/ilovezfs/c62fa40eb3f61569cb0e03f8cd3320a8

Several errors that look like

Control/Monad/Logger.hs:249:10: error:
    • Couldn't match type ‘m’ with ‘IdentityT m’
      ‘m’ is a rigid type variable bound by
        the instance declaration at Control/Monad/Logger.hs:249:10
      Expected type: IdentityT
                       m (Loc -> LogSource -> LogLevel -> LogStr -> IO ())
        Actual type: IdentityT
                       (IdentityT m) (Loc -> LogSource -> LogLevel -> LogStr -> IO ())

Commenting out https://github.com/kazu-yamamoto/logger/blob/master/monad-logger/Control/Monad/Logger.hs#L249-L264 seems to work around the problem.

snoyberg commented 7 years ago

Is there any reason to believe this is a bug in our package instead of in GHC itself? Have you reported this upstream?

ilovezfs commented 7 years ago

Nope, I've not reported it to GHC. The main reason to think it's the package is that of all of git-annex's many dependencies, this is the only one that failed to build out of the box.

ilovezfs commented 7 years ago

@snoyberg suggestion on IRC is

I guess all the 'm's in the default declaration should be some new variable 'n's

ilovezfs commented 7 years ago

may be related to https://ghc.haskell.org/trac/ghc/ticket/12768 which so far seems to be "won't fix"

ilovezfs commented 7 years ago

RyanGlScott on IRC has traced this to http://git.haskell.org/ghc.git/commit/d2958bd08a049b61941f078e51809c7e63bc3354 but the current belief is that the breakage is intentional and the bug is in the package.

RyanGlScott commented 7 years ago

12768 is a different issue. (I'm currently investigating that separately. In any case, 12768 and this issue were not caused by the same GHC commit.)

I've opened GHC Trac #12784 for this particular issue.

snoyberg commented 7 years ago

Thanks Ryan, I've subscribed to that Trac ticket.

ilovezfs commented 7 years ago

@snoyberg Thanks you for tagging a new release!