Skip to content

Release 7.4.3 introduces breaking API changes #7

Open

Description

@snoyberg

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions