
Hi, Can we use more general type in XConfig definition? $ darcs w XMonad/Core.hs What's new in "XMonad/Core.hs": { hunk ./XMonad/Core.hs 75 - , keys :: XConfig Layout -> M.Map (ButtonMask,KeySym) (X ()) - , mouseBindings :: XConfig Layout -> M.Map (ButtonMask, Button) (Window -> X ()) + , keys :: XConfig l -> M.Map (ButtonMask,KeySym) (X ()) + , mouseBindings :: XConfig l -> M.Map (ButtonMask, Button) (Window -> X ()) } Thanks! -- vvv

On Tue, Nov 13, 2007 at 10:41:13PM +0200, Valery V. Vorotyntsev wrote:
Can we use more general type in XConfig definition?
I didn't think we could. Does it actually work? I'd think that'd break things. i.e. there's no way I can see to change a function (XConfig l -> a) to a function (XConfig Layout -> a), which we'd need to do. Is there any reason other than elegance that you'd like to do this?
$ darcs w XMonad/Core.hs What's new in "XMonad/Core.hs":
{ hunk ./XMonad/Core.hs 75 - , keys :: XConfig Layout -> M.Map (ButtonMask,KeySym) (X ()) - , mouseBindings :: XConfig Layout -> M.Map (ButtonMask, Button) (Window -> X ()) + , keys :: XConfig l -> M.Map (ButtonMask,KeySym) (X ()) + , mouseBindings :: XConfig l -> M.Map (ButtonMask, Button) (Window -> X ()) }
Thanks!

On 11/13/07, David Roundy
On Tue, Nov 13, 2007 at 10:41:13PM +0200, Valery V. Vorotyntsev wrote:
Can we use more general type in XConfig definition?
I didn't think we could. Does it actually work? I'd think that'd break
And it did. :) See http://code.google.com/p/xmonad/issues/detail?id=89#c2
things. i.e. there's no way I can see to change a function (XConfig l -> a) to a function (XConfig Layout -> a), which we'd need to do.
Is there any reason other than elegance that you'd like to do this?
No reason, just my stupidity. Sorry. -- vvv

On Wed, Nov 14, 2007 at 12:24:16PM +0200, Valery V. Vorotyntsev wrote:
On 11/13/07, David Roundy
wrote: On Tue, Nov 13, 2007 at 10:41:13PM +0200, Valery V. Vorotyntsev wrote:
Can we use more general type in XConfig definition?
I didn't think we could. Does it actually work? I'd think that'd break
And it did. :) See http://code.google.com/p/xmonad/issues/detail?id=89#c2
things. i.e. there's no way I can see to change a function (XConfig l -> a) to a function (XConfig Layout -> a), which we'd need to do.
Is there any reason other than elegance that you'd like to do this?
No reason, just my stupidity. Sorry.
No problem! It's always worth asking, if it seems like there's a better way to do something. :) -- David Roundy Department of Physics Oregon State University
participants (2)
-
David Roundy
-
Valery V. Vorotyntsev