[xmonad] darcs patch: Compile with ghc7

Adam Vogt vogt.adam at gmail.com
Thu May 5 13:57:10 CEST 2011


* On Wednesday, May 04 2011, Mats Rauhala wrote:

>1 patch for repository http://code.haskell.org/XMonadContrib:
>
>Wed May  4 22:24:55 EEST 2011  Mats Rauhala <mats.rauhala at gmail.com>
>  * Compile with ghc7
>
>I'm not sure if someone was already working on getting xmonad-contrib
>to work with ghc7 and I hope I'm not stepping on anyones toes. Until now (at least I) it wasn't possible to record changes with ghc7, because of warnings emitted by the change to ghc7. There were a couple of warnings about -fglasgow-exts, a couple of orphan instances, and a couple of warnings about useless imports (which were there for haddock!).
>
>I doubt that this is a perfect solution, and should be checked with a
>magnifying glass. There were pretty big changes to
>FlexibleManipulate.hs because the `type Pnt = (Double, Double)` caused
>orphan instances warning to be emitted. I hope someone would take their
>time to check the changes with ghc6 so that I didn't break anything
>with it. Gwen gave me a couple of tips, but there might be something
>else also.

Mats,

Another option for FlexibleManipulate is to define + - * / etc. without 
writing a Num instance. This leaves two unpleasant spots: imports and the 
one location where the math is with Double. See attached copy.

A third option would be to use  newtype Pnt = P (Double, Double), with 
similar instances.

Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FlexibleManipulate.hs
Type: text/x-haskell
Size: 4566 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20110505/2c254990/attachment.hs>


More information about the xmonad mailing list