Added support for the new DBus library namely dbus-0.10 #8

Merged
merged 2 commits into from Jul 26, 2012

Projects

None yet

2 participants

@u-quark
u-quark commented Jul 26, 2012

The package dbus-core has been deprecated. I have updated the example xmonad.hs to work with dbus-0.10. I am not sure that using package imports is good practice but it is needed if both dbus and dbus-core or the old DBus packages coexists.

@u-quark
Owner

No sure if using package imports is good practice, but this is needed in case both dbus and one of dbus-core or DBus packages coexist in one ghc installation.

@alexkay
Owner
alexkay commented Jul 26, 2012

Thank you for working on this!

Two issues with the patch:

  1. I would rather you drop package imports. DBus name conflict is not a new thing, in addition compiling xmonad fails without passing the -XPackageImports ghc flag.
  2. I'm seeing this error with ghc 7.4.1:
    Couldn't match expected type `D.ObjectPath'
                with actual type `[Char]'
    In the first argument of `D.signal', namely `"/org/xmonad/Log"'
    In the expression:
      (D.signal "/org/xmonad/Log" "org.xmonad.Log" "Update")
    In the expression:
      (D.signal "/org/xmonad/Log" "org.xmonad.Log" "Update")
        {D.signalBody = [D.toVariant
                           ("<b>" ++ (UTF8.decodeString str) ++ "</b>")]}
@u-quark
u-quark commented Jul 26, 2012

I have dropped the package imports.

It seems like your xmonad/ghc doesn't understand the LANGUAGE pragma in the header of the file because both compile errors (not compiling without the -XPackageImports flag and the type mismatch between D.ObjectPath and [Char]) are result of not using the Haskell extensions PackageImports and OverloadedStrings respectively.

With ghc 7.4.2 (in my case hiding packages dbus-core and DBus) u-quark@16fc7d2 compiles with no errors.

@alexkay alexkay merged commit f24239e into alexkay:master Jul 26, 2012
@alexkay
Owner
alexkay commented Jul 26, 2012

I've just tried it on another box and it works there. Merged, thanks again!

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