Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 7.4.3 introduces breaking API changes #7

Open
snoyberg opened this issue Apr 5, 2015 · 0 comments
Open

Release 7.4.3 introduces breaking API changes #7

snoyberg opened this issue Apr 5, 2015 · 0 comments

Comments

@snoyberg
Copy link

snoyberg commented Apr 5, 2015

Pinging @gbaz, as this was discovered in jmacro-rpc-happstack breakage. Version 7.4.3 of happstack-server introduces the following API breakage at a few places:

-instance (Monad m) => Monoid (ServerPartT m a) where
+instance (Monad m, MonadPlus m) => Monoid (ServerPartT m a) where

This leads to downstream packages no longer compiling, e.g.:

Network/JMacroRPC/Happstack.hs:101:55:
    Could not deduce (Control.Monad.MonadPlus m)
      arising from a use of ‘mappend’
    from the context (Monad m, Functor m, MonadIO m)
      bound by the type signature for
                 panelToPage :: (Monad m, Functor m, MonadIO m) =>
                                Maybe String
                                -> String -> Panel (ServerPartT m) -> ServerPartT m Response
      at Network/JMacroRPC/Happstack.hs:100:16-123
    Possible fix:
      add (Control.Monad.MonadPlus m) to the context of
        the type signature for
          panelToPage :: (Monad m, Functor m, MonadIO m) =>
                         Maybe String
                         -> String -> Panel (ServerPartT m) -> ServerPartT m Response
    In the expression: dir "jrpcs" updateHandler `mappend` drawHandler
    In an equation for ‘panelToPage’:
        panelToPage jqLoc title p
          = dir "jrpcs" updateHandler `mappend` drawHandler
          where
              (updateHandler, drawHandler)
                = panelToPageGen
                    (serveRpcs $ const (return ()))
                    (return . toResponse . H.preEscapedToHtml)
                    jqLoc
                    title
                    p

This change requires a major version bump. I'll need to temporarily block version 7.4.3 from Stackage until either the problem is resolved or downstream packages update to require the MonadPlus constraint as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant