Issue 487 in xmonad: XMonad.Util.Run documentation is incorrect

Status: New Owner: ---- New issue 487 by chris...@gmail.com: XMonad.Util.Run documentation is incorrect http://code.google.com/p/xmonad/issues/detail?id=487 The documentation for XMonad.Util.Run.seconds includes this code as an example [1]: -- Use like: -- -- > (5.5 `seconds`) However, using the example gives this error in GHC 7.0.3: The operator `seconds' takes two arguments, but its type `Rational -> Int' has only one This is because the Haskell Report [2] explicitly defines operator sections to only work with two argument functions. The corrected documentation (although less pretty) should be: -- Use like: -- -- > seconds 5.5 [1] http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-Run.html#v:seconds [2] http://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-300003.5

Comment #1 on issue 487 by allber...@gmail.com: XMonad.Util.Run documentation is incorrect http://code.google.com/p/xmonad/issues/detail?id=487 Actually this is because ghc has become more pedantic of late, and no longer allows the postfix section extension by default. (It used to be lax about requiring, or even providing, LANGUAGE pragmas for extensions that couldn't break standard-compliant programs.) You now need {-# LANGUAGE PostfixOperators #-} to enable it, whereas in earlier ghc versions it quietly worked by default.

Comment #2 on issue 487 by daniel.w...@gmail.com: XMonad.Util.Run documentation is incorrect http://code.google.com/p/xmonad/issues/detail?id=487 It's probably worth mentioning this gotcha in the docs anyway. I pushed a patch that does this.

Comment #3 on issue 487 by allber...@gmail.com: XMonad.Util.Run documentation is incorrect http://code.google.com/p/xmonad/issues/detail?id=487 Certainly it's worth mentioning; I'm just explaining why it *used* to be perfectly valid. ghc is in the business of breaking lots of formerly working stuff of late, it seems. (Control.Exception; base vs. H'98; ...)
participants (1)
-
codesite-noreply@google.com