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

Build error with 8.0.2-rc1 #123

Closed
ghost opened this issue Nov 27, 2016 · 6 comments
Closed

Build error with 8.0.2-rc1 #123

ghost opened this issue Nov 27, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 27, 2016

Trying to build xmonad-contrib be036f9 with ghc 8.0.1.20161126:

XMonad/Layout/Groups/Helpers.hs:181:22: error:
      Couldn't match type 'WithID l0 Window
                           -> XMonad.Util.Stack.Zipper (G.Group l0 Window)
                           -> XMonad.Util.Stack.Zipper (G.Group l0 Window)'
                     with 'G.ModifySpec'
      Expected type: (G.WithID l0 Window
                      -> XMonad.Util.Stack.Zipper (G.Group l0 Window)
                      -> XMonad.Util.Stack.Zipper (G.Group l0 Window))
                     -> G.GroupsMessage
        Actual type: G.ModifySpec -> G.GroupsMessage
      In the second argument of '(.)' namely 'G.Modify'
      In the expression: sendMessage . G.Modify
      In an equation for 'wrap': wrap = sendMessage . G.Modify

Builds fine with 8.0.1.

@geekosaur
Copy link
Contributor

geekosaur commented Nov 27, 2016 via email

@ghost
Copy link
Author

ghost commented Nov 27, 2016

Glad to hear that. I haven't seen the bulk build report, so didn't know that it's a regression. Do you have links to tickets/reports?

@geekosaur
Copy link
Contributor

This was chatter in #ghc this morning. https://ghc.haskell.org/trac/ghc/ticket/12881 is one ticket opened as a result, but it doesn't look like the problem here. Other typechecking errors might well exist though; if something is known to work with 7.10.3 and 8.0.1 but not rc1, I would suspect an rc1 regression first --- and if there is an actual type issue the older versions let go, let the experts determine that.

(That looks like the only ticket currently open against the rc, aside from a Cabal update request.

(phab's not logging #ghc again so I can't link the discussion and suggestion of other regressions to be analyzed)

@rwbarton
Copy link

The problematic module uses ImpredicativeTypes, which has been unsupported for a while. The offending line is (https://github.com/xmonad/xmonad-contrib/blob/master/XMonad/Layout/Groups/Helpers.hs#L181)

wrap = sendMessage . G.Modify

which needs to instantiate (.) at G.ModifySpec, which I assume must be a polymorphic type. Simple eta expansion

wrap ms = sendMessage (G.Modify ms)

should avoid the need for ImpredicativeTypes.

@geekosaur
Copy link
Contributor

Ok, that's fixable. (I didn't think we had any ImpredicativeTypes use in contrib. Sigh.)

@ghost
Copy link
Author

ghost commented Nov 27, 2016

Closing since there's a fix: #124.

@ghost ghost closed this as completed Nov 27, 2016
byorgey added a commit that referenced this issue Nov 28, 2016
XMonad/Layout/Groups/Helpers.hs: drop broken ImpredicativeTypes extension (fixes #123)
colonelpanic8 pushed a commit to colonelpanic8/xmonad-contrib that referenced this issue Dec 26, 2016
…sion (fixes xmonad#123)

ImpredicativeTypes is practically unsupported extension
on it's way to be removed from GHC:
    https://mail.haskell.org/pipermail/ghc-devs/2016-September/012826.html

GHC-8.0.2-rc1 already fails to build xmonad-contrib as:

  XMonad/Layout/Groups/Helpers.hs:181:22: error:
    • Couldn't match type ‘G.WithID l0 Window
                           -> XMonad.Util.Stack.Zipper (G.Group l0 Window)
                           -> XMonad.Util.Stack.Zipper (G.Group l0 Window)’
                     with ‘G.ModifySpec’
      Expected type: (G.WithID l0 Window
                      -> XMonad.Util.Stack.Zipper (G.Group l0 Window)
                      -> XMonad.Util.Stack.Zipper (G.Group l0 Window))
                     -> G.GroupsMessage
        Actual type: G.ModifySpec -> G.GroupsMessage
    • In the second argument of ‘(.)’, namely ‘G.Modify’
      In the expression: sendMessage . G.Modify
      In an equation for ‘wrap’: wrap = sendMessage . G.Modify

The workaround is simple: add explicit types to applications
or open-code direct application (this change).

Bug: xmonad#123
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
liskin pushed a commit to liskin/xmonad-contrib that referenced this issue Nov 8, 2018
…sion (fixes xmonad#123)

ImpredicativeTypes is practically unsupported extension
on it's way to be removed from GHC:
    https://mail.haskell.org/pipermail/ghc-devs/2016-September/012826.html

GHC-8.0.2-rc1 already fails to build xmonad-contrib as:

  XMonad/Layout/Groups/Helpers.hs:181:22: error:
    • Couldn't match type ‘G.WithID l0 Window
                           -> XMonad.Util.Stack.Zipper (G.Group l0 Window)
                           -> XMonad.Util.Stack.Zipper (G.Group l0 Window)’
                     with ‘G.ModifySpec’
      Expected type: (G.WithID l0 Window
                      -> XMonad.Util.Stack.Zipper (G.Group l0 Window)
                      -> XMonad.Util.Stack.Zipper (G.Group l0 Window))
                     -> G.GroupsMessage
        Actual type: G.ModifySpec -> G.GroupsMessage
    • In the second argument of ‘(.)’, namely ‘G.Modify’
      In the expression: sendMessage . G.Modify
      In an equation for ‘wrap’: wrap = sendMessage . G.Modify

The workaround is simple: add explicit types to applications
or open-code direct application (this change).

Bug: xmonad#123
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
This issue was closed.
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

2 participants